lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH0PR11MB5144EA7C4111E52713BABD1BE24F9@PH0PR11MB5144.namprd11.prod.outlook.com>
Date:   Wed, 21 Sep 2022 04:42:02 +0000
From:   "Kuruvinakunnel, George" <george.kuruvinakunnel@...el.com>
To:     "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC:     "alasdair.mcwilliam@...look.com" <alasdair.mcwilliam@...look.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH v3 intel-net 1/2] ice: xsk: change
 batched Tx descriptor cleaning

> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Maciej
> Fijalkowski
> Sent: Thursday, September 1, 2022 4:11 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: alasdair.mcwilliam@...look.com; netdev@...r.kernel.org;
> bpf@...r.kernel.org; Karlsson, Magnus <magnus.karlsson@...el.com>
> Subject: [Intel-wired-lan] [PATCH v3 intel-net 1/2] ice: xsk: change batched Tx
> descriptor cleaning
> 
> 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 which is way more meaningful than txonly as this can be treaten as
> AF_XDP based packet generator. l2fwd is not hurt due to the fact that Tx side is
> much faster than Rx and Rx is the one that has to catch Tx up.
> 
> FWIW Tx descriptors are still produced in a batched way.
> 
> [0]: https://lore.kernel.org/bpf/62b0a20232920_3573208ab@john.notmuch/
> 
> Fixes: 126cdfe1007a ("ice: xsk: Improve AF_XDP ZC Tx and use batching API")
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@...el.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(-)
> 

Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ