diff mbox series

[net-next] flow_dissector: Add support for HSRv0

Message ID 20220310073505.49990-1-kurt@linutronix.de (mailing list archive)
State Accepted
Commit f65e58440d4fca277233ebef78f402a0dbd02da5
Delegated to: Netdev Maintainers
Headers show
Series [net-next] flow_dissector: Add support for HSRv0 | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 7 this patch: 7
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Kurt Kanzenbach March 10, 2022, 7:35 a.m. UTC
Commit bf08824a0f47 ("flow_dissector: Add support for HSR") added support for
HSR within the flow dissector. However, it only works for HSR in version
1. Version 0 uses a different Ether Type. Add support for it.

Reported-by: Anthony Harivel <anthony.harivel@linutronix.de>
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
---
 net/core/flow_dissector.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Vladimir Oltean March 10, 2022, 1:34 p.m. UTC | #1
On Thu, Mar 10, 2022 at 08:35:05AM +0100, Kurt Kanzenbach wrote:
> Commit bf08824a0f47 ("flow_dissector: Add support for HSR") added support for
> HSR within the flow dissector. However, it only works for HSR in version
> 1. Version 0 uses a different Ether Type. Add support for it.
> 
> Reported-by: Anthony Harivel <anthony.harivel@linutronix.de>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>

This observation came up as a result of the fact that HSRv0 is still in
actual use, or just for correctness' sake?

> ---
>  net/core/flow_dissector.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 34441a32e3be..03b6e649c428 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -1283,6 +1283,7 @@ bool __skb_flow_dissect(const struct net *net,
>  		break;
>  	}
>  
> +	case htons(ETH_P_PRP):
>  	case htons(ETH_P_HSR): {
>  		struct hsr_tag *hdr, _hdr;
>  
> -- 
> 2.30.2
>
Kurt Kanzenbach March 10, 2022, 1:46 p.m. UTC | #2
On Thu Mar 10 2022, Vladimir Oltean wrote:
> On Thu, Mar 10, 2022 at 08:35:05AM +0100, Kurt Kanzenbach wrote:
>> Commit bf08824a0f47 ("flow_dissector: Add support for HSR") added support for
>> HSR within the flow dissector. However, it only works for HSR in version
>> 1. Version 0 uses a different Ether Type. Add support for it.
>> 
>> Reported-by: Anthony Harivel <anthony.harivel@linutronix.de>
>> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
>
> This observation came up as a result of the fact that HSRv0 is still in
> actual use, or just for correctness' sake?

It came up while testing the Linux HSR implementation.

Thanks,
Kurt
patchwork-bot+netdevbpf@kernel.org March 11, 2022, 11:10 a.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 10 Mar 2022 08:35:05 +0100 you wrote:
> Commit bf08824a0f47 ("flow_dissector: Add support for HSR") added support for
> HSR within the flow dissector. However, it only works for HSR in version
> 1. Version 0 uses a different Ether Type. Add support for it.
> 
> Reported-by: Anthony Harivel <anthony.harivel@linutronix.de>
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
> 
> [...]

Here is the summary with links:
  - [net-next] flow_dissector: Add support for HSRv0
    https://git.kernel.org/netdev/net-next/c/f65e58440d4f

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 34441a32e3be..03b6e649c428 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -1283,6 +1283,7 @@  bool __skb_flow_dissect(const struct net *net,
 		break;
 	}
 
+	case htons(ETH_P_PRP):
 	case htons(ETH_P_HSR): {
 		struct hsr_tag *hdr, _hdr;