]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/net/dst.h
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[karo-tx-linux.git] / include / net / dst.h
index 0a9a723f6c19ba28a268c0885c5a0b186bf45a4d..9261d928303d475a8ef2772144f9f70e0febda49 100644 (file)
@@ -44,7 +44,6 @@ struct dst_entry {
 #else
        void                    *__pad1;
 #endif
-       struct lwtunnel_state   *lwtstate;
        int                     (*input)(struct sk_buff *);
        int                     (*output)(struct sock *sk, struct sk_buff *skb);
 
@@ -85,11 +84,12 @@ struct dst_entry {
        __u32                   __pad2;
 #endif
 
+#ifdef CONFIG_64BIT
+       struct lwtunnel_state   *lwtstate;
        /*
         * Align __refcnt to a 64 bytes alignment
         * (L1_CACHE_SIZE would be too much)
         */
-#ifdef CONFIG_64BIT
        long                    __pad_to_align_refcnt[1];
 #endif
        /*
@@ -99,6 +99,9 @@ struct dst_entry {
        atomic_t                __refcnt;       /* client references    */
        int                     __use;
        unsigned long           lastuse;
+#ifndef CONFIG_64BIT
+       struct lwtunnel_state   *lwtstate;
+#endif
        union {
                struct dst_entry        *next;
                struct rtable __rcu     *rt_next;
@@ -204,6 +207,12 @@ static inline void dst_metric_set(struct dst_entry *dst, int metric, u32 val)
                p[metric-1] = val;
 }
 
+/* Kernel-internal feature bits that are unallocated in user space. */
+#define DST_FEATURE_ECN_CA     (1 << 31)
+
+#define DST_FEATURE_MASK       (DST_FEATURE_ECN_CA)
+#define DST_FEATURE_ECN_MASK   (DST_FEATURE_ECN_CA | RTAX_FEATURE_ECN)
+
 static inline u32
 dst_feature(const struct dst_entry *dst, u32 feature)
 {
@@ -286,13 +295,18 @@ static inline void skb_dst_drop(struct sk_buff *skb)
        }
 }
 
-static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb)
+static inline void __skb_dst_copy(struct sk_buff *nskb, unsigned long refdst)
 {
-       nskb->_skb_refdst = oskb->_skb_refdst;
+       nskb->_skb_refdst = refdst;
        if (!(nskb->_skb_refdst & SKB_DST_NOREF))
                dst_clone(skb_dst(nskb));
 }
 
+static inline void skb_dst_copy(struct sk_buff *nskb, const struct sk_buff *oskb)
+{
+       __skb_dst_copy(nskb, oskb->_skb_refdst);
+}
+
 /**
  * skb_dst_force - makes sure skb dst is refcounted
  * @skb: buffer