[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1423100070-31848-5-git-send-email-dsahern@gmail.com>
Date: Wed, 4 Feb 2015 18:34:05 -0700
From: David Ahern <dsahern@...il.com>
To: netdev@...r.kernel.org
Cc: ebiederm@...ssion.com, David Ahern <dsahern@...il.com>
Subject: [RFC PATCH 04/29] net: Add net_ctx macros for skbuffs
skb macros will be used later for determining a network context
from skbs.
Signed-off-by: David Ahern <dsahern@...il.com>
---
include/linux/skbuff.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 85ab7d72b54c..a5dfef469d07 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -665,6 +665,10 @@ struct sk_buff {
atomic_t users;
};
+#define SKB_NET_CTX_DEV(skb) { .net = dev_net((skb)->dev) }
+#define SKB_NET_CTX_DST(skb) { .net = dev_net(skb_dst((skb))->dev) }
+#define SKB_NET_CTX_SOCK(skb) { .net = sock_net((skb)->sk) }
+
#ifdef __KERNEL__
/*
* Handling routines are only of interest to the kernel
--
1.9.3 (Apple Git-50)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists