BPF List
 help / color / mirror / Atom feed
* [PATCH net 0/3] net: ethernet: ti: am65-cpsw: Fix XDP implementation
@ 2024-08-29 12:03 Roger Quadros
  2024-08-29 12:03 ` [PATCH net 1/3] net: ethernet: ti: am65-cpsw: fix XDP_DROP, XDP_TX and XDP_REDIRECT Roger Quadros
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Roger Quadros @ 2024-08-29 12:03 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
	John Fastabend, Julien Panis, Jacob Keller
  Cc: Siddharth Vadapalli, Md Danish Anwar, Vignesh Raghavendra,
	Govindarajan Sriramakrishnan, netdev, linux-kernel, bpf,
	Roger Quadros

The XDP implementation on am65-cpsw driver is broken in many ways
and this series fixes it.

Below are the current issues that are being fixed:

1)  The following XDP_DROP test from [1] stalls the interface after
    250 packets.
    ~# xdb-bench drop -m native eth0
    This is because new RX requests are never queued. Fix that.

2)  The below XDP_TX test from [1] fails with a warning
    [  499.947381] XDP_WARN: xdp_update_frame_from_buff(line:277): Driver BUG: missing reserved tailroom
    ~# xdb-bench tx -m native eth0
    Fix that by using PAGE_SIZE during xdp_init_buf().

3)  In XDP_REDIRECT case only 1 packet was processed in rx_poll.
    Fix it to process up to budget packets.
    ~# ./xdp-bench redirect -m native eth0 eth0

4)  If number of TX queues are set to 1 we get a NULL pointer
    dereference during XDP_TX.
    ~# ethtool -L eth0 tx 1
    ~# ./xdp-trafficgen udp -A <ipv6-src> -a <ipv6-dst> eth0 -t 2
    Transmitting on eth0 (ifindex 2)
    [  241.135257] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000030

5)  Net statistics is broken for XDP_TX and XDP_REDIRECT

[1] xdp-tools suite https://github.com/xdp-project/xdp-tools

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
Roger Quadros (3):
      net: ethernet: ti: am65-cpsw: fix XDP_DROP, XDP_TX and XDP_REDIRECT
      net: ethernet: ti: am65-cpsw: Fix NULL dereference on XDP_TX
      net: ethernet: ti: am65-cpsw: Fix RX statistics for XDP_TX and XDP_REDIRECT

 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 82 +++++++++++++++++++-------------
 1 file changed, 49 insertions(+), 33 deletions(-)
---
base-commit: 5be63fc19fcaa4c236b307420483578a56986a37
change-id: 20240829-am65-cpsw-xdp-d5876b25335c

Best regards,
-- 
Roger Quadros <rogerq@kernel.org>


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

end of thread, other threads:[~2024-09-03  9:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 12:03 [PATCH net 0/3] net: ethernet: ti: am65-cpsw: Fix XDP implementation Roger Quadros
2024-08-29 12:03 ` [PATCH net 1/3] net: ethernet: ti: am65-cpsw: fix XDP_DROP, XDP_TX and XDP_REDIRECT Roger Quadros
2024-08-29 12:03 ` [PATCH net 2/3] net: ethernet: ti: am65-cpsw: Fix NULL dereference on XDP_TX Roger Quadros
2024-08-29 12:03 ` [PATCH net 3/3] net: ethernet: ti: am65-cpsw: Fix RX statistics for XDP_TX and XDP_REDIRECT Roger Quadros
2024-08-29 20:15 ` [PATCH net 0/3] net: ethernet: ti: am65-cpsw: Fix XDP implementation Jacob Keller
2024-08-30  7:36 ` Julien Panis
2024-08-30 10:10 ` MD Danish Anwar
2024-09-03  9:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox