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: <AM5PR04MB313999EB0E85DFE30F071317882FA@AM5PR04MB3139.eurprd04.prod.outlook.com>
Date:   Wed, 5 Jul 2023 06:31:00 +0000
From:   Wei Fang <wei.fang@....com>
To:     Toke HİŞiland-JİŞrgensen 
        <toke@...hat.com>, Andrew Lunn <andrew@...n.ch>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "hawk@...nel.org" <hawk@...nel.org>,
        "john.fastabend@...il.com" <john.fastabend@...il.com>,
        Shenwei Wang <shenwei.wang@....com>,
        Clark Wang <xiaoning.wang@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>
Subject: RE: [PATCH net 1/3] net: fec: dynamically set the
 NETDEV_XDP_ACT_NDO_XMIT feature of XDP

> -----Original Message-----
> From: Toke HİŞiland-JİŞrgensen <toke@...hat.com>
> Sent: 2023Ò´7êĊ5ìí 7:54
> To: Andrew Lunn <andrew@...n.ch>; Wei Fang <wei.fang@....com>
> Cc: 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; Shenwei Wang
> <shenwei.wang@....com>; Clark Wang <xiaoning.wang@....com>;
> netdev@...r.kernel.org; dl-linux-imx <linux-imx@....com>;
> linux-kernel@...r.kernel.org; bpf@...r.kernel.org
> Subject: Re: [PATCH net 1/3] net: fec: dynamically set the
> NETDEV_XDP_ACT_NDO_XMIT feature of XDP
> 
> Andrew Lunn <andrew@...n.ch> writes:
> 
> > On Tue, Jul 04, 2023 at 04:29:14PM +0800, wei.fang@....com wrote:
> >> From: Wei Fang <wei.fang@....com>
> >>
> >> When a XDP program is installed or uninstalled, fec_restart() will be
> >> invoked to reset MAC and buffer descriptor rings. It's reasonable not
> >> to transmit any packet during the process of reset. However, the
> >> NETDEV_XDP_ACT_NDO_XMIT bit of xdp_features is enabled by default,
> >> that is to say, it's possible that the fec_enet_xdp_xmit() will be
> >> invoked even if the process of reset is not finished. In this case,
> >> the redirected XDP frames might be dropped and available transmit BDs
> >> may be incorrectly deemed insufficient. So this patch disable the
> >> NETDEV_XDP_ACT_NDO_XMIT feature by default and dynamically
> configure
> >> this feature when the bpf program is installed or uninstalled.
> >
> > I don't know much about XDP, so please excuse what might be a stupid
> > question.
> >
> > Is this a generic issue? Should this
> > xdp_features_clear_redirect_target(dev) /
> > xdp_features_set_redirect_target(dev, false) be done in the core?
> 
> No, because not all drivers require an XDP program to be attached to support
> being a redirect target (which is one of the reasons we introduced these
> feature bits in the first place :)).
> 

Hi Toke,
Thanks for your explanation so much. :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ