octeontx2-pf: Add ucast filter count configurability via devlink.
authorSai Krishna <saikrishnag@marvell.com>
Thu, 20 Jun 2024 08:59:49 +0000 (14:29 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Jun 2024 10:28:47 +0000 (11:28 +0100)
commit39c469188b6d20db107c454cac3ddea941718850
tree9268859d4ba54c4a31a353b27bcba327e84c5f53
parent4558645d139c01d5635cac7e3528a3d19bbb6526
octeontx2-pf: Add ucast filter count configurability via devlink.

The existing method of reserving unicast filter count leads to wasted
MCAM entries if the functionality is not used or fewer entries are used.
Furthermore, the amount of MCAM entries differs amongst Octeon SoCs.
We implemented a means to adjust the UC filter count via devlink,
allowing for better use of MCAM entries across Netdev apps.

commands:

To get the current unicast filter count
 # devlink dev param show pci/0002:02:00.0 name unicast_filter_count

To change/set the unicast filter count
 # devlink dev param  set  pci/0002:02:00.0  name unicast_filter_count
 value 5 cmode runtime

Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/devlink/octeontx2.rst
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_devlink.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c