All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Gerhard Engleder <gerhard@engleder-embedded.com>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<davem@davemloft.net>, <kuba@kernel.org>, <edumazet@google.com>,
	<pabeni@redhat.com>, <bjorn@kernel.org>,
	<magnus.karlsson@intel.com>, <jonathan.lemon@gmail.com>
Subject: Re: [PATCH net-next v3 0/6] tsnep: XDP socket zero-copy support
Date: Thu, 20 Apr 2023 22:19:01 +0200	[thread overview]
Message-ID: <ZEGeNYHh+NatBDq+@boxer> (raw)
In-Reply-To: <20230418190459.19326-1-gerhard@engleder-embedded.com>

On Tue, Apr 18, 2023 at 09:04:53PM +0200, Gerhard Engleder wrote:
> Implement XDP socket zero-copy support for tsnep driver. I tried to
> follow existing drivers like igc as far as possible. But one main
> difference is that tsnep does not need any reconfiguration for XDP BPF
> program setup. So I decided to keep this behavior no matter if a XSK
> pool is used or not. As a result, tsnep starts using the XSK pool even
> if no XDP BPF program is available.
> 
> Another difference is that I tried to prevent potentially failing
> allocations during XSK pool setup. E.g. both memory models for page pool
> and XSK pool are registered all the time. Thus, XSK pool setup cannot
> end up with not working queues.
> 
> Some prework is done to reduce the last two XSK commits to actual XSK
> changes.

I had minor comments on two last patches, besides:
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

> 
> v3:
> - use __netif_tx_lock_bh() (Paolo Abeni)
> - comment that rx->page_buffer is always zero terminated (Paolo Abeni)
> 
> v2:
> - eliminate modulo op in TX/RX path (Maciej Fijalkowski)
> - eliminate retval variable in tsnep_rx_alloc_zc() (Maciej Fijalkowski)
> - scope variable entry within loop (Maciej Fijalkowski)
> - use DMA_ATTR_SKIP_CPU_SYNC directly (Maciej Fijalkowski)
> - union for page/xdp in tsnep_rx_entry (Maciej Fijalkowski)
> - provide performance numbers (Maciej Fijalkowski)
> - use xsk_buff_alloc_batch() (Maciej Fijalkowski)
> - use xsk_tx_peek_release_desc_batch() (Maciej Fijalkowski)
> - don't call tsnep_rx_reopen() if netdev is down
> - init adapter pointer of queue only once
> 
> Gerhard Engleder (6):
>   tsnep: Replace modulo operation with mask
>   tsnep: Rework TX/RX queue initialization
>   tsnep: Add functions for queue enable/disable
>   tsnep: Move skb receive action to separate function
>   tsnep: Add XDP socket zero-copy RX support
>   tsnep: Add XDP socket zero-copy TX support
> 
>  drivers/net/ethernet/engleder/tsnep.h      |  16 +-
>  drivers/net/ethernet/engleder/tsnep_main.c | 863 ++++++++++++++++++---
>  drivers/net/ethernet/engleder/tsnep_xdp.c  |  66 ++
>  3 files changed, 822 insertions(+), 123 deletions(-)
> 
> -- 
> 2.30.2
> 

  parent reply	other threads:[~2023-04-20 20:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 19:04 [PATCH net-next v3 0/6] tsnep: XDP socket zero-copy support Gerhard Engleder
2023-04-18 19:04 ` [PATCH net-next v3 1/6] tsnep: Replace modulo operation with mask Gerhard Engleder
2023-04-20 14:23   ` Maciej Fijalkowski
2023-04-20 15:10     ` Stephen Hemminger
2023-04-20 18:51       ` Gerhard Engleder
2023-04-20 18:40     ` Gerhard Engleder
2023-04-18 19:04 ` [PATCH net-next v3 2/6] tsnep: Rework TX/RX queue initialization Gerhard Engleder
2023-04-18 19:04 ` [PATCH net-next v3 3/6] tsnep: Add functions for queue enable/disable Gerhard Engleder
2023-04-18 19:04 ` [PATCH net-next v3 4/6] tsnep: Move skb receive action to separate function Gerhard Engleder
2023-04-18 19:04 ` [PATCH net-next v3 5/6] tsnep: Add XDP socket zero-copy RX support Gerhard Engleder
2023-04-20 19:46   ` Maciej Fijalkowski
2023-04-21 18:54     ` Gerhard Engleder
2023-04-18 19:04 ` [PATCH net-next v3 6/6] tsnep: Add XDP socket zero-copy TX support Gerhard Engleder
2023-04-20 20:17   ` Maciej Fijalkowski
2023-04-21 19:02     ` Gerhard Engleder
2023-04-24 12:03       ` Maciej Fijalkowski
2023-04-24 18:40         ` Gerhard Engleder
2023-04-20 20:19 ` Maciej Fijalkowski [this message]
2023-04-21 19:05   ` [PATCH net-next v3 0/6] tsnep: XDP socket zero-copy support Gerhard Engleder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZEGeNYHh+NatBDq+@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gerhard@engleder-embedded.com \
    --cc=jonathan.lemon@gmail.com \
    --cc=kuba@kernel.org \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.