All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: prestera: acl: use proper mask for port selector
@ 2022-07-15 12:55 Maksym Glubokiy
  2022-07-18 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Maksym Glubokiy @ 2022-07-15 12:55 UTC (permalink / raw)
  To: Taras Chornyi, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Yevhen Orlov, Volodymyr Mytnyk
  Cc: Maksym Glubokiy, netdev, linux-kernel

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>
---
 drivers/net/ethernet/marvell/prestera/prestera_flower.c | 6 +++---
 1 file 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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net: prestera: acl: use proper mask for port selector
  2022-07-15 12:55 [PATCH net] net: prestera: acl: use proper mask for port selector Maksym Glubokiy
@ 2022-07-18 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-07-18 10:50 UTC (permalink / raw)
  To: Maksym Glubokiy
  Cc: tchornyi, davem, edumazet, kuba, pabeni, yevhen.orlov, vmytnyk,
	netdev, linux-kernel

Hello:

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

On Fri, 15 Jul 2022 15:55:50 +0300 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [net] net: prestera: acl: use proper mask for port selector
    https://git.kernel.org/netdev/net/c/1e20904e4177

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-18 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 12:55 [PATCH net] net: prestera: acl: use proper mask for port selector Maksym Glubokiy
2022-07-18 10:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.