Netdev Archive on lore.kernel.org
 help / Atom feed
* [PATCH v2 net-next] Revert wake_on_lan devlink parameter
@ 2019-02-11  9:16 Vasundhara Volam
  2019-02-11  9:16 ` [PATCH v2 net-next] Revert "devlink: Add a generic wake_on_lan port parameter" Vasundhara Volam
  0 siblings, 1 reply; 3+ messages in thread
From: Vasundhara Volam @ 2019-02-11  9:16 UTC (permalink / raw)
  To: davem; +Cc: netdev

As per discussion with Jakub Kicinski and Michal Kubecek,
this will be better addressed by soon-too-come ethtool netlink
API with additional indication that given WoL configuration request
is supposed to be persisted.

Retain bnxt_en code for devlink port param table registration.
There will be follow up patches to add some devlink port params
for bnxt_en driver.

v1->v2:
Combine 2 patches into 1 patch to avoid build failures.

Vasundhara Volam (1):
  Revert "devlink: Add a generic wake_on_lan port parameter"

 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 19 +------------------
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h |  1 -
 include/net/devlink.h                             |  8 --------
 net/core/devlink.c                                |  5 -----
 4 files changed, 1 insertion(+), 32 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 net-next] Revert "devlink: Add a generic wake_on_lan port parameter"
  2019-02-11  9:16 [PATCH v2 net-next] Revert wake_on_lan devlink parameter Vasundhara Volam
@ 2019-02-11  9:16 ` Vasundhara Volam
  2019-02-12 17:13   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Vasundhara Volam @ 2019-02-11  9:16 UTC (permalink / raw)
  To: davem; +Cc: netdev

This reverts commit b639583f9e36d044ac1b13090ae812266992cbac.

As per discussion with Jakub Kicinski and Michal Kubecek,
this will be better addressed by soon-too-come ethtool netlink
API with additional indication that given configuration request
is supposed to be persisted.

Also, remove the parameter support from bnxt_en driver.

Cc: Jiri Pirko <jiri@mellanox.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Cc: Michal Kubecek <mkubecek@suse.cz>
Suggested-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 19 +------------------
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h |  1 -
 include/net/devlink.h                             |  8 --------
 net/core/devlink.c                                |  5 -----
 4 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index 2955e40..e1feb97 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -37,8 +37,6 @@ enum bnxt_dl_param_id {
 	 NVM_OFF_MSIX_VEC_PER_PF_MIN, BNXT_NVM_SHARED_CFG, 7},
 	{BNXT_DEVLINK_PARAM_ID_GRE_VER_CHECK, NVM_OFF_DIS_GRE_VER_CHECK,
 	 BNXT_NVM_SHARED_CFG, 1},
-
-	{DEVLINK_PARAM_GENERIC_ID_WOL, NVM_OFF_WOL, BNXT_NVM_PORT_CFG, 1},
 };
 
 static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
@@ -72,8 +70,7 @@ static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
 	bytesize = roundup(nvm_param.num_bits, BITS_PER_BYTE) / BITS_PER_BYTE;
 	switch (bytesize) {
 	case 1:
-		if (nvm_param.num_bits == 1 &&
-		    nvm_param.id != DEVLINK_PARAM_GENERIC_ID_WOL)
+		if (nvm_param.num_bits == 1)
 			buf = &val->vbool;
 		else
 			buf = &val->vu8;
@@ -167,17 +164,6 @@ static int bnxt_dl_msix_validate(struct devlink *dl, u32 id,
 	return 0;
 }
 
-static int bnxt_dl_wol_validate(struct devlink *dl, u32 id,
-				union devlink_param_value val,
-				struct netlink_ext_ack *extack)
-{
-	if (val.vu8 && val.vu8 != DEVLINK_PARAM_WAKE_MAGIC) {
-		NL_SET_ERR_MSG_MOD(extack, "WOL type is not supported");
-		return -EINVAL;
-	}
-	return 0;
-}
-
 static const struct devlink_param bnxt_dl_params[] = {
 	DEVLINK_PARAM_GENERIC(ENABLE_SRIOV,
 			      BIT(DEVLINK_PARAM_CMODE_PERMANENT),
@@ -203,9 +189,6 @@ static int bnxt_dl_wol_validate(struct devlink *dl, u32 id,
 };
 
 static const struct devlink_param bnxt_dl_port_params[] = {
-	DEVLINK_PARAM_GENERIC(WOL, BIT(DEVLINK_PARAM_CMODE_PERMANENT),
-			      bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set,
-			      bnxt_dl_wol_validate),
 };
 
 int bnxt_dl_register(struct bnxt *bp)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
index da065ca..5b6b2c7 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h
@@ -35,7 +35,6 @@ static inline void bnxt_link_bp_to_dl(struct bnxt *bp, struct devlink *dl)
 
 #define NVM_OFF_MSIX_VEC_PER_PF_MAX	108
 #define NVM_OFF_MSIX_VEC_PER_PF_MIN	114
-#define NVM_OFF_WOL			152
 #define NVM_OFF_IGNORE_ARI		164
 #define NVM_OFF_DIS_GRE_VER_CHECK	171
 #define NVM_OFF_ENABLE_SRIOV		401
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 2b384a3..083a8b3 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -370,17 +370,12 @@ enum devlink_param_generic_id {
 	DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX,
 	DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN,
 	DEVLINK_PARAM_GENERIC_ID_FW_LOAD_POLICY,
-	DEVLINK_PARAM_GENERIC_ID_WOL,
 
 	/* add new param generic ids above here*/
 	__DEVLINK_PARAM_GENERIC_ID_MAX,
 	DEVLINK_PARAM_GENERIC_ID_MAX = __DEVLINK_PARAM_GENERIC_ID_MAX - 1,
 };
 
-enum devlink_param_wol_types {
-	DEVLINK_PARAM_WAKE_MAGIC = (1 << 0),
-};
-
 #define DEVLINK_PARAM_GENERIC_INT_ERR_RESET_NAME "internal_error_reset"
 #define DEVLINK_PARAM_GENERIC_INT_ERR_RESET_TYPE DEVLINK_PARAM_TYPE_BOOL
 
@@ -405,9 +400,6 @@ enum devlink_param_wol_types {
 #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_NAME "fw_load_policy"
 #define DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_TYPE DEVLINK_PARAM_TYPE_U8
 
-#define DEVLINK_PARAM_GENERIC_WOL_NAME "wake_on_lan"
-#define DEVLINK_PARAM_GENERIC_WOL_TYPE DEVLINK_PARAM_TYPE_U8
-
 #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate)	\
 {									\
 	.id = DEVLINK_PARAM_GENERIC_ID_##_id,				\
diff --git a/net/core/devlink.c b/net/core/devlink.c
index e6a015b..00269a9 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -2701,11 +2701,6 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info)
 		.name = DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_NAME,
 		.type = DEVLINK_PARAM_GENERIC_FW_LOAD_POLICY_TYPE,
 	},
-	{
-		.id = DEVLINK_PARAM_GENERIC_ID_WOL,
-		.name = DEVLINK_PARAM_GENERIC_WOL_NAME,
-		.type = DEVLINK_PARAM_GENERIC_WOL_TYPE,
-	},
 };
 
 static int devlink_param_generic_verify(const struct devlink_param *param)
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 net-next] Revert "devlink: Add a generic wake_on_lan port parameter"
  2019-02-11  9:16 ` [PATCH v2 net-next] Revert "devlink: Add a generic wake_on_lan port parameter" Vasundhara Volam
@ 2019-02-12 17:13   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2019-02-12 17:13 UTC (permalink / raw)
  To: vasundhara-v.volam; +Cc: netdev

From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Date: Mon, 11 Feb 2019 14:46:17 +0530

> This reverts commit b639583f9e36d044ac1b13090ae812266992cbac.
> 
> As per discussion with Jakub Kicinski and Michal Kubecek,
> this will be better addressed by soon-too-come ethtool netlink
> API with additional indication that given configuration request
> is supposed to be persisted.
> 
> Also, remove the parameter support from bnxt_en driver.
> 
> Cc: Jiri Pirko <jiri@mellanox.com>
> Cc: Michael Chan <michael.chan@broadcom.com>
> Cc: Michal Kubecek <mkubecek@suse.cz>
> Suggested-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11  9:16 [PATCH v2 net-next] Revert wake_on_lan devlink parameter Vasundhara Volam
2019-02-11  9:16 ` [PATCH v2 net-next] Revert "devlink: Add a generic wake_on_lan port parameter" Vasundhara Volam
2019-02-12 17:13   ` David Miller

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org netdev@archiver.kernel.org
	public-inbox-index netdev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox