netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Jesse Gross <jesse@nicira.com>, Andy Zhou <azhou@nicira.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Alexander Duyck <alexander.h.duyck@redhat.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH 2/5] geneve: move definition of geneve_hdr() to geneve.h
Date: Fri,  8 May 2015 13:20:54 -0400	[thread overview]
Message-ID: <1431105657-25492-3-git-send-email-linville@tuxdriver.com> (raw)
In-Reply-To: <1431105657-25492-1-git-send-email-linville@tuxdriver.com>

This is a static inline with identical definitions in multiple places...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 include/net/geneve.h           | 5 +++++
 net/ipv4/geneve.c              | 5 -----
 net/openvswitch/vport-geneve.c | 5 -----
 3 files changed, 5 insertions(+), 10 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;
 
diff --git a/net/ipv4/geneve.c b/net/ipv4/geneve.c
index 8e6a7fe27a4c..001843d41135 100644
--- a/net/ipv4/geneve.c
+++ b/net/ipv4/geneve.c
@@ -60,11 +60,6 @@ struct geneve_net {
 
 static int geneve_net_id;
 
-static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb)
-{
-	return (struct genevehdr *)(udp_hdr(skb) + 1);
-}
-
 static struct geneve_sock *geneve_find_sock(struct net *net,
 					    sa_family_t family, __be16 port)
 {
diff --git a/net/openvswitch/vport-geneve.c b/net/openvswitch/vport-geneve.c
index bf02fd5808c9..208c576bd1b6 100644
--- a/net/openvswitch/vport-geneve.c
+++ b/net/openvswitch/vport-geneve.c
@@ -46,11 +46,6 @@ static inline struct geneve_port *geneve_vport(const struct vport *vport)
 	return vport_priv(vport);
 }
 
-static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb)
-{
-	return (struct genevehdr *)(udp_hdr(skb) + 1);
-}
-
 /* Convert 64 bit tunnel ID to 24 bit VNI. */
 static void tunnel_id_to_vni(__be64 tun_id, __u8 *vni)
 {
-- 
2.1.0

  parent reply	other threads:[~2015-05-08 17:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 17:20 [PATCH] add GENEVE netdev tunnel driver John W. Linville
2015-05-08 17:20 ` [PATCH 1/5] geneve: remove MODULE_ALIAS_RTNL_LINK from net/ipv4/geneve.c John W. Linville
2015-05-08 17:20 ` John W. Linville [this message]
2015-05-08 17:20 ` [PATCH 3/5] geneve: Rename support library as geneve_core John W. Linville
2015-05-08 17:20 ` [PATCH 4/5] geneve_core: identify as driver library in modules description John W. Linville
2015-05-08 17:20 ` [PATCH 5/5] geneve: add initial netdev driver for GENEVE tunnels John W. Linville
2015-05-08 20:55   ` Cong Wang
2015-05-08 23:22     ` John W. Linville
2015-05-10 23:48       ` David Miller
2015-05-11 15:17         ` John W. Linville
2015-05-08 23:19   ` Jesse Gross
2015-05-11 20:51   ` [PATCH v2 " John W. Linville
2015-05-13  3:06     ` David Miller
2015-05-13 16:53       ` John W. Linville
2015-05-08 17:27 ` [PATCH] iproute2: GENEVE support John W. Linville
2015-05-08 23:27   ` Jesse Gross
2015-05-11 18:47   ` [PATCH v2] " John W. Linville
2015-05-08 19:32 ` [PATCH] add GENEVE netdev tunnel driver Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431105657-25492-3-git-send-email-linville@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=alexander.h.duyck@redhat.com \
    --cc=azhou@nicira.com \
    --cc=davem@davemloft.net \
    --cc=jesse@nicira.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).