octeontx2-af: Fix devlink params
authorSunil Goutham <sgoutham@marvell.com>
Thu, 7 Mar 2024 10:56:23 +0000 (16:26 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2024 10:17:07 +0000 (10:17 +0000)
Devlink param for adjusting NPC MCAM high zone
area is in wrong param list and is not getting
activated on CN10KA silicon.
That patch fixes this issue.

Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs")
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c

index 1e6fbd98423dcb01e042f5a18ee7f2245380eeae..96c04f7d93f8b5fe5cb40f7de3f9aa64034a25aa 100644 (file)
@@ -1235,8 +1235,8 @@ static int rvu_af_dl_dwrr_mtu_get(struct devlink *devlink, u32 id,
 enum rvu_af_dl_param_id {
        RVU_AF_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX,
        RVU_AF_DEVLINK_PARAM_ID_DWRR_MTU,
-       RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE,
        RVU_AF_DEVLINK_PARAM_ID_NPC_MCAM_ZONE_PERCENT,
+       RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE,
        RVU_AF_DEVLINK_PARAM_ID_NIX_MAXLF,
 };
 
@@ -1434,15 +1434,6 @@ static const struct devlink_param rvu_af_dl_params[] = {
                             BIT(DEVLINK_PARAM_CMODE_RUNTIME),
                             rvu_af_dl_dwrr_mtu_get, rvu_af_dl_dwrr_mtu_set,
                             rvu_af_dl_dwrr_mtu_validate),
-};
-
-static const struct devlink_param rvu_af_dl_param_exact_match[] = {
-       DEVLINK_PARAM_DRIVER(RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE,
-                            "npc_exact_feature_disable", DEVLINK_PARAM_TYPE_STRING,
-                            BIT(DEVLINK_PARAM_CMODE_RUNTIME),
-                            rvu_af_npc_exact_feature_get,
-                            rvu_af_npc_exact_feature_disable,
-                            rvu_af_npc_exact_feature_validate),
        DEVLINK_PARAM_DRIVER(RVU_AF_DEVLINK_PARAM_ID_NPC_MCAM_ZONE_PERCENT,
                             "npc_mcam_high_zone_percent", DEVLINK_PARAM_TYPE_U8,
                             BIT(DEVLINK_PARAM_CMODE_RUNTIME),
@@ -1457,6 +1448,15 @@ static const struct devlink_param rvu_af_dl_param_exact_match[] = {
                             rvu_af_dl_nix_maxlf_validate),
 };
 
+static const struct devlink_param rvu_af_dl_param_exact_match[] = {
+       DEVLINK_PARAM_DRIVER(RVU_AF_DEVLINK_PARAM_ID_NPC_EXACT_FEATURE_DISABLE,
+                            "npc_exact_feature_disable", DEVLINK_PARAM_TYPE_STRING,
+                            BIT(DEVLINK_PARAM_CMODE_RUNTIME),
+                            rvu_af_npc_exact_feature_get,
+                            rvu_af_npc_exact_feature_disable,
+                            rvu_af_npc_exact_feature_validate),
+};
+
 /* Devlink switch mode */
 static int rvu_devlink_eswitch_mode_get(struct devlink *devlink, u16 *mode)
 {