* [PATCH net] udp: properly flush normal packet at GRO time
@ 2021-07-02 22:38 Paolo Abeni
2021-07-02 23:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Abeni @ 2021-07-02 22:38 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Jakub Kicinski, David Ahern, Willem de Bruijn,
Matthias Treydte
If an UDP packet enters the GRO engine but is not eligible
for aggregation and is not targeting an UDP tunnel,
udp_gro_receive() will not set the flush bit, and packet
could delayed till the next napi flush.
Fix the issue ensuring non GROed packets traverse
skb_gro_flush_final().
Reported-and-tested-by: Matthias Treydte <mt@waldheinz.de>
Fixes: 18f25dc39990 ("udp: skip L4 aggregation for UDP tunnel packets")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
net/ipv4/udp_offload.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 7a670757f37a..b3aabc886763 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -551,8 +551,10 @@ struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,
if ((!sk && (skb->dev->features & NETIF_F_GRO_UDP_FWD)) ||
(sk && udp_sk(sk)->gro_enabled) || NAPI_GRO_CB(skb)->is_flist)
- pp = call_gro_receive(udp_gro_receive_segment, head, skb);
- return pp;
+ return call_gro_receive(udp_gro_receive_segment, head, skb);
+
+ /* no GRO, be sure flush the current packet */
+ goto out;
}
if (NAPI_GRO_CB(skb)->encap_mark ||
--
2.26.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] udp: properly flush normal packet at GRO time
2021-07-02 22:38 [PATCH net] udp: properly flush normal packet at GRO time Paolo Abeni
@ 2021-07-02 23:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-02 23:30 UTC (permalink / raw)
To: Paolo Abeni; +Cc: netdev, davem, kuba, dsahern, willemb, mt
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Sat, 3 Jul 2021 00:38:43 +0200 you wrote:
> If an UDP packet enters the GRO engine but is not eligible
> for aggregation and is not targeting an UDP tunnel,
> udp_gro_receive() will not set the flush bit, and packet
> could delayed till the next napi flush.
>
> Fix the issue ensuring non GROed packets traverse
> skb_gro_flush_final().
>
> [...]
Here is the summary with links:
- [net] udp: properly flush normal packet at GRO time
https://git.kernel.org/netdev/net/c/b43c8909be52
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-02 23:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-02 22:38 [PATCH net] udp: properly flush normal packet at GRO time Paolo Abeni
2021-07-02 23:30 ` patchwork-bot+netdevbpf
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.