torstein18
New Contributor
6 days agoXDP on agilex3
Hi I'm wondering if anybody have been able to implement XDP transmit on an agilex3 soc. As far as I understand the smmc driver should support the full XDP zero copy stack. But when I try to run an e...
- 6 days ago
Hi Torstein18,
Stmmac does not implement a full zero‑copy TX path, even on recent kernels. The “few packets then stops” behavior you see is a classic symptom of that gap.
mas-bandwidth/af_xdp/001 is a pure AF_XDP userspace TX loop.
On stmmac, what typically happens:
- First packets go out (driver does a fallback copy or partial DMA)
- TX completion path never frees UMEM frames correctly
- TX ring fills up
- Kernel stops accepting new descriptors
- sendto() succeeds briefly, then silently stalls
This is not a userspace bug in your example.
For AF_XDP ZC TX, the driver must implement:
ndo_xsk_wakeup
ZC‑capable TX rings
Correct UMEM lifetime handling
What does work reliably is XDP_TX / XDP_REDIRECT from an XDP program, not AF_XDP userspace TX ZC.
You may consider implementing below flow.
FPGA → shared memory → XDP program → XDP_TX
Key points:
- FPGA writes packet buffers into shared memory (ensure cache coherency/IO-MMU mapping is correct).
- CPU does NOT copy payload
- XDP program simply sets headers and returns XDP_TX
- No AF_XDP socket involved
Hope this is helpful.
Archer_Altera