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]
Message-ID: <DB6PR04MB3141CE3CEC1A59134FE96272887C9@DB6PR04MB3141.eurprd04.prod.outlook.com>
Date:   Fri, 19 May 2023 01:27:11 +0000
From:   Wei Fang <wei.fang@....com>
To:     Lorenzo Bianconi <lorenzo.bianconi@...hat.com>,
        Simon Horman <simon.horman@...igine.com>
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>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>,
        Lorenzo Bianconi <lorenzo@...nel.org>
Subject: RE: [PATCH net-next] net: fec: turn on XDP features

> -----Original Message-----
> From: Lorenzo Bianconi <lorenzo.bianconi@...hat.com>
> Sent: 2023年5月19日 4:16
> To: Simon Horman <simon.horman@...igine.com>
> Cc: Wei Fang <wei.fang@....com>; 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;
> linux-kernel@...r.kernel.org; bpf@...r.kernel.org; dl-linux-imx
> <linux-imx@....com>; Lorenzo Bianconi <lorenzo@...nel.org>
> Subject: Re: [PATCH net-next] net: fec: turn on XDP features
> 
> > +Lorenzo
> >
> > On Thu, May 18, 2023 at 10:32:36PM +0800, wei.fang@....com wrote:
> > > From: Wei Fang <wei.fang@....com>
> > >
> > > The XDP features are supported since the commit 66c0e13ad236
> > > ("drivers: net: turn on XDP features"). Currently, the fec driver
> > > supports NETDEV_XDP_ACT_BASIC, NETDEV_XDP_ACT_REDIRECT and
> > > NETDEV_XDP_ACT_NDO_XMIT. So turn on these XDP features for fec
> > > driver.
> > >
> > > Signed-off-by: Wei Fang <wei.fang@....com>
> > > ---
> > >  drivers/net/ethernet/freescale/fec_main.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/net/ethernet/freescale/fec_main.c
> > > b/drivers/net/ethernet/freescale/fec_main.c
> > > index cd215ab20ff9..577affda6efa 100644
> > > --- a/drivers/net/ethernet/freescale/fec_main.c
> > > +++ b/drivers/net/ethernet/freescale/fec_main.c
> > > @@ -4030,6 +4030,8 @@ static int fec_enet_init(struct net_device *ndev)
> > >  	}
> > >
> > >  	ndev->hw_features = ndev->features;
> > > +	ndev->xdp_features = NETDEV_XDP_ACT_BASIC |
> NETDEV_XDP_ACT_REDIRECT |
> > > +			     NETDEV_XDP_ACT_NDO_XMIT;
> 
> should we check FEC_QUIRK_SWAP_FRAME here? something like:
> 
> 	if (!(fep->quirks & FEC_QUIRK_SWAP_FRAME)
> 		ndev->xdp_features = NETDEV_XDP_ACT_BASIC |
> 				     NETDEV_XDP_ACT_REDIRECT |
> 				     NETDEV_XDP_ACT_NDO_XMIT;
> 
> 
It's really a good suggestion, thank you so much!

> > >
> > >  	fec_restart(ndev);
> > >
> > > --
> > > 2.25.1
> > >
> > >
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ