[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1544518008-15289-1-git-send-email-vasundhara-v.volam@broadcom.com>
Date: Tue, 11 Dec 2018 14:16:40 +0530
From: Vasundhara Volam <vasundhara-v.volam@...adcom.com>
To: davem@...emloft.net
Cc: michael.chan@...adcom.com, jiri@...lanox.com,
jakub.kicinski@...ronome.com, netdev@...r.kernel.org
Subject: [PATCH net-next v2 RFC 0/8] devlink: Add configuration parameters support for devlink_port
This patchset adds support for configuration parameters setting through
devlink_port. Each device registers supported configuration parameters
table.
The user can retrieve data on these parameters by
"devlink port param show" command and can set new value to a
parameter by "devlink port param set" command.
All configuration modes supported by devlink_dev are supported
by devlink_port also.
Command examples and output:
# devlink port param show
pci/0000:3b:00.0/0:
name wake-on-lan type generic
values:
cmode permanent value false
pci/0000:3b:00.1/1:
name wake-on-lan type generic
values:
cmode permanent value false
pci/0000:af:00.0/0:
name wake-on-lan type generic
values:
cmode permanent value true
# devlink port param show pci/0000:3b:00.0/0 name wake-on-lan
pci/0000:3b:00.0/0:
name wake-on-lan type generic
values:
cmode permanent value false
# devlink port param set pci/0000:3b:00.0/0 name wake-on-lan cmode permanent value true
v1->v2:
Make following changes as per suggestions from Jiri Pirko.
- Remove separate enum devlink_port_param_generic_id for port params.
Instead club it with existing device params. Accordingly refactor
remaining patchset.
- Move INIT_LIST_HEAD of port param_list to devlink_port_register()
- Add a helper devlink_param_verify() to be used for both
devlink_params_register() and devlink_port_params_register().
- Add a helper __devlink_params_unregister() for common code in
devlink_params_unregister() and devlink_port_params_unregister().
- Move DEVLINK_CMD_PORT_PARAM_XXX definitions to the end of the enum.
- Split the patches for devlink_port_param_driverinit_value_get() and
devlink_port_param_driverinit_value_set() into separate patches.
- define DEVLINK_PARAM_GENERIC_ID_WOL type as u8 and define enum for
different types of WOL. Accordingly modify bnxt_en patch to validate
wol type.
Vasundhara Volam (8):
devlink: Add devlink_param for port register and unregister
devlink: Add port param get command
devlink: Add port param set command
devlink: Add support for driverinit get value for devlink_port
devlink: Add support for driverinit set value for devlink_port
devlink: Add devlink notifications support for port params
devlink: Add a generic port parameter
bnxt_en: Add bnxt_en initial port params table and register it
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 +
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 44 ++-
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 1 +
include/net/devlink.h | 65 ++++
include/uapi/linux/devlink.h | 5 +
net/core/devlink.c | 452 ++++++++++++++++++----
6 files changed, 498 insertions(+), 70 deletions(-)
--
1.8.3.1
Powered by blists - more mailing lists