From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
netdev@vger.kernel.org, nbd@nbd.name, john@phrozen.org,
sean.wang@mediatek.com, Mark-MC.Lee@mediatek.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
matthias.bgg@gmail.com, linux-mediatek@lists.infradead.org,
ilias.apalodimas@linaro.org, jbrouer@redhat.com
Subject: Re: [PATCH v3 net-next 2/5] net: ethernet: mtk_eth_soc: add basic XDP support
Date: Tue, 19 Jul 2022 12:31:03 +0200 [thread overview]
Message-ID: <YtaH523Jz39smaNO@localhost.localdomain> (raw)
In-Reply-To: <5b6d4061bd12a9079e882742c750962816ee6567.camel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]
> On Sat, 2022-07-16 at 09:34 +0200, Lorenzo Bianconi wrote:
> > Introduce basic XDP support to mtk_eth_soc driver.
> > Supported XDP verdicts:
> > - XDP_PASS
> > - XDP_DROP
> > - XDP_REDIRECT
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> > drivers/net/ethernet/mediatek/mtk_eth_soc.c | 147 +++++++++++++++++---
> > drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +
> > 2 files changed, 131 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > index 9a92d602ebd5..bc3a7dcab207 100644
> > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > @@ -1494,11 +1494,44 @@ static void mtk_rx_put_buff(struct mtk_rx_ring *ring, void *data, bool napi)
> > skb_free_frag(data);
> > }
> >
> > +static u32 mtk_xdp_run(struct mtk_eth *eth, struct mtk_rx_ring *ring,
> > + struct xdp_buff *xdp, struct net_device *dev)
> > +{
> > + struct bpf_prog *prog = rcu_dereference(eth->prog);
>
> It looks like here you need to acquire the RCU read lock. lockdep
> should splat otherwise.
ack, I will fix it in the next version.
Regards,
Lorenzo
>
> /P
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2022-07-19 10:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-16 7:34 [PATCH v3 net-next 0/5] mtk_eth_soc: add xdp support Lorenzo Bianconi
2022-07-16 7:34 ` [PATCH v3 net-next 1/5] net: ethernet: mtk_eth_soc: rely on page_pool for single page buffers Lorenzo Bianconi
2022-07-16 7:34 ` [PATCH v3 net-next 2/5] net: ethernet: mtk_eth_soc: add basic XDP support Lorenzo Bianconi
2022-07-19 9:22 ` Paolo Abeni
2022-07-19 10:31 ` Lorenzo Bianconi [this message]
2022-07-16 7:34 ` [PATCH v3 net-next 3/5] net: ethernet: mtk_eth_soc: introduce xdp ethtool counters Lorenzo Bianconi
2022-07-16 7:34 ` [PATCH v3 net-next 4/5] net: ethernet: mtk_eth_soc: add xmit XDP support Lorenzo Bianconi
2022-07-16 7:34 ` [PATCH v3 net-next 5/5] net: ethernet: mtk_eth_soc: add support for page_pool_get_stats Lorenzo Bianconi
2022-07-19 9:26 ` Paolo Abeni
2022-07-19 10:18 ` Lorenzo Bianconi
2022-07-19 13:58 ` Paolo Abeni
2022-07-19 14:02 ` Lorenzo Bianconi
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=YtaH523Jz39smaNO@localhost.localdomain \
--to=lorenzo.bianconi@redhat.com \
--cc=Mark-MC.Lee@mediatek.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jbrouer@redhat.com \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sean.wang@mediatek.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).