nfp: flower: Allow ipv6gretap interface for offloading
Subsystems (3)
PATCH 1/1 nfp: flower: Allow ipv6gretap interface for offloading
From: Yu Xiao <[email protected]>
The tunnel_type check only allows for "netif_is_gretap", but for OVS the port is actually "netif_is_ip6gretap" when setting up GRE for ipv6, which means offloading request was rejected before.
Therefore, adding "netif_is_ip6gretap" allow ipv6gretap interface for offloading.
--- drivers/net/ethernet/netronome/nfp/flower/action.c | 3 ++- drivers/net/ethernet/netronome/nfp/flower/cmsg.h | 2 +- drivers/net/ethernet/netronome/nfp/flower/offload.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/ethernet/netronome/nfp/flower/action.c +2 -1
@@ -272,7 +272,8 @@ nfp_flower_tun_is_gre(struct flow_rule *rule, int start_idx)for (act_idx = start_idx +1 ; act_idx < num_act; act_idx++)if (act[act_idx].id ==FLOW_ACTION_REDIRECT || act[act_idx].id ==FLOW_ACTION_MIRRED ) -return netif_is_gretap (act[act_idx].dev); +return netif_is_gretap (act[act_idx].dev) || +netif_is_ip6gretap (act[act_idx].dev);return false; }
drivers/net/ethernet/netronome/nfp/flower/cmsg.h +1 -1
@@ -703,7 +703,7 @@ nfp_fl_netdev_is_tunnel_type(struct net_device *netdev, {if (netif_is_vxlan (netdev))return tun_type ==NFP_FL_TUNNEL_VXLAN ; -if (netif_is_gretap (netdev)) +if (netif_is_gretap (netdev) ||netif_is_ip6gretap (netdev))return tun_type ==NFP_FL_TUNNEL_GRE ;if (netif_is_geneve (netdev))return tun_type ==NFP_FL_TUNNEL_GENEVE ;
drivers/net/ethernet/netronome/nfp/flower/offload.c +1 -1
@@ -360,7 +360,7 @@ nfp_flower_calculate_key_layers(struct nfp_app *app,if (!flow_rule_match_key (rule,FLOW_DISSECTOR_KEY_ENC_PORTS )) {/* check if GRE, which has no enc_ports */ -if (!netif_is_gretap (netdev)) { +if (!netif_is_gretap (netdev) && !netif_is_ip6gretap (netdev)) {NL_SET_ERR_MSG_MOD (extack,"unsupported offload: an exact match on L4 destination port is required for non-GRE tunnels" );return -EOPNOTSUPP ; }
Signature · 1 line
2.20.1
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 10 lines · On Fri, 29 Oct 2021 17:04:29 +0200 you wrote:
From: Yu Xiao <[email protected]>
The
tunnel_typecheck only allows for "netif_is_gretap", but for OVS the port is actually "netif_is_ip6gretap" when setting up GRE for ipv6, which means offloading request was rejected before.Therefore, adding "
netif_is_ip6gretap" allow ipv6gretap interface for offloading.[...]
Here is the summary with links:
- [net-next] nfp: flower: Allow ipv6gretap interface for offloading
https://git.kernel.org/netdev/net-next/c/f7536ffb0986
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html