summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-07-06 18:32:01 -0700
committerJakub Kicinski <kuba@kernel.org>2022-07-06 18:43:55 -0700
commit69d7d257cd35c9d36c93019f87de6c9f8b514119 (patch)
tree59b2cb06105f52ab507dbe8838fe46e5a312ce3f /drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
parentcd355d0bc60df51266d228c0f69570cdcfa1e6ba (diff)
Revert "Merge branch 'octeontx2-af-next'"
This reverts commit 2ef8e39f58f08589ab035223c2687830c0eba30f, reversing changes made to e7ce9fc9ad38773b660ef663ae98df4f93cb6a37. There are build warnings here which break the normal build due to -Werror. Ratheesh was nice enough to quickly follow up with fixes but didn't hit all the warnings I see on GCC 12 so to unlock net-next from taking patches let get this series out for now. Link: https://lore.kernel.org/r/20220707013201.1372433-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c71
1 files changed, 2 insertions, 69 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
index 88dee589cb21..d0ab8f233a02 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
@@ -10,7 +10,6 @@
#include "rvu.h"
#include "rvu_reg.h"
#include "rvu_struct.h"
-#include "rvu_npc_hash.h"
#define DRV_NAME "octeontx2-af"
@@ -1437,75 +1436,14 @@ 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,
};
-static int rvu_af_npc_exact_feature_get(struct devlink *devlink, u32 id,
- struct devlink_param_gset_ctx *ctx)
-{
- struct rvu_devlink *rvu_dl = devlink_priv(devlink);
- struct rvu *rvu = rvu_dl->rvu;
- bool enabled;
-
- enabled = rvu_npc_exact_has_match_table(rvu);
-
- snprintf(ctx->val.vstr, sizeof(ctx->val.vstr), "%s",
- enabled ? "enabled" : "disabled");
-
- return 0;
-}
-
-static int rvu_af_npc_exact_feature_disable(struct devlink *devlink, u32 id,
- struct devlink_param_gset_ctx *ctx)
-{
- struct rvu_devlink *rvu_dl = devlink_priv(devlink);
- struct rvu *rvu = rvu_dl->rvu;
-
- rvu_npc_exact_disable_feature(rvu);
-
- return 0;
-}
-
-static int rvu_af_npc_exact_feature_validate(struct devlink *devlink, u32 id,
- union devlink_param_value val,
- struct netlink_ext_ack *extack)
-{
- struct rvu_devlink *rvu_dl = devlink_priv(devlink);
- struct rvu *rvu = rvu_dl->rvu;
- u64 enable;
-
- if (kstrtoull(val.vstr, 10, &enable)) {
- NL_SET_ERR_MSG_MOD(extack,
- "Only 1 value is supported");
- return -EINVAL;
- }
-
- if (enable != 1) {
- NL_SET_ERR_MSG_MOD(extack,
- "Only disabling exact match feature is supported");
- return -EINVAL;
- }
-
- if (rvu_npc_exact_can_disable_feature(rvu))
- return 0;
-
- NL_SET_ERR_MSG_MOD(extack,
- "Can't disable exact match feature; Please try before any configuration");
- return -EFAULT;
-}
-
static const struct devlink_param rvu_af_dl_params[] = {
DEVLINK_PARAM_DRIVER(RVU_AF_DEVLINK_PARAM_ID_DWRR_MTU,
"dwrr_mtu", DEVLINK_PARAM_TYPE_U32,
BIT(DEVLINK_PARAM_CMODE_RUNTIME),
rvu_af_dl_dwrr_mtu_get, rvu_af_dl_dwrr_mtu_set,
rvu_af_dl_dwrr_mtu_validate),
- 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 */
@@ -1563,7 +1501,6 @@ int rvu_register_dl(struct rvu *rvu)
{
struct rvu_devlink *rvu_dl;
struct devlink *dl;
- size_t size;
int err;
dl = devlink_alloc(&rvu_devlink_ops, sizeof(struct rvu_devlink),
@@ -1585,12 +1522,8 @@ int rvu_register_dl(struct rvu *rvu)
goto err_dl_health;
}
- /* Register exact match devlink only for CN10K-B */
- size = ARRAY_SIZE(rvu_af_dl_params);
- if (!rvu_npc_exact_has_match_table(rvu))
- size -= 1;
-
- err = devlink_params_register(dl, rvu_af_dl_params, size);
+ err = devlink_params_register(dl, rvu_af_dl_params,
+ ARRAY_SIZE(rvu_af_dl_params));
if (err) {
dev_err(rvu->dev,
"devlink params register failed with error %d", err);