[PATCH net-next 8/8] ethtool: wire in generic SFP module access

2021-04-09 Thread Moshe Shemesh
From: Andrew Lunn If the device has a sfp bus attached, call its sfp_get_module_eeprom_by_page() function, otherwise use the ethtool op for the device. This follows how the IOCTL works. Signed-off-by: Andrew Lunn --- net/ethtool/eeprom.c | 25 - 1 file changed, 20 inser

[PATCH net-next 7/8] phy: sfp: add netlink SFP support to generic SFP code

2021-04-09 Thread Moshe Shemesh
From: Andrew Lunn The new netlink API for reading SFP data requires a new op to be implemented. The idea of the new netlink SFP code is that userspace is responsible to parsing the EEPROM data and requesting pages, rather than have the kernel decide what pages are interesting and returning them.

[PATCH net-next 6/8] ethtool: Add fallback to get_module_eeprom from netlink command

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk In case netlink get_module_eeprom_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalculate parameters to get_module_eeprom() offset and len using page number and their sizes. Return error if this can'

[PATCH net-next 5/8] net: ethtool: Export helpers for getting EEPROM info

2021-04-09 Thread Moshe Shemesh
From: Andrew Lunn There are two ways to retrieve information from SFP EEPROMs. Many devices make use of the common code, and assign the sfp_bus pointer in the netdev to point to the bus holding the SFP device. Some MAC drivers directly implement ops in there ethool structure. Export within net/

[PATCH net-next 3/8] net/mlx5: Implement get_module_eeprom_by_page()

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Implement ethtool_ops::get_module_eeprom_by_page() to enable support of new SFP standards. Signed-off-by: Vladyslav Tarasiuk --- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 44 +++ .../net/ethernet/mellanox/mlx5/core/port.c| 41 +

[PATCH net-next 4/8] net/mlx5: Add support for DSFP module EEPROM dumps

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Allow the driver to recognise DSFP transceiver module ID and therefore allow its EEPROM dumps using ethtool. Signed-off-by: Vladyslav Tarasiuk --- drivers/net/ethernet/mellanox/mlx5/core/port.c | 2 ++ include/linux/mlx5/port.h | 1 + 2 files chang

[PATCH net-next 2/8] net/mlx5: Refactor module EEPROM query

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Prepare for ethtool_ops::get_module_eeprom_data() implementation by extracting common part of mlx5_query_module_eeprom() into a separate function. Signed-off-by: Vladyslav Tarasiuk --- .../net/ethernet/mellanox/mlx5/core/port.c| 79 +++ include/linu

[PATCH net-next 1/8] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-04-09 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Define get_module_eeprom_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_by_page() allows network drivers to dump a part of module's EEPROM specified by page and bank numbers along with offset and length. It is effectively a netlink rep

[PATCH net-next 0/8] ethtool: Extend module EEPROM dump API

2021-04-09 Thread Moshe Shemesh
Ethtool supports module EEPROM dumps via the `ethtool -m ` command. But in current state its functionality is limited - offset and length parameters, which are used to specify a linear desired region of EEPROM data to dump, is not enough, considering emergence of complex module EEPROM layouts such

Re: [RFC PATCH V5 net-next 0/5] ethtool: Extend module EEPROM dump API

2021-03-26 Thread Moshe Shemesh
On 3/26/2021 1:41 AM, Andrew Lunn wrote: External email: Use caution opening links or attachments On Thu, Mar 25, 2021 at 04:56:50PM +0200, Moshe Shemesh wrote: Ethtool supports module EEPROM dumps via the `ethtool -m ` command. But in current state its functionality is limited - offset and

Re: [RFC PATCH V5 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-26 Thread Moshe Shemesh
On 3/25/2021 8:13 PM, Don Bollinger wrote: From: Vladyslav Tarasiuk In case netlink get_module_eeprom_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalculate parameters to get_module_eeprom() offset and len using page nu

[RFC PATCH V5 net-next 4/5] net/mlx5: Add support for DSFP module EEPROM dumps

2021-03-25 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Allow the driver to recognise DSFP transceiver module ID and therefore allow its EEPROM dumps using ethtool. Signed-off-by: Vladyslav Tarasiuk --- drivers/net/ethernet/mellanox/mlx5/core/port.c | 3 ++- include/linux/mlx5/port.h | 1 + 2 files chan

[RFC PATCH V5 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-25 Thread Moshe Shemesh
From: Vladyslav Tarasiuk In case netlink get_module_eeprom_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalculate parameters to get_module_eeprom() offset and len using page number and their sizes. Return error if this can'

[RFC PATCH V5 net-next 2/5] net/mlx5: Refactor module EEPROM query

2021-03-25 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Prepare for ethtool_ops::get_module_eeprom_data() implementation by extracting common part of mlx5_query_module_eeprom() into a separate function. Signed-off-by: Vladyslav Tarasiuk --- .../net/ethernet/mellanox/mlx5/core/port.c| 79 +++ include/linu

[RFC PATCH V5 net-next 3/5] net/mlx5: Implement get_module_eeprom_by_page()

2021-03-25 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Implement ethtool_ops::get_module_eeprom_by_page() to enable support of new SFP standards. Signed-off-by: Vladyslav Tarasiuk --- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 44 +++ .../net/ethernet/mellanox/mlx5/core/port.c| 33 ++ i

[RFC PATCH V5 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-25 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Define get_module_eeprom_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_by_page() allows network drivers to dump a part of module's EEPROM specified by page and bank numbers along with offset and length. It is effectively a netlink rep

[RFC PATCH V5 net-next 0/5] ethtool: Extend module EEPROM dump API

2021-03-25 Thread Moshe Shemesh
Ethtool supports module EEPROM dumps via the `ethtool -m ` command. But in current state its functionality is limited - offset and length parameters, which are used to specify a linear desired region of EEPROM data to dump, is not enough, considering emergence of complex module EEPROM layouts such

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-24 Thread Moshe Shemesh
On 3/23/2021 7:47 PM, Don Bollinger wrote: I don't even see a need for this. The offset should be within one 1/2 page, of one bank. So offset >= 0 and <= 127. Length is also > 0 and <- 127. And offset+length is <= 127. I like the clean approach, but... How do you request low memory? Duh!

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-24 Thread Moshe Shemesh
On 3/23/2021 2:54 AM, Andrew Lunn wrote: +static int eeprom_prepare_data(const struct ethnl_req_info *req_base, +struct ethnl_reply_data *reply_base, +struct genl_info *info) +{ + struct eeprom_reply_data *reply = MODULE_EEPROM_REPDA

Re: [RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-24 Thread Moshe Shemesh
On 3/23/2021 2:27 AM, Andrew Lunn wrote: +#define ETH_MODULE_EEPROM_PAGE_LEN 256 Sorry to keep raising issues, but I think you want to make this constant 128. Yes, i also think the KAPI should be limited to returning a maximum of a 1/2 page per call. OK. +#define MODULE_EEPROM_MAX_OFFSET

[RFC PATCH V4 net-next 3/5] net/mlx5: Implement get_module_eeprom_by_page()

2021-03-22 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Implement ethtool_ops::get_module_eeprom_by_page() to enable support of new SFP standards. Signed-off-by: Vladyslav Tarasiuk --- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 44 +++ .../net/ethernet/mellanox/mlx5/core/port.c| 33 ++ i

[RFC PATCH V4 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-22 Thread Moshe Shemesh
From: Vladyslav Tarasiuk In case netlink get_module_eeprom_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalculate parameters to get_module_eeprom() offset and len using page number and their sizes. Return error if this can'

[RFC PATCH V4 net-next 4/5] net/mlx5: Add support for DSFP module EEPROM dumps

2021-03-22 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Allow the driver to recognise DSFP transceiver module ID and therefore allow its EEPROM dumps using ethtool. Signed-off-by: Vladyslav Tarasiuk --- drivers/net/ethernet/mellanox/mlx5/core/port.c | 3 ++- include/linux/mlx5/port.h | 1 + 2 files chan

[RFC PATCH V4 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-22 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Define get_module_eeprom_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_by_page() allows network drivers to dump a part of module's EEPROM specified by page and bank numbers along with offset and length. It is effectively a netlink rep

[RFC PATCH V4 net-next 2/5] net/mlx5: Refactor module EEPROM query

2021-03-22 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Prepare for ethtool_ops::get_module_eeprom_data() implementation by extracting common part of mlx5_query_module_eeprom() into a separate function. Signed-off-by: Vladyslav Tarasiuk --- .../net/ethernet/mellanox/mlx5/core/port.c| 79 +++ include/linu

[RFC PATCH V4 net-next 0/5] ethtool: Extend module EEPROM dump API

2021-03-22 Thread Moshe Shemesh
Ethtool supports module EEPROM dumps via the `ethtool -m ` command. But in current state its functionality is limited - offset and length parameters, which are used to specify a linear desired region of EEPROM data to dump, is not enough, considering emergence of complex module EEPROM layouts such

Re: [RFC PATCH V3 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-18 Thread Moshe Shemesh
On 3/18/2021 3:03 PM, Andrew Lunn wrote: On Mon, Mar 15, 2021 at 07:12:39PM +0200, Moshe Shemesh wrote: From: Vladyslav Tarasiuk Define get_module_eeprom_data_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_data_by_page() allows network drivers to dump a

Re: [RFC PATCH V3 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-16 Thread Moshe Shemesh
On 3/16/2021 12:31 AM, Don Bollinger wrote: On Mon, 15 Mar 2021 10:12:39 +0700 Moshe Shemesh wrote: From: Vladyslav Tarasiuk In case netlink get_module_eeprom_data_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair

Re: [RFC PATCH V3 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-16 Thread Moshe Shemesh
On 3/16/2021 12:31 AM, Don Bollinger wrote: On Mon, 15 Mar 2021 10:12:39 +0700 Moshe Shemesh wrote: From: Vladyslav Tarasiuk Define get_module_eeprom_data_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_data_by_page() allows network drivers to dump a part

Re: [RFC PATCH V3 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-16 Thread Moshe Shemesh
On 3/15/2021 11:01 PM, Jakub Kicinski wrote: On Mon, 15 Mar 2021 19:12:39 +0200 Moshe Shemesh wrote: From: Vladyslav Tarasiuk Define get_module_eeprom_data_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_data_by_page() allows network drivers to dump a

[RFC PATCH V3 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-15 Thread Moshe Shemesh
From: Vladyslav Tarasiuk In case netlink get_module_eeprom_data_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalculate parameters to get_module_eeprom() offset and len using page number and their sizes. Return error if this

[RFC PATCH V3 net-next 2/5] net/mlx5: Refactor module EEPROM query

2021-03-15 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Prepare for ethtool_ops::get_module_eeprom_data() implementation by extracting common part of mlx5_query_module_eeprom() into a separate function. Signed-off-by: Vladyslav Tarasiuk --- .../net/ethernet/mellanox/mlx5/core/port.c| 79 +++ include/linu

[RFC PATCH V3 net-next 4/5] net/mlx5: Add support for DSFP module EEPROM dumps

2021-03-15 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Allow the driver to recognise DSFP transceiver module ID and therefore allow its EEPROM dumps using ethtool. Signed-off-by: Vladyslav Tarasiuk --- drivers/net/ethernet/mellanox/mlx5/core/port.c | 3 ++- include/linux/mlx5/port.h | 1 + 2 files chan

[RFC PATCH V3 net-next 3/5] net/mlx5: Implement get_module_eeprom_data_by_page()

2021-03-15 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Implement ethtool_ops::get_module_eeprom_data_by_page() to enable support of new SFP standards. Signed-off-by: Vladyslav Tarasiuk --- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 44 +++ .../net/ethernet/mellanox/mlx5/core/port.c| 33

[RFC PATCH V3 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-15 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Define get_module_eeprom_data_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_data_by_page() allows network drivers to dump a part of module's EEPROM specified by page and bank numbers along with offset and length. It is effectively a n

[RFC PATCH V3 net-next 0/5] ethtool: Extend module EEPROM dump API

2021-03-15 Thread Moshe Shemesh
Ethtool supports module EEPROM dumps via the `ethtool -m ` command. But in current state its functionality is limited - offset and length parameters, which are used to specify a linear desired region of EEPROM data to dump, is not enough, considering emergence of complex module EEPROM layouts such

Re: [RFC PATCH V2 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-08 Thread Moshe Shemesh
On 3/5/2021 2:50 AM, Don Bollinger wrote: On Thu, Mar 04, 2021 at 10:57AM-0800, Moshe Shemesh wrote: From: Vladyslav Tarasiuk In case netlink get_module_eeprom_data_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair

Re: [RFC PATCH V2 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-08 Thread Moshe Shemesh
On 3/5/2021 3:58 AM, Andrew Lunn wrote: +/* MODULE EEPROM DATA */ + +enum { + ETHTOOL_A_EEPROM_DATA_UNSPEC, + ETHTOOL_A_EEPROM_DATA_HEADER, + + ETHTOOL_A_EEPROM_DATA_OFFSET, + ETHTOOL_A_EEPROM_DATA_LENGTH, + ETHTOOL_A_EEPROM_DATA_PAGE, + ETHTOOL_A_EEPROM_DATA_BANK, +

Re: [RFC PATCH V2 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-08 Thread Moshe Shemesh
On 3/5/2021 2:50 AM, Don Bollinger wrote: On Thu, Mar 04, 2021 at 10:57AM-0800, Moshe Shemesh wrote: From: Vladyslav Tarasiuk Define get_module_eeprom_data_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_data_by_page() allows network drivers to dump a

[RFC PATCH V2 net-next 5/5] ethtool: Add fallback to get_module_eeprom from netlink command

2021-03-04 Thread Moshe Shemesh
From: Vladyslav Tarasiuk In case netlink get_module_eeprom_data_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalculate parameters to get_module_eeprom() offset and len using page number and their sizes. Return error if this

[RFC PATCH V2 net-next 4/5] net/mlx5: Add support for DSFP module EEPROM dumps

2021-03-04 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Allow the driver to recognise DSFP transceiver module ID and therefore allow its EEPROM dumps using ethtool. Signed-off-by: Vladyslav Tarasiuk --- drivers/net/ethernet/mellanox/mlx5/core/port.c | 3 ++- include/linux/mlx5/port.h | 1 + 2 files chan

[RFC PATCH V2 net-next 1/5] ethtool: Allow network drivers to dump arbitrary EEPROM data

2021-03-04 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Define get_module_eeprom_data_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_data_by_page() allows network drivers to dump a part of module's EEPROM specified by page and bank numbers along with offset and length. It is effectively a n

[RFC PATCH V2 net-next 2/5] net/mlx5: Refactor module EEPROM query

2021-03-04 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Prepare for ethtool_ops::get_module_eeprom_data() implementation by extracting common part of mlx5_query_module_eeprom() into a separate function. Signed-off-by: Vladyslav Tarasiuk --- .../net/ethernet/mellanox/mlx5/core/port.c| 79 +++ include/linu

[RFC PATCH V2 net-next 3/5] net/mlx5: Implement get_module_eeprom_data_by_page()

2021-03-04 Thread Moshe Shemesh
From: Vladyslav Tarasiuk Implement ethtool_ops::get_module_eeprom_data_by_page() to enable support of new SFP standards. Signed-off-by: Vladyslav Tarasiuk --- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 42 +++ .../net/ethernet/mellanox/mlx5/core/port.c| 33

[RFC PATCH V2 net-next 0/5] ethtool: Extend module EEPROM dump API

2021-03-04 Thread Moshe Shemesh
Ethtool supports module EEPROM dumps via the `ethtool -m ` command. But in current state its functionality is limited - offset and length parameters, which are used to specify a linear desired region of EEPROM data to dump, is not enough, considering emergence of complex module EEPROM layouts such

Re: [PATCH iproute2-net v2 1/3] devlink: Add devlink reload action and limit options

2020-12-08 Thread Moshe Shemesh
On 12/9/2020 4:46 AM, David Ahern wrote: On 12/6/20 10:35 PM, Moshe Shemesh wrote: + print_string(PRINT_ANY, NULL, "%s", reload_action_name(action)); That line should be: print_string(PRINT_ANY,

[PATCH iproute2-net v2 1/3] devlink: Add devlink reload action and limit options

2020-12-06 Thread Moshe Shemesh
eload": { "reload_actions_performed": [ "driver_reinit" ] } } devlink dev reload pci/:82:00.0 action fw_activate -jp { "reload": { "reload_actions_performed": [ "driver_reinit","fw_activate" ] } } Signed-off-

[PATCH iproute2-net v2 3/3] devlink: Add reload stats to dev show

2020-12-06 Thread Moshe Shemesh
;no_reset": 0 } }, "remote_reload": { "driver_reinit": { "unspecified": 1 }, "fw_activate": {

[PATCH iproute2-net v2 2/3] devlink: Add pr_out_dev() helper function

2020-12-06 Thread Moshe Shemesh
Add pr_out_dev() helper function and use it both by cmd_dev_show_cb() and by cmd_mon_show_cb(). Dev stats will be added on the next patch to dev context, so cmd_mon_show_cb() should print the whole dev context and not just dev handle. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko

[PATCH iproute2-net v2 0/3] devlink: Add devlink reload action limit and stats

2020-12-06 Thread Moshe Shemesh
to devlink reload command. Patch 2 adds pr_out_dev() helper function and modify monitor function to use it. Patch 3 adds reload stats and remote reload stats to devlink dev show. Moshe Shemesh (3): devlink: Add devlink reload action and limit options devlink: Add pr_out_dev

Re: [PATCH iproute2-net 0/3] devlink: Add devlink reload action limit and stats

2020-12-02 Thread Moshe Shemesh
On 12/1/2020 1:25 PM, Vasundhara Volam wrote: On Thu, Nov 26, 2020 at 4:46 PM Moshe Shemesh wrote: Introduce new options on devlink reload API to enable the user to select the reload action required and constrains limits on these actions that he may want to ensure. Add reload stats to show

Re: [PATCH iproute2-net 3/3] devlink: Add reload stats to dev show

2020-12-01 Thread Moshe Shemesh
On 11/29/2020 11:22 PM, David Ahern wrote: On 11/26/20 4:14 AM, Moshe Shemesh wrote: @@ -2975,17 +2996,93 @@ static int cmd_dev_param(struct dl *dl) return -ENOENT; } -static void pr_out_dev(struct dl *dl, struct nlattr **tb) +static void pr_out_action_stats(struct dl *dl

Re: [PATCH iproute2-net 2/3] devlink: Add pr_out_dev() helper function

2020-12-01 Thread Moshe Shemesh
On 11/29/2020 11:15 PM, David Ahern wrote: On 11/26/20 4:14 AM, Moshe Shemesh wrote: diff --git a/devlink/devlink.c b/devlink/devlink.c index a9ba0072..bd588869 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -2974,17 +2974,11 @@ static int cmd_dev_param(struct dl *dl

Re: [PATCH iproute2-net 1/3] devlink: Add devlink reload action and limit options

2020-12-01 Thread Moshe Shemesh
On 11/29/2020 11:12 PM, David Ahern wrote: On 11/26/20 4:14 AM, Moshe Shemesh wrote: @@ -1997,7 +2066,7 @@ static void cmd_dev_help(void) pr_err(" devlink dev eswitch show DEV\n"); pr_err(" devlink dev param set DEV name PARAMETER value VALUE cmo

Re: [PATCH net-next v2 0/2] Add support for DSFP transceiver type

2020-11-27 Thread Moshe Shemesh
On 11/26/2020 5:21 PM, Andrew Lunn wrote: If i was implementing the ethtool side of it, i would probably do some sort of caching system. We know page 0 should always exist, so pre-load that into the cache. Try the netlink API first. If that fails, use the ioctl interface. If the ioctl is used,

Re: [PATCH net-next v2 0/2] Add support for DSFP transceiver type

2020-11-26 Thread Moshe Shemesh
On 11/25/2020 4:18 PM, Andrew Lunn wrote: External email: Use caution opening links or attachments OK, we will add API options to select bank and page to read any specific page the user selects. So advanced user will use it get the optional pages he needs, but what about non advanced user wh

[PATCH iproute2-net 3/3] devlink: Add reload stats to dev show

2020-11-26 Thread Moshe Shemesh
;no_reset": 0 } }, "remote_reload": { "driver_reinit": { "unspecified": 1 }, "fw_activate": { &qu

[PATCH iproute2-net 1/3] devlink: Add devlink reload action and limit options

2020-11-26 Thread Moshe Shemesh
eload": { "reload_actions_performed": [ "driver_reinit" ] } } devlink dev reload pci/:82:00.0 action fw_activate -jp { "reload": { "reload_actions_performed": [ "driver_reinit","fw_activate" ] } } Signed-off-by

[PATCH iproute2-net 2/3] devlink: Add pr_out_dev() helper function

2020-11-26 Thread Moshe Shemesh
Add pr_out_dev() helper function and use it both by cmd_dev_show_cb() and by cmd_mon_show_cb(). Dev stats will be added on the next patch to dev context, so cmd_mon_show_cb() should print the whole dev context and not just dev handle. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko

[PATCH iproute2-net 0/3] devlink: Add devlink reload action limit and stats

2020-11-26 Thread Moshe Shemesh
to devlink reload command. Patch 2 adds pr_out_dev() helper function and modify monitor function to use it. Patch 3 adds reload stats and remote reload stats to devlink dev show. Moshe Shemesh (3): devlink: Add devlink reload action and limit options devlink: Add pr_out_dev

Re: [PATCH net-next v2 0/2] Add support for DSFP transceiver type

2020-11-25 Thread Moshe Shemesh
On 11/24/2020 11:16 PM, Jakub Kicinski wrote: On Tue, 24 Nov 2020 02:14:59 +0100 Andrew Lunn wrote: On Mon, Nov 23, 2020 at 11:19:56AM +0200, Moshe Shemesh wrote: Add support for new cable module type DSFP (Dual Small Form-Factor Pluggable transceiver). DSFP EEPROM memory layout is

Re: [PATCH net-next v2 1/2] ethtool: Add CMIS 4.0 module type to UAPI

2020-11-25 Thread Moshe Shemesh
On 11/24/2020 12:40 AM, Jesse Brandeburg wrote: External email: Use caution opening links or attachments Moshe Shemesh wrote: From: Vladyslav Tarasiuk CMIS 4.0 document describes a universal EEPROM memory layout, which is used for some modules such as DSFP, OSFP and QSFP-DD modules. In

[PATCH net-next v2 1/2] ethtool: Add CMIS 4.0 module type to UAPI

2020-11-23 Thread Moshe Shemesh
and optional pages, the max read length 768B includes passive and active cables mandatory pages. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh --- include/uapi/linux/ethtool.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux

[PATCH net-next v2 0/2] Add support for DSFP transceiver type

2020-11-23 Thread Moshe Shemesh
Add support for new cable module type DSFP (Dual Small Form-Factor Pluggable transceiver). DSFP EEPROM memory layout is compatible with CMIS 4.0 spec. Add CMIS 4.0 module type to UAPI and implement DSFP EEPROM dump in mlx5. Change log: v1 -> v2 - Added comments on accessing only the mandatory part

[PATCH net-next v2 2/2] net/mlx5e: Add DSFP EEPROM dump support to ethtool

2020-11-23 Thread Moshe Shemesh
ed-by: Moshe Shemesh --- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 12 - .../net/ethernet/mellanox/mlx5/core/port.c| 52 --- include/linux/mlx5/port.h | 1 + 3 files changed, 57 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/mellanox

[PATCH net v2] devlink: Fix reload stats structure

2020-11-22 Thread Moshe Shemesh
quot;unspecified": 2 }, "fw_activate": { "unspecified": 1, "no_reset": 0 } } Fixes: a254c264267e ("devlink: Add reload stats") Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- v1 -> v2: - Fold comment at 80 c

Re: [PATCH net] devlink: Fix reload stats structure

2020-11-22 Thread Moshe Shemesh
On 11/22/2020 12:53 AM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Fri, 20 Nov 2020 15:40:37 +0200 Moshe Shemesh wrote: Fix reload stats structure exposed to the user. Change stats structure hierarchy to have the reload action as a parent of the stat

[PATCH net] devlink: Fix reload stats structure

2020-11-20 Thread Moshe Shemesh
quot;unspecified": 2 }, "fw_activate": { "unspecified": 1, "no_reset": 0 } } Fixes: a254c264267e ("devlink: Add reload stats") Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- include/uapi/linux/devlink.

Re: [PATCH net-next 2/2] net/mlx5e: Add DSFP EEPROM dump support to ethtool

2020-11-16 Thread Moshe Shemesh
On 11/13/2020 2:44 AM, Andrew Lunn wrote: On Thu, Nov 12, 2020 at 05:54:51PM +0200, Moshe Shemesh wrote: On 11/12/2020 3:13 PM, Andrew Lunn wrote: On Thu, Nov 12, 2020 at 07:49:41AM +0200, Moshe Shemesh wrote: From: Vladyslav Tarasiuk DSFP is a new cable module type, which EEPROM uses

Re: [PATCH net-next 2/2] net/mlx5e: Add DSFP EEPROM dump support to ethtool

2020-11-12 Thread Moshe Shemesh
On 11/12/2020 3:13 PM, Andrew Lunn wrote: On Thu, Nov 12, 2020 at 07:49:41AM +0200, Moshe Shemesh wrote: From: Vladyslav Tarasiuk DSFP is a new cable module type, which EEPROM uses memory layout described in CMIS 4.0 document. Use corresponding standard value for userspace ethtool to

[PATCH net-next 0/2] Add support for DSFP transceiver type

2020-11-11 Thread Moshe Shemesh
Add support for new cable module type DSFP (Dual Small Form-Factor Pluggable transceiver). DSFP EEPROM memory layout is compatible with CMIS 4.0 spec. Add CMIS 4.0 module type to UAPI and implement DSFP EEPROM dump in mlx5. Vladyslav Tarasiuk (2): ethtool: Add CMIS 4.0 module type to UAPI net/

[PATCH net-next 1/2] ethtool: Add CMIS 4.0 module type to UAPI

2020-11-11 Thread Moshe Shemesh
-by: Moshe Shemesh --- include/uapi/linux/ethtool.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index 9ca87bc73c44..0ec4c0ea3235 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -1861,9 +1861,12

[PATCH net-next 2/2] net/mlx5e: Add DSFP EEPROM dump support to ethtool

2020-11-11 Thread Moshe Shemesh
emory can be flat or paged, which is indicated by a flat_mem bit. In first case, only page 00 is available, and in second - multiple pages: 00h, 01h, 02h, 10h and 11h. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh --- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 12 - ..

Re: [PATCH net-next v2 03/16] devlink: Add devlink reload limit option

2020-10-07 Thread Moshe Shemesh
On 10/7/2020 3:41 PM, Vasundhara Volam wrote: On Wed, Oct 7, 2020 at 11:32 AM Moshe Shemesh wrote: Add reload limit to demand restrictions on reload actions. Reload limits supported: no_reset: No reset allowed, no down time allowed, no link flap and no configuration is lost. By

[PATCH net-next v2 14/16] net/mlx5: Add support for fw live patch event

2020-10-06 Thread Moshe Shemesh
database to help debugging an issue. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fw_tracer.c | 52 +++ .../mellanox/mlx5/core/diag/fw_tracer.h | 1 + .../ethernet/mellanox/mlx5/core/fw_reset.c| 24 + include/linux

[PATCH net-next v2 16/16] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-10-06 Thread Moshe Shemesh
Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- v1 -> v2: - Split first paragraph of devlink reload description to 2 sentences RFCv5 -> v1: - Rename reload_action_limit_level to reload_limit RFCv4 -> RFCv5: - Rephrase namespa

[PATCH net-next v2 15/16] net/mlx5: Add support for devlink reload limit no reset

2020-10-06 Thread Moshe Shemesh
. If it is then it triggers firmware live patching flow. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- v1 ->v2: - Shorten return flow in mlx5_devlink_trigger_fw_live_patch() RFCv5 -> v1: - Renamed reload_action_limit_level to reload_limit RFCv3 -> RFCv4: - Have action fw_acti

[PATCH net-next v2 02/16] devlink: Add reload action option to devlink reload command

2020-10-06 Thread Moshe Shemesh
-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller --- v1 -> v2: - Changes actions_performed attr to nla_bitfield32 - Change reload_up() parameters order, extack should be last RFCv5 -> v1: - Rename supported_reload_actions to reload_actions -

[PATCH net-next v2 07/16] net/mlx5: Set cap for pci sync for fw update event

2020-10-06 Thread Moshe Shemesh
Set capability to notify the firmware that this host driver is capable of handling pci sync for firmware update events. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net

[PATCH net-next v2 09/16] net/mlx5: Handle sync reset now event

2020-10-06 Thread Moshe Shemesh
bridge by checking that all the PF functions under the same PCI bridge have same device ID. If no other device it uses PCI bridge link control to turn link down and up. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/fw_reset.c| 119

[PATCH net-next v2 03/16] devlink: Add devlink reload limit option

2020-10-06 Thread Moshe Shemesh
multiselection. Signed-off-by: Moshe Shemesh --- v1 -> v2: - Changed limit uapi parameter to bitfield32 for future support of multiselection - Fixed reverse xmas tree RFCv5 -> v1: - Renamed supported_reload_actions_limit_levels to reload_limits - Renamed reload_action_limit_level to reload_limit -

[PATCH net-next v2 10/16] net/mlx5: Handle sync reset abort event

2020-10-06 Thread Moshe Shemesh
If firmware sends sync_reset_abort to driver the driver should clear the reset requested mode as reset is not expected any more. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/fw_reset.c| 15 +++ 1 file changed, 15 insertions

[PATCH net-next v2 01/16] devlink: Change devlink_reload_supported() param type

2020-10-06 Thread Moshe Shemesh
Change devlink_reload_supported() function to get devlink_ops pointer param instead of devlink pointer param. This change will be used in the next patch to check if devlink reload is supported before devlink instance is allocated. Signed-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski

[PATCH net-next v2 04/16] devlink: Add reload stats

2020-10-06 Thread Moshe Shemesh
vate": 1, "fw_activate_no_reset": 0 } } }, "pci/:82:00.1": { "stats": { "reload": { "driver_reinit": 1, "fw_activate": 0, "fw_

[PATCH net-next v2 06/16] net/mlx5: Add functions to set/query MFRL register

2020-10-06 Thread Moshe Shemesh
Add functions to query and set the MFRL reset options supported by firmware. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv5 -> v1: - Renamed non-static functions to have module prefix --- .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../ethernet/mellanox/mlx5/c

[PATCH net-next v2 05/16] devlink: Add remote reload stats

2020-10-06 Thread Moshe Shemesh
"driver_reinit": 1, "fw_activate": 1, "fw_activate_no_reset": 0 } } } } } Signed-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski --- v1 -> v2: - Add devlink_dev_stat

[PATCH net-next v2 12/16] devlink: Add enable_remote_dev_reset generic parameter

2020-10-06 Thread Moshe Shemesh
NACK any attempt to reset the device while the driver is loaded. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- Documentation/networking/devlink/devlink-params.rst | 6 ++ include/net/devlink.h | 4 net/core/devlink.c

[PATCH net-next v2 08/16] net/mlx5: Handle sync reset request event

2020-10-06 Thread Moshe Shemesh
it moves to reset requested mode and if it gets PCI reset triggered by the other PF it detect the reset and reloads. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv1 -> RFCv2: - Moved handling of sync reset recovery from health to fw_reset --- .../ethernet/mellanox/mlx5/c

[PATCH net-next v2 11/16] net/mlx5: Add support for devlink reload action fw activate

2020-10-06 Thread Moshe Shemesh
synchronizes all PFs on coming reset and driver reload. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv4 -> RFCv5: - Add remote actions stats - If devlink reload is not supported, show only remote_stats RFCv3 -> RFCv4: - Renamed DEVLINK_ATTR_RELOAD_ACTION_

[PATCH net-next v2 00/16] Add devlink reload action and limit options

2020-10-06 Thread Moshe Shemesh
mlx5 add devlink reload limit no_reset support for fw_activate reload action. Patch 16 adds documentation file devlink-reload.rst Moshe Shemesh (16): devlink: Change devlink_reload_supported() param type devlink: Add reload action option to devlink reload command devlink: Add

[PATCH net-next v2 13/16] net/mlx5: Add devlink param enable_remote_dev_reset support

2020-10-06 Thread Moshe Shemesh
firmware update reset is enabled. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv1 -> RFCv2: - Have MLX5_FW_RESET_FLAGS_NACK_RESET_REQUEST instead of MLX5_HEALTH_RESET_FLAGS_NACK_RESET_REQUEST --- .../net/ethernet/mellanox/mlx5/core/devlink.c | 21 ++ .../ether

Re: [PATCH net-next 05/16] devlink: Add remote reload stats

2020-10-06 Thread Moshe Shemesh
On 10/5/2020 10:12 PM, Jacob Keller wrote: On 10/4/2020 12:09 AM, Moshe Shemesh wrote: On 10/3/2020 12:05 PM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:08PM CEST, mo...@mellanox.com wrote: Add remote reload stats to hold the history of actions performed due devlink reload commands

Re: [PATCH net-next 03/16] devlink: Add devlink reload limit option

2020-10-04 Thread Moshe Shemesh
On 10/3/2020 6:04 PM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Sat, 3 Oct 2020 09:51:00 +0200 Jiri Pirko wrote: enum devlink_attr { /* don't change the order or add anything between, this is ABI! */ DEVLINK_ATTR_UNSPEC, @@ -507,6 +524,7 @@ e

Re: [PATCH net-next 16/16] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-10-04 Thread Moshe Shemesh
On 10/3/2020 12:14 PM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:19PM CEST, mo...@mellanox.com wrote: Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- RFCv5 -> v1: - Rename reload_action_limit_level to reload_limit RF

Re: [PATCH net-next 05/16] devlink: Add remote reload stats

2020-10-04 Thread Moshe Shemesh
"fw_activate_no_reset": 0 } ], "remote_reload_stats": [ { "driver_reinit": 1 },{ "fw_activate": 1 },{

Re: [PATCH net-next 04/16] devlink: Add reload stats

2020-10-04 Thread Moshe Shemesh
},{ "fw_activate": 0 },{ "fw_activate_no_reset": 0 } ] } } } } Signed-off-by: Moshe Shemesh --- RFCv5 -> v1: - Changed the stats output structure, have 2 stats, one for local and one for remote - Resplit

Re: [PATCH net-next 02/16] devlink: Add reload action option to devlink reload command

2020-10-03 Thread Moshe Shemesh
On 10/3/2020 10:52 AM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:05PM CEST, mo...@mellanox.com wrote: [...] +static int +devlink_nl_reload_actions_performed_snd(struct devlink *devlink, + unsigned long actions_performed, +

Re: [PATCH net-next 03/16] devlink: Add devlink reload limit option

2020-10-03 Thread Moshe Shemesh
On 10/3/2020 10:51 AM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:06PM CEST, mo...@mellanox.com wrote: [...] enum devlink_attr { /* don't change the order or add anything between, this is ABI! */ DEVLINK_ATTR_UNSPEC, @@ -507,6 +524,7 @@ enum devlink_attr { DEVLINK_

Re: [PATCH net-next 02/16] devlink: Add reload action option to devlink reload command

2020-10-03 Thread Moshe Shemesh
On 10/2/2020 6:19 PM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:05PM CEST, mo...@mellanox.com wrote: [...] diff --git a/include/net/devlink.h b/include/net/devlink.h index 1c286e9a3590..ddba63bce7ad 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1077,10 +1077,11 @@ st

Re: [PATCH net-next 15/16] net/mlx5: Add support for devlink reload limit no reset

2020-10-02 Thread Moshe Shemesh
On 10/2/2020 12:52 AM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Thu, 1 Oct 2020 16:59:18 +0300 Moshe Shemesh wrote: + err = mlx5_fw_reset_set_live_patch(dev); + if (err) + return err; + + return 0; nit return mlx... Right

  1   2   3   >