All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] net: lan966x: Add xdp support
@ 2022-11-06 21:11 Horatiu Vultur
  2022-11-06 21:11 ` [PATCH net-next v2 1/4] net: lan966x: Add define IFH_LEN_BYTES Horatiu Vultur
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Horatiu Vultur @ 2022-11-06 21:11 UTC (permalink / raw)
  To: linux-kernel, netdev, bpf
  Cc: davem, edumazet, kuba, pabeni, ast, daniel, hawk, john.fastabend,
	linux, Horatiu Vultur

Add support for xdp in lan966x driver. Currently only XDP_PASS and
XDP_DROP are supported.

The first 2 patches are just moving things around just to simplify
the code for when the xdp is added.
Patch 3 actually adds the xdp. Currently the only supported actions
are XDP_PASS and XDP_DROP. In the future this will be extended with
XDP_TX and XDP_REDIRECT.
Patch 4 changes to use page pool API, because the handling of the
pages is similar with what already lan966x driver is doing. In this
way is possible to remove some of the code.

All these changes give a small improvement on the RX side:
Before:
iperf3 -c 10.96.10.1 -R
[  5]   0.00-10.01  sec   514 MBytes   430 Mbits/sec    0         sender
[  5]   0.00-10.00  sec   509 MBytes   427 Mbits/sec              receiver

After:
iperf3 -c 10.96.10.1 -R
[  5]   0.00-10.02  sec   540 MBytes   452 Mbits/sec    0         sender
[  5]   0.00-10.01  sec   537 MBytes   450 Mbits/sec              receiver

---
v1->v2:
- rebase on net-next, once the fixes for FDMA and MTU were accepted
- drop patch 2, which changes the MTU as is not needed anymore
- allow to run xdp programs on frames bigger than 4KB

Horatiu Vultur (4):
  net: lan966x: Add define IFH_LEN_BYTES
  net: lan966x: Split function lan966x_fdma_rx_get_frame
  net: lan966x: Add basic XDP support
  net: lan96x: Use page_pool API

 .../net/ethernet/microchip/lan966x/Kconfig    |   1 +
 .../net/ethernet/microchip/lan966x/Makefile   |   3 +-
 .../ethernet/microchip/lan966x/lan966x_fdma.c | 166 ++++++++++++------
 .../ethernet/microchip/lan966x/lan966x_ifh.h  |   1 +
 .../ethernet/microchip/lan966x/lan966x_main.c |   7 +-
 .../ethernet/microchip/lan966x/lan966x_main.h |  25 +++
 .../ethernet/microchip/lan966x/lan966x_xdp.c  |  81 +++++++++
 7 files changed, 224 insertions(+), 60 deletions(-)
 create mode 100644 drivers/net/ethernet/microchip/lan966x/lan966x_xdp.c

-- 
2.38.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-11-09  7:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-06 21:11 [PATCH net-next v2 0/4] net: lan966x: Add xdp support Horatiu Vultur
2022-11-06 21:11 ` [PATCH net-next v2 1/4] net: lan966x: Add define IFH_LEN_BYTES Horatiu Vultur
2022-11-06 21:11 ` [PATCH net-next v2 2/4] net: lan966x: Split function lan966x_fdma_rx_get_frame Horatiu Vultur
2022-11-07 16:06   ` Alexander Lobakin
2022-11-07 21:24     ` Horatiu Vultur
2022-11-08 11:21       ` Alexander Lobakin
2022-11-06 21:11 ` [PATCH net-next v2 3/4] net: lan966x: Add basic XDP support Horatiu Vultur
2022-11-07 16:13   ` Alexander Lobakin
2022-11-07 21:26     ` Horatiu Vultur
2022-11-08 11:26       ` Alexander Lobakin
2022-11-06 21:11 ` [PATCH net-next v2 4/4] net: lan96x: Use page_pool API Horatiu Vultur
2022-11-07 16:40   ` Alexander Lobakin
2022-11-07 21:35     ` Horatiu Vultur
2022-11-08 11:33       ` Alexander Lobakin
2022-11-09  7:26         ` Horatiu Vultur

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.