vxlan: generalize vxlan_parse_gpe_hdr and remove unused args
authorJiri Benc <jbenc@redhat.com>
Fri, 21 Jul 2023 14:30:46 +0000 (16:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:23:59 +0000 (10:23 +0200)
commit9e22b434ff4a5ed1c16faee2be42f1b88650a2eb
treebfabbb65f9edc711ec4e7fec1750f42ffacecfd1
parentddc6ab3834bc7dff3eccc20ff536b5260f159b1c
vxlan: generalize vxlan_parse_gpe_hdr and remove unused args

[ Upstream commit 17a0a64448b568442a101de09575f81ffdc45d15 ]

The vxlan_parse_gpe_hdr function extracts the next protocol value from
the GPE header and marks GPE bits as parsed.

In order to be used in the next patch, split the function into protocol
extraction and bit marking. The bit marking is meaningful only in
vxlan_rcv; move it directly there.

Rename the function to vxlan_parse_gpe_proto to reflect what it now
does. Remove unused arguments skb and vxflags. Move the function earlier
in the file to allow it to be called from more places in the next patch.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: b0b672c4d095 ("vxlan: fix GRO with VXLAN-GPE")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/vxlan/vxlan_core.c