Re: [PATCH net-next v8 3/3] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-04-12 Thread Julien Panis
On 4/10/24 17:02, Jakub Kicinski wrote: On Wed, 10 Apr 2024 16:02:00 +0200 Julien Panis wrote: You shouldn't build the skb upfront any more. Give the page to the HW, once HW sends you a completion - build the skbs. If build fails (allocation failure) just give the page back to HW. If it succeeds

Re: [PATCH net-next v8 3/3] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-04-10 Thread Jakub Kicinski
On Wed, 10 Apr 2024 16:02:00 +0200 Julien Panis wrote: > > You shouldn't build the skb upfront any more. Give the page to the HW, > > once HW sends you a completion - build the skbs. If build fails > > (allocation failure) just give the page back to HW. If it succeeds, > > however, you'll get a skb

Re: [PATCH net-next v8 3/3] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-04-10 Thread Julien Panis
On 4/10/24 02:49, Jakub Kicinski wrote: On Mon, 08 Apr 2024 11:38:04 +0200 Julien Panis wrote: +static struct sk_buff *am65_cpsw_alloc_skb(struct am65_cpsw_rx_chn *rx_chn, + struct net_device *ndev, + unsigned int

Re: [PATCH net-next v8 3/3] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-04-09 Thread Jakub Kicinski
On Mon, 08 Apr 2024 11:38:04 +0200 Julien Panis wrote: > +static struct sk_buff *am65_cpsw_alloc_skb(struct am65_cpsw_rx_chn *rx_chn, > +struct net_device *ndev, > +unsigned int len, > +

[PATCH net-next v8 3/3] net: ethernet: ti: am65-cpsw: Add minimal XDP support

2024-04-08 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) The page pool memory