Skip to content

stmmac: Add XDP support

Ong Boon Leong bpf linux-arm-kernel lkml netdev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 1 replyIn review
  2. v3 posting 2/26 patches 2 repliesSuperseded
  3. v3 posting 1/20 of 6 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v26 patches4 repliesSuperseded
v16 patches0 repliesSuperseded

Changes in v4 from the cover letter

5/6: Move TX clean timer setup to the end of NAPI RX process and
group it under stmmac_finalize_xdp_rx().
Also, fixed stmmac_xdp_xmit_back() returns STMMAC_XDP_CONSUMED if XDP buffer conversion to XDP frame fails.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: stmmac: set IRQ affinity hint for multi MSI vectorsdrivers/net/ethernet/stmicro/stmmac/stmmac_main.c+13 -20 replies
2/6net: stmmac: make SPH enable/disable to be configurabledrivers/net/ethernet/stmicro/stmmac/stmmac.h drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+8 -50 replies
3/6net: stmmac: arrange Tx tail pointer update to stmmac_flush_tx_descriptorsdrivers/net/ethernet/stmicro/stmmac/stmmac_main.c+26 -300 replies
4/6net: stmmac: Add initial XDP supportdrivers/net/ethernet/stmicro/stmmac/Makefile drivers/net/ethernet/stmicro/stmmac/stmmac.h drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 more+197 -270 replies
5/6net: stmmac: Add support for XDP_TX actiondrivers/net/ethernet/stmicro/stmmac/stmmac.h drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+232 -180 replies
6/6net: stmmac: Add support for XDP_REDIRECT actiondrivers/net/ethernet/stmicro/stmmac/stmmac.h drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+84 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH net-next v4 0/6] stmmac: Add XDP support

Hi,

This is the v4 patch series for adding XDP native support to stmmac.

Changes in v4:
5/6: Move TX clean timer setup to the end of NAPI RX process and
group it under stmmac_finalize_xdp_rx().
Also, fixed stmmac_xdp_xmit_back() returns STMMAC_XDP_CONSUMED if XDP buffer conversion to XDP frame fails.

6/6: Move xdp_do_flush(0 into stmmac_finalize_xdp_rx() and combine
the XDP verdict of XDP TX and XDP REDIRECT together.

I retested the patch series on the 'xdp2' and 'xdp_redirect' related to changes above and found the result to be satisfactory.

History of previous patch series:
v3: https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]/
v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=457757
v1: https://patchwork.kernel.org/project/netdevbpf/list/?series=457139

It will be great if community can help to test or review the v4 series and provide me any input if any.

Thank you very much,
Boon Leong

Ong Boon Leong (6):
net: stmmac: set IRQ affinity hint for multi MSI vectors
net: stmmac: make SPH enable/disable to be configurable
net: stmmac: arrange Tx tail pointer update to
stmmac_flush_tx_descriptors
net: stmmac: Add initial XDP support
net: stmmac: Add support for XDP_TX action
net: stmmac: Add support for XDP_REDIRECT action

 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  35 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 539 +++++++++++++++---
 .../net/ethernet/stmicro/stmmac/stmmac_xdp.c  |  40 ++
 .../net/ethernet/stmicro/stmmac/stmmac_xdp.h  |  12 +
 5 files changed, 547 insertions(+), 80 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.h
Signature · 1 line
2.25.1