Skip to content

esp-emac v0.3.0

Choose a tag to compare

@adeepn adeepn released this 12 May 10:03
· 14 commits to main since this release

Added

Hardware checksum offload for the EMAC: TX descriptors now request full TCP/UDP/ICMP + IPv4-header checksum insertion (`TDES0.CIC = 0b11`), and `GMACCONFIG.IPC` is set so the DMA verifies received checksums and silently drops bad frames before they reach the host. The embassy-net driver advertises `Checksum::None` for `ipv4`, `tcp`, `udp`, and `icmpv4` so smoltcp skips redundant software computation.

Behavior is correct on either side: a peer talking to us sees normal Ethernet frames with valid checksums, and frames we receive with bad checksums never appear at the application. Two new unit tests cover the descriptor flag and the advertised capabilities.

Verified on jxd-pm380-e1eth + LAN8720A. No measurable throughput delta on the iperf2 loopback (smoltcp packet pipeline is the dominant cost), but eliminates a real per-packet CPU expense and enables future zero-copy work.

Compatibility

Same as 0.2.x: `esp-hal = "1.1"`, `embassy-net = "0.9"`, `embassy-executor = "0.10"`, `xtensa-esp32-none-elf`. MSRV unchanged at 1.88.

See `CHANGELOG.md` for full notes.