Skip to content

Commit 35d32e8

Browse files
linvjwdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 125907a commit 35d32e8

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

include/net/geneve.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ struct genevehdr {
6262
struct geneve_opt options[];
6363
};
6464

65+
static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb)
66+
{
67+
return (struct genevehdr *)(udp_hdr(skb) + 1);
68+
}
69+
6570
#ifdef CONFIG_INET
6671
struct geneve_sock;
6772

net/ipv4/geneve.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ struct geneve_net {
6060

6161
static int geneve_net_id;
6262

63-
static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb)
64-
{
65-
return (struct genevehdr *)(udp_hdr(skb) + 1);
66-
}
67-
6863
static struct geneve_sock *geneve_find_sock(struct net *net,
6964
sa_family_t family, __be16 port)
7065
{

net/openvswitch/vport-geneve.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ static inline struct geneve_port *geneve_vport(const struct vport *vport)
4646
return vport_priv(vport);
4747
}
4848

49-
static inline struct genevehdr *geneve_hdr(const struct sk_buff *skb)
50-
{
51-
return (struct genevehdr *)(udp_hdr(skb) + 1);
52-
}
53-
5449
/* Convert 64 bit tunnel ID to 24 bit VNI. */
5550
static void tunnel_id_to_vni(__be64 tun_id, __u8 *vni)
5651
{

0 commit comments

Comments
 (0)