cpu/esp32: Fixes the maximum packet size of 255 bytes in the esp_eth netdev driver of ESP32 mcu.#10604
Conversation
|
@TimoRoth It would be interesting whether your ESP Gateway is working with these bug fixes as expected. |
|
With this applied I can now ping the gateway itself with a ping size of up to 1434 bytes(which is a packet size of exactly 1500). |
Not really clear why 1434. ICMPv6 Echo request header has 8 byte and IPv6 header without extensions has 40 bytes. Therefore, I would expect 1452 byte as maximum or missed I something? Since your output interface has a MTU of 1280, your ICMPv6 Echo requests should be forwarded only for a data size of 1232 byte if fragmentation is not supported or not allowed.
I checked out your last commit, it works for me as expected. I can ping using ESP-NOW with a data size of up to 1232 byte. |
Is there a link layer header as well in there? |
I don't know, @TimoRoth?. If Ethernet II frame formatting is used, IPv6 should be directly the payload and should be able to use the whole MTU. If he uses a Linux PC to ping, I would guess this should be the case. |
|
I'm using Windows ping, I'm not exactly sure what it does, but when I do "ping -6 -l 1434" the package reaching the esp-eth interface has a size of exactly 1500 bytes. Didn't investigate any further why it's exactly that size. |
|
@TimoRoth I see, you are using windows. Hm, does it work to make and flash ESP32 with Windows or are you using Linux/macOS for that? Anyway, It would be quite interesting how the packets looks like. May I ask you to snap such one ICMPv6 Echo packet with data size of 1434 bytes by wireshark? |
|
@TimoRoth Thanks. This is what I supposed, Ethernet II formatted MAC frame with 40 bytes IPv6 header and 8 bytes ICMPv6 echo reply header as payload. The frame size of 1496 on wire includes the 14 bytes Ethernet II header. But, Ethernet II MTU size is always the limit for the payload of the Ethernet frame. That is, usually it should be possible to have 1514 bytes on wire. If you ping any IPv4 host, you will see these 1514 bytes on wire with |
|
@miri64 May I ask you to review this fix for |
|
I don't have the hardware to test, but I will give it a code review. |
|
Maybe @TimoRoth could it retest even though he already tried the changes #10604 (comment). |
|
@PeterKietzmann should also have access to the hardware - and is experienced with the netdev interface. |
|
Just tested it again on top of current master. |
|
Then, once my change request is addressed I think we can merge. |
|
@miri64 Changed |
|
@miri64 Could you give your ACK for the requested change? |
Thanks. Was tested again by @TimoRoth #10604 (comment) |
Fixes the maximum packet size of 255 bytes in the esp_eth netdev driver of ESP32 mcu. fixup! cpu/esp32: fixes esp_net maximum packet size
3448df6 to
dc2b1de
Compare

Contribution description
This PR fixes the following problems:
LOG_ERRORbyDEBUGwhen receive buffer is to small in_recvto avoid error messages for an usual case_recvfunction is restructured to return-ENOBUFSif the receive buffer is too small, and in all other cases, the size of the packet or the bytes read.Testing procedure
Compile and flash
example/gnrc_networkingfor an ESP32 board with an Ethernet interface and activate theesp_ethmodule, e.g.,After flashing, just ping any link local address from RIOT shell with an ICMP data size greater than 255 byte, e.g.
Issues/PRs references
Fixes #10594