Commit 1e20904e authored by Maksym Glubokiy's avatar Maksym Glubokiy Committed by David S. Miller

net: prestera: acl: use proper mask for port selector

Adjusted as per packet processor documentation.
This allows to properly match 'indev' for clsact rules.

Fixes: 47327e19 ("net: prestera: acl: migrate to new vTCAM api")
Signed-off-by: default avatarMaksym Glubokiy <maksym.glubokiy@plvision.eu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f08d8c1b
...@@ -167,12 +167,12 @@ static int prestera_flower_parse_meta(struct prestera_acl_rule *rule, ...@@ -167,12 +167,12 @@ static int prestera_flower_parse_meta(struct prestera_acl_rule *rule,
} }
port = netdev_priv(ingress_dev); port = netdev_priv(ingress_dev);
mask = htons(0x1FFF); mask = htons(0x1FFF << 3);
key = htons(port->hw_id); key = htons(port->hw_id << 3);
rule_match_set(r_match->key, SYS_PORT, key); rule_match_set(r_match->key, SYS_PORT, key);
rule_match_set(r_match->mask, SYS_PORT, mask); rule_match_set(r_match->mask, SYS_PORT, mask);
mask = htons(0x1FF); mask = htons(0x3FF);
key = htons(port->dev_id); key = htons(port->dev_id);
rule_match_set(r_match->key, SYS_DEV, key); rule_match_set(r_match->key, SYS_DEV, key);
rule_match_set(r_match->mask, SYS_DEV, mask); rule_match_set(r_match->mask, SYS_DEV, mask);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment