]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
net: Add frag_list support to GSO
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 16 Dec 2008 07:27:47 +0000 (23:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Dec 2008 07:27:47 +0000 (23:27 -0800)
This patch allows GSO to handle frag_list in a limited way for the
purposes of allowing packets merged by GRO to be refragmented on
output.

Most hardware won't (and aren't expected to) support handling GRO
frag_list packets directly.  Therefore we will perform GSO in
software for those cases.

However, for drivers that can support it (such as virtual NICs) we
may not have to segment the packets at all.

Whether the added overhead of GRO/GSO is worthwhile for bridges
and routers when weighed against the benefit of potentially
increasing the MTU within the host is still an open question.
However, for the case of host nodes this is undoubtedly a win.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c

index b60c26b7d31c102b34dde1bc7d739757b7f10dda..bdf5465deb91963f47db9f882bc5ec9baf237648 100644 (file)
@@ -1858,6 +1858,8 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
 {
        return skb_is_gso(skb) &&
               (!skb_gso_ok(skb, dev->features) ||
+               (skb_shinfo(skb)->frag_list &&
+                !(dev->features & NETIF_F_FRAGLIST)) ||
                unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
 }
 
index f54cac76438a144d78ae50d63b2ef4f6e11ae048..e415f0b0d0d0fc0cafa7cbde8f523ff1c5e201bf 100644 (file)
@@ -1533,8 +1533,6 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
        __be16 type = skb->protocol;
        int err;
 
-       BUG_ON(skb_shinfo(skb)->frag_list);
-
        skb_reset_mac_header(skb);
        skb->mac_len = skb->network_header - skb->mac_header;
        __skb_pull(skb, skb->mac_len);