mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
geneve: constify geneve_hlen()
Such helper does not modify the argument; constifying it will additionally simplify later patches. Additionally move the definition earlier, still for later's patchesi sake. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Link: https://patch.msgid.link/ea9e279b9544e8644194508dd9a4320ee455fa95.1769011015.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ba1b8c97b9
commit
759b8d3cef
|
|
@ -365,6 +365,11 @@ static void geneve_uninit(struct net_device *dev)
|
|||
gro_cells_destroy(&geneve->gro_cells);
|
||||
}
|
||||
|
||||
static int geneve_hlen(const struct genevehdr *gh)
|
||||
{
|
||||
return sizeof(*gh) + gh->opt_len * 4;
|
||||
}
|
||||
|
||||
/* Callback from net/ipv4/udp.c to receive packets */
|
||||
static int geneve_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
|
|
@ -497,11 +502,6 @@ static struct socket *geneve_create_sock(struct net *net, bool ipv6,
|
|||
return sock;
|
||||
}
|
||||
|
||||
static int geneve_hlen(struct genevehdr *gh)
|
||||
{
|
||||
return sizeof(*gh) + gh->opt_len * 4;
|
||||
}
|
||||
|
||||
static struct sk_buff *geneve_gro_receive(struct sock *sk,
|
||||
struct list_head *head,
|
||||
struct sk_buff *skb)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user