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:
parent
125907ae5e
commit
35d32e8fe4
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue