diff options
author | Eric Dumazet <edumazet@google.com> | 2023-01-06 17:25:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-01-09 10:37:07 +0300 |
commit | 7871f54e3deed68a27111dda162c4fe9b9c65f8f (patch) | |
tree | e4f5c38ed70c2c5ead9514590fcfacf8193582df /net | |
parent | 9dab880d675b9d0dd56c6428e4e8352a3339371d (diff) | |
download | linux-7871f54e3deed68a27111dda162c4fe9b9c65f8f.tar.xz |
gro: take care of DODGY packets
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: 5eddb24901ee ("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>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/gro.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/gro.c b/net/core/gro.c index fd8c6a7e8d3e..506f83d715f8 100644 --- a/net/core/gro.c +++ b/net/core/gro.c @@ -505,8 +505,9 @@ found_ptype: 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; } |