]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/netdevice.h
[NET]: Add per-connection option to set max TSO frame size
[net-next-2.6.git] / include / linux / netdevice.h
index a2f003239c8570dd31e869eaa6aa7c0a985f9352..ced61f87660eeb2d3a529deaa50a664b9b5185d4 100644 (file)
@@ -724,6 +724,10 @@ struct net_device
        /* rtnetlink link ops */
        const struct rtnl_link_ops *rtnl_link_ops;
 
+       /* for setting kernel sock attribute on TCP connection setup */
+#define GSO_MAX_SIZE           65536
+       unsigned int            gso_max_size;
+
        /* The TX queue control structures */
        unsigned int                    egress_subqueue_count;
        struct net_device_subqueue      egress_subqueue[1];
@@ -1475,6 +1479,12 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
                unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
 }
 
+static inline void netif_set_gso_max_size(struct net_device *dev,
+                                         unsigned int size)
+{
+       dev->gso_max_size = size;
+}
+
 /* On bonding slaves other than the currently active slave, suppress
  * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and
  * ARP on active-backup slaves with arp_validate enabled.