RE: [PATCH net-next v8 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver

2024-04-12 Thread Keller, Jacob E


> -Original Message-
> From: Julien Panis 
> Sent: Friday, April 12, 2024 7:02 AM
> To: Keller, Jacob E ; David S. Miller
> ; Eric Dumazet ; Jakub Kicinski
> ; Paolo Abeni ; Russell King
> ; Alexei Starovoitov ; Daniel Borkmann
> ; Jesper Dangaard Brouer ; John
> Fastabend ; Sumit Semwal
> ; Christian König ; Simon
> Horman ; Andrew Lunn ; Ratheesh
> Kannoth ; Naveen Mamindlapalli
> 
> Cc: danishan...@ti.com; yuehaib...@huawei.com; rog...@kernel.org;
> net...@vger.kernel.org; linux-ker...@vger.kernel.org; b...@vger.kernel.org; 
> linux-
> me...@vger.kernel.org; dri-devel@lists.freedesktop.org; linaro-mm-
> s...@lists.linaro.org
> Subject: Re: [PATCH net-next v8 0/3] Add minimal XDP support to TI AM65 CPSW
> Ethernet driver
> 
> On 4/10/24 01:51, Jacob Keller wrote:
> >
> > On 4/8/2024 2:38 AM, Julien Panis wrote:
> >> 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.
> >>
> >> Signed-off-by: Julien Panis 
> >> ---
> > Reviewed-by: Jacob Keller 
> 
> Thank you for your review Jacob.
> I'll add your 'Reviewed-by' tag for PATCH 1/3 in next version. Unfortunately,
> I will not for PATCH 2/3 and 3/3 because there will be too many changes,
> following Jakub's comments.

Sounds good. Feel free to CC me on the next version too and I can review the 
new changes 


Re: [PATCH net-next v8 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver

2024-04-12 Thread Julien Panis

On 4/10/24 01:51, Jacob Keller wrote:


On 4/8/2024 2:38 AM, Julien Panis wrote:

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.

Signed-off-by: Julien Panis 
---

Reviewed-by: Jacob Keller 


Thank you for your review Jacob.
I'll add your 'Reviewed-by' tag for PATCH 1/3 in next version. Unfortunately,
I will not for PATCH 2/3 and 3/3 because there will be too many changes,
following Jakub's comments.



Re: [PATCH net-next v8 0/3] Add minimal XDP support to TI AM65 CPSW Ethernet driver

2024-04-09 Thread Jacob Keller



On 4/8/2024 2:38 AM, Julien Panis wrote:
> 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.
> 
> Signed-off-by: Julien Panis 
> ---

Reviewed-by: Jacob Keller 

> Changes in v8:
> - Fix some warnings reported by patchwork.
> - Link to v7: 
> https://lore.kernel.org/r/20240223-am65-cpsw-xdp-basic-v7-0-c3857c82d...@baylibre.com
> 
> Changes in v7:
> - Move xdp_do_flush() function call in am65_cpsw_nuss_rx_poll().
> - Link to v6: 
> https://lore.kernel.org/r/20240223-am65-cpsw-xdp-basic-v6-0-212eeff5b...@baylibre.com
> 
> Changes in v6:
> - In k3_cppi_*() functions, use const qualifier when the content of
> pool is not modified.
> - Add allow_direct bool parameter to am65_cpsw_alloc_skb() function
> for direct use by page_pool_put_full_page().
> - Link to v5: 
> https://lore.kernel.org/r/20240223-am65-cpsw-xdp-basic-v5-0-bc1739170...@baylibre.com
> 
> Changes in v5:
> - In k3_cppi_desc_pool_destroy(), free memory allocated for desc_infos.
> - Link to v4: 
> https://lore.kernel.org/r/20240223-am65-cpsw-xdp-basic-v4-0-2e45e5dec...@baylibre.com
> 
> Changes in v4:
> - Add skb_mark_for_recycle() in am65_cpsw_nuss_rx_packets() function.
> - Specify napi page pool parameter in am65_cpsw_create_xdp_rxqs() function.
> - Add benchmark numbers (with VS without page pool) in the commit description.
> - Add xdp_do_flush() in am65_cpsw_run_xdp() function for XDP_REDIRECT case.
> - Link to v3: 
> https://lore.kernel.org/r/20240223-am65-cpsw-xdp-basic-v3-0-5d944a9d8...@baylibre.com
> 
> Changes in v3:
> - Fix a potential issue with TX buffer type, which is now set for each buffer.
> - Link to v2: 
> https://lore.kernel.org/r/20240223-am65-cpsw-xdp-basic-v2-0-01c6caaca...@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-9f0b6cbda...@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| 569 
> +---
>  drivers/net/ethernet/ti/am65-cpsw-nuss.h|  13 +
>  drivers/net/ethernet/ti/k3-cppi-desc-pool.c |  41 ++
>  drivers/net/ethernet/ti/k3-cppi-desc-pool.h |   6 +
>  4 files changed, 578 insertions(+), 51 deletions(-)
> ---
> base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
> change-id: 20240223-am65-cpsw-xdp-basic-4db828508b48
> 
> Best regards,