Re: gso: Attempt to handle mega-GRO packets

Eric Dumazet
2013-11-07T07:11:04Z

On Thu, 2013-11-07 at 08:43 +0800, Herbert Xu wrote:

> - if (fskb != skb_shinfo(skb)->frag_list)
> - goto perform_csum_check;
> + if (fskb != skb_shinfo(skb)->frag_list) {
> + struct sk_buff *nsegs;
> +
> + if (nskb->len == len + doffset)
> + goto perform_csum_check;
> +
> + if (skb_has_frag_list(nskb)) {
> + net_warn_ratelimited(
> + "skb_segment: "
> + "nested frag_list detected\n");
> + kfree(nskb);
> + err = -EINVAL;
> + goto err;
> + }
> +
> + __skb_pull(nskb, doffset);
> + skb_shinfo(nskb)->gso_size = mss;
> + nsegs = skb_segment(nskb, features);
> +

This still assumes each skb found in frag_list has a exact multiple of
@mss bytes, and that the initial skb also ends at a right boundary.