[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf6f03d04c8f2ad2627a924f7ee66645d661d746.camel@gmail.com>
Date: Tue, 13 Dec 2022 07:58:19 -0800
From: Alexander H Duyck <alexander.duyck@...il.com>
To: Tirthendu Sarkar <tirthendu.sarkar@...el.com>, tirtha@...il.com,
jesse.brandeburg@...el.com, anthony.l.nguyen@...el.com,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, ast@...nel.org, daniel@...earbox.net,
hawk@...nel.org, john.fastabend@...il.com,
intel-wired-lan@...ts.osuosl.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, magnus.karlsson@...el.com,
maciej.fijalkowski@...el.com
Subject: Re: [PATCH intel-next 0/5] i40e: support XDP multi-buffer
On Tue, 2022-12-13 at 16:20 +0530, Tirthendu Sarkar wrote:
> This patchset adds multi-buffer support for XDP. The first four patches
> are prepatory patches while the fifth one contains actual multi-buffer
> changes.
>
> Tirthendu Sarkar (5):
> i40e: add pre-xdp page_count in rx_buffer
> i40e: avoid per buffer next_to_clean access from i40e_ring
> i40e: introduce next_to_process to i40e_ring
> i40e: pull out rx buffer allocation to end of i40e_clean_rx_irq()
> i40e: add support for XDP multi-buffer Rx
>
> drivers/net/ethernet/intel/i40e/i40e_main.c | 18 +-
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 378 ++++++++++++++------
> drivers/net/ethernet/intel/i40e/i40e_txrx.h | 13 +-
> 3 files changed, 280 insertions(+), 129 deletions(-)
>
This approach seems kind of convoluted to me. Basically you are trying
to clean the ring without cleaning the ring in the cases where you
encounter a non EOP descriptor.
Why not just replace the skb pointer with an xdp_buff in the ring? Then
you just build an xdp_buff w/ frags and then convert it after after
i40e_is_non_eop? You should then still be able to use all the same page
counting tricks and the pages would just be dropped into the shared
info of an xdp_buff instead of an skb and function the same assuming
you have all the logic in place to clean them up correctly.
Powered by blists - more mailing lists