summaryrefslogtreecommitdiffstats
path: root/include/net/geneve.h
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2015-05-13 18:57:27 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-13 21:59:13 +0200
commit35d32e8fe4ab44180e46a0dd54abea6985398d00 (patch)
treeb848fbac0cde4d7e40f193279205e81ea0a72829 /include/net/geneve.h
parentgeneve: remove MODULE_ALIAS_RTNL_LINK from net/ipv4/geneve.c (diff)
downloadlinux-35d32e8fe4ab44180e46a0dd54abea6985398d00.tar.xz
linux-35d32e8fe4ab44180e46a0dd54abea6985398d00.zip
geneve: move definition of geneve_hdr() to geneve.h
This is a static inline with identical definitions in multiple places... Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/geneve.h')
-rw-r--r--include/net/geneve.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/geneve.h b/include/net/geneve.h
index 14fb8d3390b4..2a0543a1899d 100644
--- a/include/net/geneve.h
+++ b/include/net/geneve.h
@@ -62,6 +62,11 @@ struct genevehdr {
struct geneve_opt options[];
};
+static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb)
+{
+ return (struct genevehdr *)(udp_hdr(skb) + 1);
+}
+
#ifdef CONFIG_INET
struct geneve_sock;