From: Jesper Dangaard Brouer <hawk@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>,
Tianyi Gao <tianyi@cloudflare.com>
Cc: netdev@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, toke@redhat.com, horms@kernel.org,
bpf@vger.kernel.org, shuah@kernel.org,
kernel-team@cloudflare.com, ast@kernel.org, daniel@iogearbox.net,
john.fastabend@gmail.com, sdf@fomichev.me,
linux-kselftest@vger.kernel.org, bochaolucky@gmail.com,
toshiaki.makita1@gmail.com
Subject: Re: [PATCH net 1/2] veth: schedule the peer's NAPI after XDP_TX when only GRO is enabled
Date: Mon, 19 Oct 2026 11:58:16 +0200 [thread overview]
Message-ID: <746ba331-0a9f-46ed-8faf-d432bec5c8c6@kernel.org> (raw)
In-Reply-To: <atSMqdB52V494aYn@lore-desk>
On 10/18/26 11:08, Lorenzo Bianconi wrote:
>> veth_xdp_xmit() queues XDP_TX frames on the peer's ring if the peer has
>> NAPI. A peer with GRO enabled and no XDP program also has NAPI.
>>
>> veth_xdp_flush() then schedules the peer's NAPI, but only if the peer's
>> xdp_prog is set, so for such a peer the frames are never processed.
>> Nothing else schedules that NAPI by default.
>>
>> Once the ring is full, every XDP_TX frame is dropped, and so are the
>> skbs that veth_xmit() queues on the same ring.
>>
>> Commit 0e672f306a28 ("veth: check for NAPI instead of xdp_prog before
>> xmit of XDP frame") changed the check in veth_xdp_xmit() but not the one
>> in veth_xdp_flush(). Make veth_xdp_flush() check the napi pointer
>> instead of xdp_prog, as veth_xdp_xmit() does.
>>
>> Fixes: 0e672f306a28 ("veth: check for NAPI instead of xdp_prog before xmit of XDP frame")
>> Signed-off-by: Tianyi Gao <tianyi@cloudflare.com>
>
> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
LGTM
Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
>> ---
>> drivers/net/veth.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
>> index 643b97dc5245..9405ffac598a 100644
>> --- a/drivers/net/veth.c
>> +++ b/drivers/net/veth.c
>> @@ -612,7 +612,7 @@ static void veth_xdp_flush(struct veth_rq *rq, struct veth_xdp_tx_bq *bq)
>> rcv_priv = netdev_priv(rcv);
>> rcv_rq = &rcv_priv->rq[veth_select_rxq(rcv)];
>> /* xdp_ring is initialized on receive side? */
>> - if (unlikely(!rcu_access_pointer(rcv_rq->xdp_prog)))
>> + if (unlikely(!rcu_access_pointer(rcv_rq->napi)))
>> goto out;
>>
>> __veth_xdp_flush(rcv_rq);
>> --
>> 2.55.0
>>
next prev parent reply other threads:[~2026-10-19 9:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 21:42 [PATCH net 0/2] veth: schedule the peer's NAPI after XDP_TX when only GRO is enabled Tianyi Gao
2026-10-16 21:42 ` [PATCH net 1/2] " Tianyi Gao
2026-10-17 23:32 ` Mohsin Bashir
2026-10-18 9:08 ` Lorenzo Bianconi
2026-10-19 9:58 ` Jesper Dangaard Brouer [this message]
2026-10-16 21:42 ` [PATCH net 2/2] selftests: net: veth: test XDP_TX to a peer with GRO enabled Tianyi Gao
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=746ba331-0a9f-46ed-8faf-d432bec5c8c6@kernel.org \
--to=hawk@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bochaolucky@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@cloudflare.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=tianyi@cloudflare.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.