]> Pileus Git - ~andy/linux/blobdiff - include/linux/skbuff.h
ipv6: sit: add GSO/TSO support
[~andy/linux] / include / linux / skbuff.h
index 6d56840e561e48edd4a25d39c8445cd59ed1773e..2c154976394b8a50baec6b4f17486dfb32fdac28 100644 (file)
@@ -318,9 +318,13 @@ enum {
 
        SKB_GSO_GRE = 1 << 6,
 
-       SKB_GSO_UDP_TUNNEL = 1 << 7,
+       SKB_GSO_IPIP = 1 << 7,
 
-       SKB_GSO_MPLS = 1 << 8,
+       SKB_GSO_SIT = 1 << 8,
+
+       SKB_GSO_UDP_TUNNEL = 1 << 9,
+
+       SKB_GSO_MPLS = 1 << 10,
 };
 
 #if BITS_PER_LONG > 32
@@ -498,7 +502,7 @@ struct sk_buff {
         * headers if needed
         */
        __u8                    encapsulation:1;
-       /* 7/9 bit hole (depending on ndisc_nodetype presence) */
+       /* 6/8 bit hole (depending on ndisc_nodetype presence) */
        kmemcheck_bitfield_end(flags2);
 
 #if defined CONFIG_NET_DMA || defined CONFIG_NET_RX_BUSY_POLL
@@ -2062,6 +2066,8 @@ static inline void skb_frag_set_page(struct sk_buff *skb, int f,
        __skb_frag_set_page(&skb_shinfo(skb)->frags[f], page);
 }
 
+bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t prio);
+
 /**
  * skb_frag_dma_map - maps a paged fragment via the DMA API
  * @dev: the device to map the fragment to
@@ -2708,24 +2714,24 @@ static inline bool skb_rx_queue_recorded(const struct sk_buff *skb)
 u16 __skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb,
                  unsigned int num_tx_queues);
 
-#ifdef CONFIG_XFRM
 static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
 {
+#ifdef CONFIG_XFRM
        return skb->sp;
-}
 #else
-static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
-{
        return NULL;
-}
 #endif
+}
 
 /* Keeps track of mac header offset relative to skb->head.
  * It is useful for TSO of Tunneling protocol. e.g. GRE.
  * For non-tunnel skb it points to skb_mac_header() and for
- * tunnel skb it points to outer mac header. */
+ * tunnel skb it points to outer mac header.
+ * Keeps track of level of encapsulation of network headers.
+ */
 struct skb_gso_cb {
-       int mac_offset;
+       int     mac_offset;
+       int     encap_level;
 };
 #define SKB_GSO_CB(skb) ((struct skb_gso_cb *)(skb)->cb)
 
@@ -2755,6 +2761,7 @@ static inline bool skb_is_gso(const struct sk_buff *skb)
        return skb_shinfo(skb)->gso_size;
 }
 
+/* Note: Should be called only if skb_is_gso(skb) is true */
 static inline bool skb_is_gso_v6(const struct sk_buff *skb)
 {
        return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6;