Message ID | 20210616170922.26515-1-vadym.kochan@plvision.eu (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [RFC,net-next] net/sched: cls_flower: fix resetting of ether proto mask | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 1 maintainers not CCed: jiri@resnulli.us |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 13 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
diff --git a/net/sched/cls_flower.c b/net/sched/cls_flower.c index 2e704c7a105a..997ca0549c45 100644 --- a/net/sched/cls_flower.c +++ b/net/sched/cls_flower.c @@ -1534,10 +1534,13 @@ static int fl_set_key(struct net *net, struct nlattr **tb, mask->basic.n_proto = cpu_to_be16(0); } else { key->basic.n_proto = ethertype; + mask->basic.n_proto = cpu_to_be16(~0); + } } } else { key->basic.n_proto = ethertype; + mask->basic.n_proto = cpu_to_be16(~0); } }
In case of matching 'protocol' the rule does not work: tc filter add dev $DEV ingress prio 1 protocol $PROTO flower skip_sw action drop so clear the ether proto mask only for CVLAN case. Fixes: 0dca2c7404a9 ("net/sched: cls_flower: Remove match on n_proto") CC: Boris Sukholitko <boris.sukholitko@broadcom.com> Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu> --- I am still in testing process of the patch but reverting of referrenced commit solved the issue. The issue was observed on Marvel Prestera ACL patches with HW offloaded TC rules. net/sched/cls_flower.c | 3 +++ 1 file changed, 3 insertions(+)