diff mbox series

[09/14] flow_dissector: detect DSA using skb->protocol even when VLAN tag is present

Message ID 20221107185452.90711-9-nbd@nbd.name (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [01/14] net: ethernet: mtk_eth_soc: account for vlan in rx header length | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter warning Series does not have a cover letter
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: 3 this patch: 3
netdev/cc_maintainers warning 2 maintainers not CCed: shmulik.ladkani@gmail.com wojciech.drewek@intel.com
netdev/build_clang success Errors and warnings before: 5 this patch: 5
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 3 this patch: 3
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Felix Fietkau Nov. 7, 2022, 6:54 p.m. UTC
Fixes flow dissection with ethernet devices that can combine VLAN rx hwaccel
with DSA, since skb->protocol is set to htons(ETH_P_XDSA) by the network stack.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 net/core/flow_dissector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 25cd35f5922e..43f6bbca7447 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -970,7 +970,7 @@  bool __skb_flow_dissect(const struct net *net,
 		hlen = skb_headlen(skb);
 #if IS_ENABLED(CONFIG_NET_DSA)
 		if (unlikely(skb->dev && netdev_uses_dsa(skb->dev) &&
-			     proto == htons(ETH_P_XDSA))) {
+			     skb->protocol == htons(ETH_P_XDSA))) {
 			const struct dsa_device_ops *ops;
 			int offset = 0;