You need to sign in or sign up before continuing.
提交 7871f54e 编写于 作者: E Eric Dumazet 提交者: David S. Miller

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: 5eddb249 ("gro: add support of (hw)gro packets to gro stack")
Signed-off-by: NEric Dumazet <edumazet@google.com>
Reported-and-bisected-by: NJaroslav Pulchart <jaroslav.pulchart@gooddata.com>
Cc: Coco Li <lixiaoyan@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9dab880d
...@@ -505,8 +505,9 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff ...@@ -505,8 +505,9 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
NAPI_GRO_CB(skb)->count = 1; NAPI_GRO_CB(skb)->count = 1;
if (unlikely(skb_is_gso(skb))) { if (unlikely(skb_is_gso(skb))) {
NAPI_GRO_CB(skb)->count = skb_shinfo(skb)->gso_segs; NAPI_GRO_CB(skb)->count = skb_shinfo(skb)->gso_segs;
/* Only support TCP at the moment. */ /* Only support TCP and non DODGY users. */
if (!skb_is_gso_tcp(skb)) if (!skb_is_gso_tcp(skb) ||
(skb_shinfo(skb)->gso_type & SKB_GSO_DODGY))
NAPI_GRO_CB(skb)->flush = 1; NAPI_GRO_CB(skb)->flush = 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册