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] [day] [month] [year] [list]
Date:   Thu, 17 Nov 2022 08:09:37 +0100
From:   Magnus Karlsson <magnus.karlsson@...il.com>
To:     Saeed Mahameed <saeed@...nel.org>
Cc:     Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
        Tony Nguyen <anthony.l.nguyen@...el.com>, davem@...emloft.net,
        kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com,
        Sylwester Dziedziuch <sylwesterx.dziedziuch@...el.com>,
        netdev@...r.kernel.org, magnus.karlsson@...el.com,
        bjorn@...nel.org, ast@...nel.org, daniel@...earbox.net,
        hawk@...nel.org, john.fastabend@...il.com, bpf@...r.kernel.org,
        Mateusz Palczewski <mateusz.palczewski@...el.com>,
        Shwetha Nagaraju <Shwetha.nagaraju@...el.com>
Subject: Re: [PATCH net 1/2] i40e: Fix failure message when XDP is configured
 in TX only mode

On Wed, Nov 16, 2022 at 11:30 PM Saeed Mahameed <saeed@...nel.org> wrote:
>
> On 15 Nov 13:13, Maciej Fijalkowski wrote:
> >On Mon, Nov 14, 2022 at 04:03:23PM -0800, Tony Nguyen wrote:
> >> From: Sylwester Dziedziuch <sylwesterx.dziedziuch@...el.com>
> >>
> >> When starting xdpsock program in TX only mode:
> >>
> >> samples/bpf/xdpsock -i <interface> -t
> >>
> >> there was an error on i40e driver:
> >>
> >> Failed to allocate some buffers on AF_XDP ZC enabled Rx ring 0 (pf_q 81)
> >>
> >> It was caused by trying to allocate RX buffers even though
> >> no RX buffers are available because we run in TX only mode.
> >>
> >> Fix this by checking for number of available buffers
> >> for RX queue when allocating buffers during XDP setup.
> >
> >I was not sure if we want to proceed with this or not. For sure it's not a
> >fix to me, behavior was not broken, txonly mode was working correctly.
> >We're only getting rid of the bogus message that caused confusion within
> >people.
> >
> >I feel that if we want that in then we should route this via -next and
> >address other drivers as well. Not sure what are Magnus' thoughts on this.
> >
> +1
>
> Some other driver might not have this print message issue, but it would be
> nice if the driver got some indication of the TX only nature so maybe we can
> cut some corners on napi and avoid even attempting to allocate the rx zc
> buffers.

This would save some resources for sure. We could add a field to the
XDP_SETUP_XSK_POOL command struct that is passed to the driver to
indicate if the socket has an Rx component and if it has a Tx
component. Just do not know how common it is to have a Tx only xsk
socket. Packet generators come to my mind, but what more?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ