nsproxy: remove INIT_NSPROXY()
[safe/jmp/linux-2.6] / include / linux / skbuff.h
index f2c69a2..03f816a 100644 (file)
@@ -299,12 +299,11 @@ typedef unsigned char *sk_buff_data_t;
  *     @nfctinfo: Relationship of this skb to the connection
  *     @nfct_reasm: netfilter conntrack re-assembly pointer
  *     @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
- *     @iif: ifindex of device we arrived on
+ *     @skb_iif: ifindex of device we arrived on
  *     @queue_mapping: Queue mapping for multiqueue devices
  *     @tc_index: Traffic control index
  *     @tc_verd: traffic control verdict
  *     @ndisc_nodetype: router type (from link layer)
- *     @do_not_encrypt: set to prevent encryption of this frame
  *     @dma_cookie: a cookie to one of several possible DMA operations
  *             done by skb DMA functions
  *     @secmark: security marking
@@ -316,22 +315,23 @@ struct sk_buff {
        struct sk_buff          *next;
        struct sk_buff          *prev;
 
-       struct sock             *sk;
        ktime_t                 tstamp;
+
+       struct sock             *sk;
        struct net_device       *dev;
 
-       unsigned long           _skb_dst;
-#ifdef CONFIG_XFRM
-       struct  sec_path        *sp;
-#endif
        /*
         * This is the control buffer. It is free to use for every
         * layer. Please put your private variables there. If you
         * want to keep them across layers you have to do a skb_clone()
         * first. This is owned by whoever has the skb queued ATM.
         */
-       char                    cb[48];
+       char                    cb[48] __aligned(8);
 
+       unsigned long           _skb_dst;
+#ifdef CONFIG_XFRM
+       struct  sec_path        *sp;
+#endif
        unsigned int            len,
                                data_len;
        __u16                   mac_len,
@@ -367,8 +367,7 @@ struct sk_buff {
        struct nf_bridge_info   *nf_bridge;
 #endif
 
-       int                     iif;
-       __u16                   queue_mapping;
+       int                     skb_iif;
 #ifdef CONFIG_NET_SCHED
        __u16                   tc_index;       /* traffic control index */
 #ifdef CONFIG_NET_CLS_ACT
@@ -377,15 +376,13 @@ struct sk_buff {
 #endif
 
        kmemcheck_bitfield_begin(flags2);
+       __u16                   queue_mapping:16;
 #ifdef CONFIG_IPV6_NDISC_NODETYPE
        __u8                    ndisc_nodetype:2;
 #endif
-#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
-       __u8                    do_not_encrypt:1;
-#endif
        kmemcheck_bitfield_end(flags2);
 
-       /* 0/13/14 bit hole */
+       /* 0/14 bit hole */
 
 #ifdef CONFIG_NET_DMA
        dma_cookie_t            dma_cookie;
@@ -393,8 +390,10 @@ struct sk_buff {
 #ifdef CONFIG_NETWORK_SECMARK
        __u32                   secmark;
 #endif
-
-       __u32                   mark;
+       union {
+               __u32           mark;
+               __u32           dropcount;
+       };
 
        __u16                   vlan_tci;
 
@@ -418,14 +417,6 @@ struct sk_buff {
 
 #include <asm/system.h>
 
-#ifdef CONFIG_HAS_DMA
-#include <linux/dma-mapping.h>
-extern int skb_dma_map(struct device *dev, struct sk_buff *skb,
-                      enum dma_data_direction dir);
-extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb,
-                         enum dma_data_direction dir);
-#endif
-
 static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
 {
        return (struct dst_entry *)skb->_skb_dst;
@@ -493,8 +484,7 @@ extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
                        int len,int odd, struct sk_buff *skb),
                        void *from, int length);
 
-struct skb_seq_state
-{
+struct skb_seq_state {
        __u32           lower_offset;
        __u32           upper_offset;
        __u32           frag_idx;
@@ -749,7 +739,7 @@ static inline struct sk_buff *skb_unshare(struct sk_buff *skb,
 }
 
 /**
- *     skb_peek
+ *     skb_peek - peek at the head of an &sk_buff_head
  *     @list_: list to peek at
  *
  *     Peek an &sk_buff. Unlike most other operations you _MUST_
@@ -770,7 +760,7 @@ static inline struct sk_buff *skb_peek(struct sk_buff_head *list_)
 }
 
 /**
- *     skb_peek_tail
+ *     skb_peek_tail - peek at the tail of an &sk_buff_head
  *     @list_: list to peek at
  *
  *     Peek an &sk_buff. Unlike most other operations you _MUST_
@@ -1493,6 +1483,16 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
        return __netdev_alloc_skb(dev, length, GFP_ATOMIC);
 }
 
+static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
+               unsigned int length)
+{
+       struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
+
+       if (NET_IP_ALIGN && skb)
+               skb_reserve(skb, NET_IP_ALIGN);
+       return skb;
+}
+
 extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask);
 
 /**
@@ -1761,6 +1761,8 @@ extern int               skb_copy_datagram_const_iovec(const struct sk_buff *from,
                                                     int to_offset,
                                                     int size);
 extern void           skb_free_datagram(struct sock *sk, struct sk_buff *skb);
+extern void           skb_free_datagram_locked(struct sock *sk,
+                                               struct sk_buff *skb);
 extern int            skb_kill_datagram(struct sock *sk, struct sk_buff *skb,
                                         unsigned int flags);
 extern __wsum         skb_checksum(const struct sk_buff *skb, int offset,