netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: lan966x: Allow to add rules in TCAM even if not enabled
@ 2023-01-06 20:15 Horatiu Vultur
  2023-01-09  8:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Horatiu Vultur @ 2023-01-06 20:15 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: davem, edumazet, kuba, pabeni, UNGLinuxDriver, michael,
	steen.hegelund, Horatiu Vultur

The blamed commit implemented the vcap_operations to allow to add an
entry in the TCAM. One of the callbacks is to validate the supported
keysets. If the TCAM lookup was not enabled, then this will return
failure so no entries could be added.
This doesn't make much sense, as you can enable at a later point the
TCAM. Therefore change it such to allow entries in TCAM even it is not
enabled.

Fixes: 4426b78c626d ("net: lan966x: Add port keyset config and callback interface")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c b/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c
index d8dc9fbb81e1a..a54c0426a35f3 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c
@@ -95,10 +95,7 @@ lan966x_vcap_is2_get_port_keysets(struct net_device *dev, int lookup,
 	bool found = false;
 	u32 val;
 
-	/* Check if the port keyset selection is enabled */
 	val = lan_rd(lan966x, ANA_VCAP_S2_CFG(port->chip_port));
-	if (!ANA_VCAP_S2_CFG_ENA_GET(val))
-		return -ENOENT;
 
 	/* Collect all keysets for the port in a list */
 	if (l3_proto == ETH_P_ALL)
-- 
2.38.0


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

* Re: [PATCH] net: lan966x: Allow to add rules in TCAM even if not enabled
  2023-01-06 20:15 [PATCH] net: lan966x: Allow to add rules in TCAM even if not enabled Horatiu Vultur
@ 2023-01-09  8:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-09  8:20 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: netdev, linux-kernel, davem, edumazet, kuba, pabeni,
	UNGLinuxDriver, michael, steen.hegelund

Hello:

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

On Fri, 6 Jan 2023 21:15:07 +0100 you wrote:
> The blamed commit implemented the vcap_operations to allow to add an
> entry in the TCAM. One of the callbacks is to validate the supported
> keysets. If the TCAM lookup was not enabled, then this will return
> failure so no entries could be added.
> This doesn't make much sense, as you can enable at a later point the
> TCAM. Therefore change it such to allow entries in TCAM even it is not
> enabled.
> 
> [...]

Here is the summary with links:
  - net: lan966x: Allow to add rules in TCAM even if not enabled
    https://git.kernel.org/netdev/net/c/76761babaa98

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:[~2023-01-09  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 20:15 [PATCH] net: lan966x: Allow to add rules in TCAM even if not enabled Horatiu Vultur
2023-01-09  8:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).