Skip to contentSkip to conversation

nfp: flower: fix incorrect struct type in GRE key_size

PATCH Applied Simon Horman 2 participants 2 messages Oct 7, 2022 – Oct 11, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfp: flower: fix incorrect struct type in GRE key_size

From: Louis Peens <[email protected]>

Looks like a copy-paste error sneaked in here at some point, causing the key_size for these tunnels to be calculated incorrectly. This size ends up being send to the firmware, causing unexpected behaviour in some cases.

Fixes 78a722af4ad9 ("nfp: flower: compile match for IPv6 tunnels")
---
 drivers/net/ethernet/netronome/nfp/flower/offload.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/netronome/nfp/flower/offload.c +2 -2
index 3ab3e4536b99..8593cafa6368 100644
@@ -373,10 +373,10 @@ nfp_flower_calculate_key_layers(struct nfp_app *app,
 			if (ipv6_tun) {
 				key_layer_two |= NFP_FLOWER_LAYER2_TUN_IPV6;
 				key_size +=
-					sizeof(struct nfp_flower_ipv6_udp_tun);
+					sizeof(struct nfp_flower_ipv6_gre_tun);
 			} else {
 				key_size +=
-					sizeof(struct nfp_flower_ipv4_udp_tun);
+					sizeof(struct nfp_flower_ipv4_gre_tun);
 			}
 
 			if (enc_op.key) {
Signature · 1 line
2.30.2
#1 lore raw
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 7 Oct 2022 11:21:32 +0200 you wrote:

From: Louis Peens <[email protected]>

Looks like a copy-paste error sneaked in here at some point, causing the key_size for these tunnels to be calculated incorrectly. This size ends up being send to the firmware, causing unexpected behaviour in some cases.

[...]

Here is the summary with links:
- [net] nfp: flower: fix incorrect struct type in GRE key_size

    https://git.kernel.org/netdev/net/c/b15e2e49bfc4

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html