mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
gro: take care of DODGY packets
[ Upstream commit7871f54e3d] Jaroslav reported a recent throughput regression with virtio_net caused by blamed commit. It is unclear if DODGY GSO packets coming from user space can be accepted by GRO engine in the future with minimal changes, and if there is any expected gain from it. In the meantime, make sure to detect and flush DODGY packets. Fixes:5eddb24901("gro: add support of (hw)gro packets to gro stack") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-and-bisected-by: Jaroslav Pulchart <jaroslav.pulchart@gooddata.com> Cc: Coco Li <lixiaoyan@google.com> Cc: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
df9cddce8f
commit
0b1605e45c
|
|
@ -507,8 +507,9 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
|
|||
NAPI_GRO_CB(skb)->count = 1;
|
||||
if (unlikely(skb_is_gso(skb))) {
|
||||
NAPI_GRO_CB(skb)->count = skb_shinfo(skb)->gso_segs;
|
||||
/* Only support TCP at the moment. */
|
||||
if (!skb_is_gso_tcp(skb))
|
||||
/* Only support TCP and non DODGY users. */
|
||||
if (!skb_is_gso_tcp(skb) ||
|
||||
(skb_shinfo(skb)->gso_type & SKB_GSO_DODGY))
|
||||
NAPI_GRO_CB(skb)->flush = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user