Skip to content

Commit

Permalink
geneve: move definition of geneve_hdr() to geneve.h
Browse files Browse the repository at this point in the history
This is a static inline with identical definitions in multiple places...

Signed-off-by: John W. Linville <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
linvjw authored and davem330 committed May 13, 2015
1 parent 125907a commit 35d32e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions include/net/geneve.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 0 additions & 5 deletions net/ipv4/geneve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
5 changes: 0 additions & 5 deletions net/openvswitch/vport-geneve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 35d32e8

Please sign in to comment.