From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
bpf@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net,
kuba@kernel.org, ast@kernel.org, daniel@iogearbox.net,
brouer@redhat.com, toke@redhat.com, echaudro@redhat.com,
toshiaki.makita1@gmail.com, andrii@kernel.org
Subject: Re: [PATCH v2 bpf-next 3/3] veth: allow jumbo frames in xdp mode
Date: Tue, 22 Feb 2022 19:03:26 +0100 [thread overview]
Message-ID: <YhUlbui5VNCG0p7h@lore-desk> (raw)
In-Reply-To: <0c9bc29843cd1697aa89ebceb61b8efe8156a9e8.camel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1941 bytes --]
> On Tue, 2022-02-15 at 14:08 +0100, Lorenzo Bianconi wrote:
> > Allow increasing the MTU over page boundaries on veth devices
> > if the attached xdp program declares to support xdp fragments.
> > Enable NETIF_F_ALL_TSO when the device is running in xdp mode.
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> > drivers/net/veth.c | 26 +++++++++++---------------
> > 1 file changed, 11 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> > index a45aaaecc21f..2e048f957bc6 100644
> > --- a/drivers/net/veth.c
> > +++ b/drivers/net/veth.c
> > @@ -292,8 +292,6 @@ static int veth_forward_skb(struct net_device *dev, struct sk_buff *skb,
> > /* return true if the specified skb has chances of GRO aggregation
> > * Don't strive for accuracy, but try to avoid GRO overhead in the most
> > * common scenarios.
> > - * When XDP is enabled, all traffic is considered eligible, as the xmit
> > - * device has TSO off.
> > * When TSO is enabled on the xmit device, we are likely interested only
> > * in UDP aggregation, explicitly check for that if the skb is suspected
> > * - the sock_wfree destructor is used by UDP, ICMP and XDP sockets -
> > @@ -334,7 +332,8 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
> > * Don't bother with napi/GRO if the skb can't be aggregated
> > */
> > use_napi = rcu_access_pointer(rq->napi) &&
> > - veth_skb_is_eligible_for_gro(dev, rcv, skb);
> > + (rcu_access_pointer(rq->xdp_prog) ||
> > + veth_skb_is_eligible_for_gro(dev, rcv, skb));
>
> Sorry for the late feedback. I think the code would be more readable if
> you move the additional check inside 'veth_skb_is_eligible_for_gro' and
> adjust veth_skb_is_eligible_for_gro() comment accordingly.
Hi Paolo,
sure, will do in v3.
Regards,
Lorenzo
>
> Thanks!
>
> Paolo
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2022-02-22 18:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 13:08 [PATCH v2 bpf-next 0/3] introduce xdp frags support to veth driver Lorenzo Bianconi
2022-02-15 13:08 ` [PATCH v2 bpf-next 1/3] net: veth: account total xdp_frame len running ndo_xdp_xmit Lorenzo Bianconi
2022-02-15 13:08 ` [PATCH v2 bpf-next 2/3] veth: rework veth_xdp_rcv_skb in order to accept non-linear skb Lorenzo Bianconi
2022-02-15 13:08 ` [PATCH v2 bpf-next 3/3] veth: allow jumbo frames in xdp mode Lorenzo Bianconi
2022-02-22 17:21 ` Paolo Abeni
2022-02-22 18:03 ` Lorenzo Bianconi [this message]
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=YhUlbui5VNCG0p7h@lore-desk \
--to=lorenzo.bianconi@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=echaudro@redhat.com \
--cc=kuba@kernel.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=toke@redhat.com \
--cc=toshiaki.makita1@gmail.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).