diff mbox series

[net] net l2tp: drop flow hash on forward

Message ID 20240424171110.13701-1-mail@david-bauer.net (mailing list archive)
State Accepted
Commit 42f853b42899d9b445763b55c3c8adc72be0f0e1
Delegated to: Netdev Maintainers
Headers show
Series [net] net l2tp: drop flow hash on forward | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 926 this patch: 926
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 1 blamed authors not CCed: rdunlap@infradead.org; 1 maintainers not CCed: rdunlap@infradead.org
netdev/build_clang success Errors and warnings before: 937 this patch: 937
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 937 this patch: 937
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-04-25--09-00 (tests: 995)

Commit Message

David Bauer April 24, 2024, 5:11 p.m. UTC
Drop the flow-hash of the skb when forwarding to the L2TP netdev.

This avoids the L2TP qdisc from using the flow-hash from the outer
packet, which is identical for every flow within the tunnel.

This does not affect every platform but is specific for the ethernet
driver. It depends on the platform including L4 information in the
flow-hash.

One such example is the Mediatek Filogic MT798x family of networking
processors.

Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support")
Acked-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
---
 net/l2tp/l2tp_eth.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Simon Horman April 26, 2024, 9:58 a.m. UTC | #1
+ Randy Dunlap

On Wed, Apr 24, 2024 at 07:11:10PM +0200, David Bauer wrote:
> Drop the flow-hash of the skb when forwarding to the L2TP netdev.
> 
> This avoids the L2TP qdisc from using the flow-hash from the outer
> packet, which is identical for every flow within the tunnel.
> 
> This does not affect every platform but is specific for the ethernet
> driver. It depends on the platform including L4 information in the
> flow-hash.
> 
> One such example is the Mediatek Filogic MT798x family of networking
> processors.
> 
> Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support")
> Acked-by: James Chapman <jchapman@katalix.com>
> Signed-off-by: David Bauer <mail@david-bauer.net>

Reviewed-by: Simon Horman <horms@kernel.org>

> ---
>  net/l2tp/l2tp_eth.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
> index 39e487ccc468..8ba00ad433c2 100644
> --- a/net/l2tp/l2tp_eth.c
> +++ b/net/l2tp/l2tp_eth.c
> @@ -127,6 +127,9 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb,
>  	/* checksums verified by L2TP */
>  	skb->ip_summed = CHECKSUM_NONE;
>  
> +	/* drop outer flow-hash */
> +	skb_clear_hash(skb);
> +
>  	skb_dst_drop(skb);
>  	nf_reset_ct(skb);
>  
> -- 
> 2.43.0
> 
>
patchwork-bot+netdevbpf@kernel.org April 26, 2024, noon UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed, 24 Apr 2024 19:11:10 +0200 you wrote:
> Drop the flow-hash of the skb when forwarding to the L2TP netdev.
> 
> This avoids the L2TP qdisc from using the flow-hash from the outer
> packet, which is identical for every flow within the tunnel.
> 
> This does not affect every platform but is specific for the ethernet
> driver. It depends on the platform including L4 information in the
> flow-hash.
> 
> [...]

Here is the summary with links:
  - [net] net l2tp: drop flow hash on forward
    https://git.kernel.org/netdev/net/c/42f853b42899

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
index 39e487ccc468..8ba00ad433c2 100644
--- a/net/l2tp/l2tp_eth.c
+++ b/net/l2tp/l2tp_eth.c
@@ -127,6 +127,9 @@  static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb,
 	/* checksums verified by L2TP */
 	skb->ip_summed = CHECKSUM_NONE;
 
+	/* drop outer flow-hash */
+	skb_clear_hash(skb);
+
 	skb_dst_drop(skb);
 	nf_reset_ct(skb);