[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240223-am65-cpsw-xdp-basic-v3-0-5d944a9d84a0@baylibre.com>
Date: Tue, 05 Mar 2024 12:08:17 +0100
From: Julien Panis <jpanis@...libre.com>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Russell King <linux@...linux.org.uk>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Christian König <christian.koenig@....com>,
Simon Horman <horms@...nel.org>, Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
Julien Panis <jpanis@...libre.com>
Subject: [PATCH v3 0/3] DONOTMERGE: Add minimal XDP support to TI AM65 CPSW
Ethernet driver
This patch adds XDP support to TI AM65 CPSW Ethernet driver.
The following features are implemented: NETDEV_XDP_ACT_BASIC,
NETDEV_XDP_ACT_REDIRECT, and NETDEV_XDP_ACT_NDO_XMIT.
Zero-copy and non-linear XDP buffer supports are NOT implemented.
Besides, the page pool memory model is used to get better performance.
However, additional testing with iperf3 revealed that the performance
is worse while using page pool (that's why a DONOTMERGE tag is added
to this v3). As mentioned in the discussion about v2, with none XDP
traffic:
- Before = without page pool -> 500 MBits/sec
- After = with page pool -> 442 MBits/sec
-> So, ~ 10% worse with page pool here.
Note that the page pool 'dma_dir' parameter is set as DMA_BIDIRECTIONAL
because eth0, for instance, could get an XDP program attached while eth1
would not.
Signed-off-by: Julien Panis <jpanis@...libre.com>
---
Changes in v3:
- Fix a potential issue with TX buffer type, which is now set for each buffer.
- Add benchmark numbers (with VS without page pool) in the commit description.
- Link to v2: https://lore.kernel.org/r/20240223-am65-cpsw-xdp-basic-v2-0-01c6caacabb6@baylibre.com
Changes in v2:
- Use page pool memory model instead of MEM_TYPE_PAGE_ORDER0.
- In am65_cpsw_alloc_skb(), release reference on the page pool page
in case of error returned by build_skb().
- [nit] Cleanup am65_cpsw_nuss_common_open/stop() functions.
- [nit] Arrange local variables in reverse xmas tree order.
- Link to v1: https://lore.kernel.org/r/20240223-am65-cpsw-xdp-basic-v1-1-9f0b6cbda310@baylibre.com
---
Julien Panis (3):
net: ethernet: ti: Add accessors for struct k3_cppi_desc_pool members
net: ethernet: ti: Add desc_infos member to struct k3_cppi_desc_pool
net: ethernet: ti: am65-cpsw: Add minimal XDP support
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 533 +++++++++++++++++++++++++---
drivers/net/ethernet/ti/am65-cpsw-nuss.h | 13 +
drivers/net/ethernet/ti/k3-cppi-desc-pool.c | 36 ++
drivers/net/ethernet/ti/k3-cppi-desc-pool.h | 4 +
4 files changed, 536 insertions(+), 50 deletions(-)
---
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
change-id: 20240223-am65-cpsw-xdp-basic-4db828508b48
Best regards,
--
Julien Panis <jpanis@...libre.com>
Powered by blists - more mailing lists