summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h17
-rw-r--r--include/linux/skbuff.h6
2 files changed, 16 insertions, 7 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index aa2d3c12c4d8..85f99f60deea 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -313,10 +313,12 @@ struct net_device
/* Segmentation offload features */
#define NETIF_F_GSO_SHIFT 16
+#define NETIF_F_GSO_MASK 0xffff0000
#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
-#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT)
+#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)
#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
-#define NETIF_F_TSO_ECN (SKB_GSO_TCPV4_ECN << NETIF_F_GSO_SHIFT)
+#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
+#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
@@ -991,13 +993,18 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
extern void linkwatch_run_queue(void);
-static inline int skb_gso_ok(struct sk_buff *skb, int features)
+static inline int net_gso_ok(int features, int gso_type)
{
- int feature = skb_shinfo(skb)->gso_size ?
- skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0;
+ int feature = gso_type << NETIF_F_GSO_SHIFT;
return (features & feature) == feature;
}
+static inline int skb_gso_ok(struct sk_buff *skb, int features)
+{
+ return net_gso_ok(features, skb_shinfo(skb)->gso_size ?
+ skb_shinfo(skb)->gso_type : 0);
+}
+
static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
{
return !skb_gso_ok(skb, dev->features);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 59918be91d0a..57d7d4965f9a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -171,13 +171,15 @@ enum {
enum {
SKB_GSO_TCPV4 = 1 << 0,
- SKB_GSO_UDPV4 = 1 << 1,
+ SKB_GSO_UDP = 1 << 1,
/* This indicates the skb is from an untrusted source. */
SKB_GSO_DODGY = 1 << 2,
/* This indicates the tcp segment has CWR set. */
- SKB_GSO_TCPV4_ECN = 1 << 3,
+ SKB_GSO_TCP_ECN = 1 << 3,
+
+ SKB_GSO_TCPV6 = 1 << 4,
};
/**