Message ID | 1326901345.2316.27.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
* Eric Dumazet > Following patch is a good compromise, since it disables gso on the > socket on the first frame we consider too big in ip6_fragment(). > > So the added check on dst_allfrag() is only done once per socket, > instead of adding in sk_can_gso(sk) in fast path. > > I can now let gso on on the device, and still have good transfert speed > on sockets hitting the ALLFRAG feature. I can both confirm that I too saw abysmal performance when using the default offload settings (with your two earlier patches applied only), and also that applying this patch in addition fixes the problem, with no apparent ill effects. Thanks! Best regards,
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index d97e071..e058747 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -647,8 +647,12 @@ int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) * or if the skb it not generated by a local socket. */ if (!skb->local_df && skb->len > mtu) { + + if (skb->sk && dst_allfrag(skb_dst(skb))) + sk_nocaps_add(skb->sk, NETIF_F_GSO_MASK); + skb->dev = skb_dst(skb)->dev; icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_FRAGFAILS);