From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Simon Horman <simon.horman@corigine.com>
Cc: wei.fang@nxp.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
shenwei.wang@nxp.com, xiaoning.wang@nxp.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, linux-imx@nxp.com,
Lorenzo Bianconi <lorenzo@kernel.org>
Subject: Re: [PATCH net-next] net: fec: turn on XDP features
Date: Thu, 18 May 2023 22:15:52 +0200 [thread overview]
Message-ID: <ZGaHeGUwFdWDthh4@lore-desk> (raw)
In-Reply-To: <ZGZkmvX0OLI+4fqY@corigine.com>
[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]
> +Lorenzo
>
> On Thu, May 18, 2023 at 10:32:36PM +0800, wei.fang@nxp.com wrote:
> > From: Wei Fang <wei.fang@nxp.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@nxp.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;
Regards,
Lorenzo
> >
> > fec_restart(ndev);
> >
> > --
> > 2.25.1
> >
> >
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-05-18 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 14:32 [PATCH net-next] net: fec: turn on XDP features wei.fang
2023-05-18 17:47 ` Simon Horman
2023-05-18 20:15 ` Lorenzo Bianconi [this message]
2023-05-19 1:27 ` Wei Fang
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=ZGaHeGUwFdWDthh4@lore-desk \
--to=lorenzo.bianconi@redhat.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
--cc=simon.horman@corigine.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
/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;
as well as URLs for NNTP newsgroup(s).