OSDN Git Service

vxlan: fix GRO with VXLAN-GPE
authorJiri Benc <jbenc@redhat.com>
Fri, 21 Jul 2023 14:30:47 +0000 (16:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jul 2023 09:47:09 +0000 (10:47 +0100)
commitb0b672c4d0957e5897685667fc848132b8bd2d71
tree7a6541addbf655b1720eb32a63d0f556cdaefa17
parent17a0a64448b568442a101de09575f81ffdc45d15
vxlan: fix GRO with VXLAN-GPE

In VXLAN-GPE, there may not be an Ethernet header following the VXLAN
header. But in GRO, the vxlan driver calls eth_gro_receive
unconditionally, which means the following header is incorrectly parsed
as Ethernet.

Introduce GPE specific GRO handling.

For better performance, do not check for GPE during GRO but rather
install a different set of functions at setup time.

Fixes: e1e5314de08ba ("vxlan: implement GPE")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan/vxlan_core.c