[PATCH net-next] net: microchip: vcap: initialize the top address of every VCAP
Daniel Machon
daniel.machon at microchip.com
Mon Nov 23 06:55:04 PST 2026
The sparx5 and lan966x block init helpers initialize the address range
of each VCAP instance, from first_valid_addr to last_valid_addr, with
the VCAP initialize command. They pass the range as a count of
last_valid_addr - first_valid_addr addresses.
The range is inclusive at both ends and holds one more address than
that, so the top address is never initialized. It keeps whatever the
TCAM held after reset, where it can match traffic until a rule is placed
there.
Pass the full count to initialize the whole range.
Signed-off-by: Daniel Machon <daniel.machon at microchip.com>
---
drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c | 2 +-
drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c b/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c
index eb28df80b2818..c0bd831a32a88 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c
@@ -659,7 +659,7 @@ static void lan966x_vcap_block_init(struct lan966x *lan966x,
__lan966x_vcap_range_init(lan966x, admin, admin->first_valid_addr,
admin->last_valid_addr -
- admin->first_valid_addr);
+ admin->first_valid_addr + 1);
}
static void lan966x_vcap_port_key_deselection(struct lan966x *lan966x,
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c b/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c
index 2dee2ce19fce7..b2e76bec8edba 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_impl.c
@@ -250,7 +250,7 @@ static void sparx5_vcap_block_init(struct sparx5 *sparx5,
{
_sparx5_vcap_range_init(sparx5, admin, admin->first_valid_addr,
admin->last_valid_addr -
- admin->first_valid_addr);
+ admin->first_valid_addr + 1);
}
/* Get the keyset name from the sparx5 VCAP model */
---
base-commit: eb6d6c80d35449c27471b1874f13066c09a8964d
change-id: 20261123-microchip-vcap-top-address-84e0326c8e3d
Best regards,
--
Daniel Machon <daniel.machon at microchip.com>
More information about the linux-arm-kernel
mailing list