udp: properly flush normal packet at GRO time
Subsystems (2)
Paolo Abeni
maintainerPATCH 1/1 udp: properly flush normal packet at GRO time
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 traverseskb_gro_flush_final().
--- net/ipv4/udp_offload.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/ipv4/udp_offload.c +4 -2
@@ -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 ||
Signature · 1 line
2.26.3
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 9 lines · 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