diff options
author | Maksym Glubokiy <maksym.glubokiy@plvision.eu> | 2022-07-15 15:55:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-07-18 11:44:32 +0100 |
commit | 1e20904e417738066b26490de2daf7ef3ed34483 (patch) | |
tree | 73b6b389e51efd3be65f29c1a1496c22947d6a43 /drivers | |
parent | f08d8c1bb97c48f24a82afaa2fd8c140f8d3da8b (diff) | |
download | lwn-1e20904e417738066b26490de2daf7ef3ed34483.tar.gz lwn-1e20904e417738066b26490de2daf7ef3ed34483.zip |
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: 47327e198d42 ("net: prestera: acl: migrate to new vTCAM api")
Signed-off-by: Maksym Glubokiy <maksym.glubokiy@plvision.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/prestera/prestera_flower.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_flower.c b/drivers/net/ethernet/marvell/prestera/prestera_flower.c index d43e503c644f..4d93ad6a284c 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_flower.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_flower.c @@ -167,12 +167,12 @@ static int prestera_flower_parse_meta(struct prestera_acl_rule *rule, } port = netdev_priv(ingress_dev); - mask = htons(0x1FFF); - key = htons(port->hw_id); + mask = htons(0x1FFF << 3); + key = htons(port->hw_id << 3); rule_match_set(r_match->key, SYS_PORT, key); rule_match_set(r_match->mask, SYS_PORT, mask); - mask = htons(0x1FF); + mask = htons(0x3FF); key = htons(port->dev_id); rule_match_set(r_match->key, SYS_DEV, key); rule_match_set(r_match->mask, SYS_DEV, mask); |