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>
This commit is contained in:
John W. Linville 2015-05-13 12:57:27 -04:00 committed by David S. Miller
parent 125907ae5e
commit 35d32e8fe4
3 changed files with 5 additions and 10 deletions

View File

@ -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;

View File

@ -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)
{

View File

@ -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)
{