[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1326901345.2316.27.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
Date: Wed, 18 Jan 2012 16:42:25 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Tore Anderson <tore@....no>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: Bugzilla 42595
Le mercredi 18 janvier 2012 à 15:42 +0100, Eric Dumazet a écrit :
> It seems that if you try to have the default ethtool settings (tso, gso,
> tx checksum ... on), transfert is very slow... I am investigating, but I
> suspect that if dst_allfrag() is true, we must disable gso as well.
>
>
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.
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);
kfree_skb(skb);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists