Re: [PATCH] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-02-29 Thread Julien Panis
On 2/29/24 17:46, Andrew Lunn wrote: On Thu, Feb 29, 2024 at 05:19:44PM +0100, Julien Panis wrote: On 2/27/24 00:18, Andrew Lunn wrote: +static struct sk_buff *am65_cpsw_alloc_skb(struct net_device *ndev, unsigned int len) +{ + struct page *page; + struct sk_buff *skb; + + pa

Re: [PATCH] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-02-29 Thread Andrew Lunn
On Thu, Feb 29, 2024 at 05:19:44PM +0100, Julien Panis wrote: > On 2/27/24 00:18, Andrew Lunn wrote: > > > +static struct sk_buff *am65_cpsw_alloc_skb(struct net_device *ndev, > > > unsigned int len) > > > +{ > > > + struct page *page; > > > + struct sk_buff *skb; > > > + > > > + page = dev_alloc_

Re: [PATCH] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-02-29 Thread Julien Panis
On 2/27/24 00:18, Andrew Lunn wrote: +static struct sk_buff *am65_cpsw_alloc_skb(struct net_device *ndev, unsigned int len) +{ + struct page *page; + struct sk_buff *skb; + + page = dev_alloc_pages(0); You are likely to get better performance if you use the page_pool. When FE

Re: [PATCH] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-02-27 Thread Simon Horman
On Mon, Feb 26, 2024 at 06:48:25PM +0100, Julien Panis wrote: > Hello Simon, > > Thank you for the review. > > On 2/26/24 18:25, Simon Horman wrote: > > On Fri, Feb 23, 2024 at 12:01:37PM +0100, Julien Panis wrote: > > > This patch adds XDP (eXpress Data Path) support to TI AM65 CPSW > > > Ethern

Re: [PATCH] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-02-26 Thread Andrew Lunn
> +static struct sk_buff *am65_cpsw_alloc_skb(struct net_device *ndev, unsigned > int len) > +{ > + struct page *page; > + struct sk_buff *skb; > + > + page = dev_alloc_pages(0); You are likely to get better performance if you use the page_pool. When FEC added XDP support, the first

Re: [PATCH] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-02-26 Thread Julien Panis
Hello Simon, Thank you for the review. On 2/26/24 18:25, Simon Horman wrote: On Fri, Feb 23, 2024 at 12:01:37PM +0100, Julien Panis wrote: This patch adds XDP (eXpress Data Path) support to TI AM65 CPSW Ethernet driver. The following features are implemented: - NETDEV_XDP_ACT_BASIC (XDP_PASS,

Re: [PATCH] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-02-26 Thread Simon Horman
On Fri, Feb 23, 2024 at 12:01:37PM +0100, Julien Panis wrote: > This patch adds XDP (eXpress Data Path) support to TI AM65 CPSW > Ethernet driver. The following features are implemented: > - NETDEV_XDP_ACT_BASIC (XDP_PASS, XDP_TX, XDP_DROP, XDP_ABORTED) > - NETDEV_XDP_ACT_REDIRECT (XDP_REDIRECT) >

[PATCH] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-02-23 Thread Julien Panis
This patch adds XDP (eXpress Data Path) support to TI AM65 CPSW Ethernet driver. The following features are implemented: - NETDEV_XDP_ACT_BASIC (XDP_PASS, XDP_TX, XDP_DROP, XDP_ABORTED) - NETDEV_XDP_ACT_REDIRECT (XDP_REDIRECT) - NETDEV_XDP_ACT_NDO_XMIT (ndo_xdp_xmit callback) Signed-off-by: Julien