summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorAlexey Dobriyan2008-10-28 21:24:06 +0100
committerDavid S. Miller2008-10-28 21:24:06 +0100
commitdef8b4faff5ca349beafbbfeb2c51f3602a6ef3a (patch)
treea90fbb0b6ae2a49c507465801f31df77bc5ebf9d /include/linux/skbuff.h
parentnetlink: constify struct nlattr * arg to parsing functions (diff)
downloadkernel-qcow2-linux-def8b4faff5ca349beafbbfeb2c51f3602a6ef3a.tar.gz
kernel-qcow2-linux-def8b4faff5ca349beafbbfeb2c51f3602a6ef3a.tar.xz
kernel-qcow2-linux-def8b4faff5ca349beafbbfeb2c51f3602a6ef3a.zip
net: reduce structures when XFRM=n
ifdef out * struct sk_buff::sp (pointer) * struct dst_entry::xfrm (pointer) * struct sock::sk_policy (2 pointers) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2725f4e5a9bf..487e34507b41 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -269,8 +269,9 @@ struct sk_buff {
struct dst_entry *dst;
struct rtable *rtable;
};
+#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
@@ -1864,6 +1865,18 @@ static inline void skb_copy_queue_mapping(struct sk_buff *to, const struct sk_bu
to->queue_mapping = from->queue_mapping;
}
+#ifdef CONFIG_XFRM
+static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
+{
+ return skb->sp;
+}
+#else
+static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
+{
+ return NULL;
+}
+#endif
+
static inline int skb_is_gso(const struct sk_buff *skb)
{
return skb_shinfo(skb)->gso_size;