public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: <intel-wired-lan@lists.osuosl.org>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
	<anthony.l.nguyen@intel.com>, <magnus.karlsson@intel.com>
Subject: Re: [PATCH intel-net 1/2] ice: xsk: change batched Tx descriptor cleaning
Date: Tue, 30 Aug 2022 14:43:50 +0200	[thread overview]
Message-ID: <Yw4GBmZWfHQNgr75@boxer> (raw)
In-Reply-To: <20220830123803.9361-2-maciej.fijalkowski@intel.com>

On Tue, Aug 30, 2022 at 02:38:02PM +0200, Maciej Fijalkowski wrote:
> AF_XDP Tx descriptor cleaning in ice driver currently works in a "lazy"
> way - descriptors are not cleaned immediately after send. We rather hold
> on with cleaning until we see that free space in ring drops below
> particular threshold. This was supposed to reduce the amount of
> unnecessary work related to cleaning and instead of keeping the ring
> empty, ring was rather saturated.
> 
> In AF_XDP realm cleaning Tx descriptors implies producing them to CQ.
> This is a way of letting know user space that particular descriptor has
> been sent, as John points out in [0].
> 
> We tried to implement serial descriptor cleaning which would be used in
> conjunction with batched cleaning but it made code base more convoluted
> and probably harder to maintain in future. Therefore we step away from
> batched cleaning in a current form in favor of an approach where we set
> RS bit on every last descriptor from a batch and clean always at the
> beginning of ice_xmit_zc().
> 
> This means that we give up a bit of Tx performance, but this doesn't
> hurt l2fwd scenario due to the fact that Tx side is much faster than Rx
> and Rx is the one that has to catch Tx up. txonly can be treaten as
> AF_XDP based packet generator.
> 
> FWIW Tx descriptors are still produced in a batched way.
> 
> Fixes: 126cdfe1007a ("ice: xsk: Improve AF_XDP ZC Tx and use batching API")
> [0]: https://lore.kernel.org/bpf/62b0a20232920_3573208ab@john.notmuch/
> 
> Fixes: 126cdfe1007a ("ice: xsk: Improve AF_XDP ZC Tx and use batching API")

Ugh too much of a fixes tag. I'll send a v2.

> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_txrx.c |   2 +-
>  drivers/net/ethernet/intel/ice/ice_xsk.c  | 143 +++++++++-------------
>  drivers/net/ethernet/intel/ice/ice_xsk.h  |   7 +-
>  3 files changed, 64 insertions(+), 88 deletions(-)
> 

  reply	other threads:[~2022-08-30 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 12:38 [PATCH intel-net 0/2] ice: xsk: ZC changes Maciej Fijalkowski
2022-08-30 12:38 ` [PATCH intel-net 1/2] ice: xsk: change batched Tx descriptor cleaning Maciej Fijalkowski
2022-08-30 12:43   ` Maciej Fijalkowski [this message]
2022-08-30 12:38 ` [PATCH intel-net 2/2] ice: xsk: drop power of 2 ring size restriction for AF_XDP Maciej Fijalkowski
2022-09-27  2:53   ` [Intel-wired-lan] " Kuruvinakunnel, George

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=Yw4GBmZWfHQNgr75@boxer \
    --to=maciej.fijalkowski@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox