Skip to content

Commit 76761ba

Browse files
HoratiuVulturdavem330
authored andcommitted
net: lan966x: Allow to add rules in TCAM even if not enabled
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: 4426b78 ("net: lan966x: Add port keyset config and callback interface") Signed-off-by: Horatiu Vultur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7871f54 commit 76761ba

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ lan966x_vcap_is2_get_port_keysets(struct net_device *dev, int lookup,
9595
bool found = false;
9696
u32 val;
9797

98-
/* Check if the port keyset selection is enabled */
9998
val = lan_rd(lan966x, ANA_VCAP_S2_CFG(port->chip_port));
100-
if (!ANA_VCAP_S2_CFG_ENA_GET(val))
101-
return -ENOENT;
10299

103100
/* Collect all keysets for the port in a list */
104101
if (l3_proto == ETH_P_ALL)

0 commit comments

Comments
 (0)