[PATCH net-next v3 0/7] Support setting lanes via ethtool

2021-01-20 Thread Danielle Ratson
* is not set by user. When not setting lanes, we don't promise anything regarding what number of lanes will be chosen. Danielle Ratson (7): ethtool: Extend link modes settings uAPI with lanes ethtool: Get link mode in use instead of speed and duplex parameters ethtool: E

[PATCH net-next v3 1/7] ethtool: Extend link modes settings uAPI with lanes

2021-01-20 Thread Danielle Ratson
Attach Copper PHYAD: 0 Transceiver: internal Link detected: no Signed-off-by: Danielle Ratson --- Notes: v3: * Change ethtool_ops.capabilities to be a bitfield and rename it. * Add an according kdoc. * Set min and max for the lanes policy. *

[PATCH net-next v3 6/7] mlxsw: ethtool: Pass link mode in use to ethtool

2021-01-20 Thread Danielle Ratson
mode bit in the mask of the used link mode. Signed-off-by: Danielle Ratson --- Notes: v2: * Reword commit message. * Pass link mode bit to ethtool instead of link parameters. * Use u32 for lanes param instead ETHTOOL_LANES defines. .../net/ethernet/mellanox/mlxsw/spe

[PATCH net-next v3 4/7] mlxsw: ethtool: Remove max lanes filtering

2021-01-20 Thread Danielle Ratson
that filtering of the maximum number of lanes supported link modes, so indeed all the supported and advertised link modes will be shown. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 4 +-- .../mellanox/

[PATCH net-next v3 5/7] mlxsw: ethtool: Add support for setting lanes when autoneg is off

2021-01-20 Thread Danielle Ratson
parameter is passed from user space, choose the link mode that its actual width equals to it. Otherwise, the default link mode will be the one that supports the width of the port. Signed-off-by: Danielle Ratson --- Notes: v3: * Re-set the bitfield of supporting lanes in the driver to

[PATCH net-next v3 3/7] ethtool: Expose the number of lanes in use

2021-01-20 Thread Danielle Ratson
: Not reported Speed: 10Mb/s Lanes: 4 Duplex: Full Auto-negotiation: on Port: Direct Attach Copper PHYAD: 0 Transceiver: internal Link detected: yes Signed-off-by: Danielle Ratson --- Notes: v3: * Change the condition

[PATCH net-next v3 7/7] net: selftests: Add lanes setting test

2021-01-20 Thread Danielle Ratson
width is not set [ OK ] Signed-off-by: Danielle Ratson --- Notes: v3: * Move the test to drivers/net/mlxsw. v2: * Fix "then" to "than". * Remove the test for recieving max_width when lanes is not set by user. When n

[PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-20 Thread Danielle Ratson
Currently, when user space queries the link's parameters, as speed and duplex, each parameter is passed from the driver to ethtool. Instead, get the link mode bit in use, and derive each of the parameters from it in ethtool. Signed-off-by: Danielle Ratson --- Notes: v3: * R

RE: [PATCH net-next v4 3/8] ethtool: Get link mode in use instead of speed and duplex parameters

2021-02-22 Thread Danielle Ratson
> -Original Message- > From: Eric Dumazet > Sent: Monday, February 22, 2021 11:42 AM > To: Danielle Ratson ; netdev@vger.kernel.org > Cc: da...@davemloft.net; k...@kernel.org; Jiri Pirko ; > and...@lunn.ch; f.faine...@gmail.com; > mkube...@suse.cz; mlxsw ; Ido Sc

[PATCH net] ethtool: Add indicator field for link_mode validity to link_ksettings

2021-03-04 Thread Danielle Ratson
ctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: c8907043c6ac9 ("ethtool: Get link mode in us

[PATCH net-next v2 0/7] Support setting lanes via ethtool

2020-12-17 Thread Danielle Ratson
From: Danielle Ratson Some speeds can be achieved with different number of lanes. For example, 100Gbps can be achieved using two lanes of 50Gbps or four lanes of 25Gbps. This patch set adds a new selector that allows ethtool to advertise link modes according to their number of lanes and also

[PATCH net-next v2 1/7] ethtool: Extend link modes settings uAPI with lanes

2020-12-17 Thread Danielle Ratson
From: Danielle Ratson Currently, when auto negotiation is on, the user can advertise all the linkmodes which correspond to a specific speed, but does not have a similar selector for the number of lanes. This is significant when a specific speed can be achieved using different number of lanes

[PATCH net-next v2 3/7] ethtool: Expose the number of lanes in use

2020-12-17 Thread Danielle Ratson
From: Danielle Ratson Currently, ethtool does not expose how many lanes are used when the link is up. After adding a possibility to advertise or force a specific number of lanes, the lanes in use value can be either the maximum width of the port or below. Extend ethtool to expose the number of

[PATCH net-next v2 4/7] mlxsw: ethtool: Remove max lanes filtering

2020-12-17 Thread Danielle Ratson
From: Danielle Ratson Currently, when a speed can be supported by different number of lanes, the supported link modes bitmask contains only link modes with a single number of lanes. This was done in order to prevent auto negotiation on number of lanes after 50G-1-lane and 100G-2-lanes link

[PATCH net-next v2 6/7] mlxsw: ethtool: Pass link mode in use to ethtool

2020-12-17 Thread Danielle Ratson
From: Danielle Ratson Currently, when user space queries the link's parameters, as speed and duplex, each parameter is passed from the driver to ethtool. Instead, pass the link mode bit in use. In Spectrum-1, simply pass the bit that is set to '1' from PTYS register. In Spect

[PATCH net-next v2 5/7] mlxsw: ethtool: Add support for setting lanes when autoneg is off

2020-12-17 Thread Danielle Ratson
From: Danielle Ratson Currently, when auto negotiation is set to off, the user can force a specific speed or both speed and duplex. The user cannot influence the number of lanes that will be forced. Add support for setting speed along with lanes so one would be able to choose how many lanes

[PATCH net-next v2 7/7] net: selftests: Add lanes setting test

2020-12-17 Thread Danielle Ratson
From: Danielle Ratson Test that setting lanes parameter is working. Set max speed and max lanes in the list of advertised link modes, and then try to set max speed with the lanes below max lanes if exists in the list. And then, test that setting number of lanes larger than max lanes fails. Do

[PATCH net-next v2 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2020-12-17 Thread Danielle Ratson
From: Danielle Ratson Currently, when user space queries the link's parameters, as speed and duplex, each parameter is passed from the driver to ethtool. Instead, get the link mode bit in use, and derive each of the parameters from it in ethtool. Signed-off-by: Danielle R

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-12 Thread Danielle Ratson
> -Original Message- > From: Jakub Kicinski > Sent: Monday, October 12, 2020 1:38 AM > To: Ido Schimmel > Cc: netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; Danielle Ratson ; > and...@lunn.ch; f.faine...@gmail.com; mkube...@suse.cz; mlxsw >

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-13 Thread Danielle Ratson
> -Original Message- > From: Jakub Kicinski > Sent: Monday, October 12, 2020 6:58 PM > To: Danielle Ratson > Cc: Ido Schimmel ; netdev@vger.kernel.org; > da...@davemloft.net; Jiri Pirko ; and...@lunn.ch; > f.faine...@gmail.com; mkube...@suse.cz; mlxsw ; I

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-19 Thread Danielle Ratson
> -Original Message- > From: Andrew Lunn > Sent: Saturday, October 17, 2020 1:16 AM > To: Danielle Ratson > Cc: Jakub Kicinski ; Ido Schimmel ; > netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; f.faine...@gmail.com; mkube...@suse.cz; mlxsw >

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-20 Thread Danielle Ratson
> -Original Message- > From: Michal Kubecek > Sent: Monday, October 19, 2020 4:25 PM > To: Jiri Pirko > Cc: Danielle Ratson ; Andrew Lunn > ; Jakub Kicinski ; Ido Schimmel > ; netdev@vger.kernel.org; da...@davemloft.net; Jiri > Pirko ; f.faine...@gmail.com

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-21 Thread Danielle Ratson
> -Original Message- > From: Michal Kubecek > Sent: Wednesday, October 21, 2020 10:08 AM > To: Danielle Ratson > Cc: Jiri Pirko ; Andrew Lunn ; Jakub > Kicinski ; Ido Schimmel ; > netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; f.faine...@gmail.com

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-10-21 Thread Danielle Ratson
> -Original Message- > From: Michal Kubecek > Sent: Wednesday, October 21, 2020 11:48 AM > To: Danielle Ratson > Cc: Jiri Pirko ; Andrew Lunn ; Jakub > Kicinski ; Ido Schimmel ; > netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; f.faine...@gmail.com

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-11-25 Thread Danielle Ratson
> -Original Message- > From: Michal Kubecek > Sent: Wednesday, November 25, 2020 12:12 AM > To: Danielle Ratson > Cc: Jiri Pirko ; Andrew Lunn ; Jakub > Kicinski ; Ido Schimmel > ; netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; f.faine...@

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-12-01 Thread Danielle Ratson
> -Original Message- > From: Michal Kubecek > Sent: Thursday, November 26, 2020 11:08 PM > To: Danielle Ratson > Cc: Jiri Pirko ; Andrew Lunn ; Jakub > Kicinski ; Ido Schimmel > ; netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; f.faine...@

RE: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-24 Thread Danielle Ratson
> -Original Message- > From: Edwin Peer > Sent: Thursday, January 21, 2021 1:39 AM > To: Danielle Ratson > Cc: netdev ; David S . Miller ; > Jakub Kicinski ; Jiri Pirko > ; Andrew Lunn ; f.faine...@gmail.com; Michal > Kubecek ; mlxsw > ; Ido Schimmel >

RE: [PATCH net-next v3 1/7] ethtool: Extend link modes settings uAPI with lanes

2021-01-25 Thread Danielle Ratson
> -Original Message- > From: Jakub Kicinski > Sent: Friday, January 22, 2021 5:45 AM > To: Danielle Ratson > Cc: netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; and...@lunn.ch; f.faine...@gmail.com; > mkube...@suse.cz; mlxsw ; Ido Schimmel > Subj

RE: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-26 Thread Danielle Ratson
> -Original Message- > From: Edwin Peer > Sent: Monday, January 25, 2021 8:04 PM > To: Danielle Ratson > Cc: netdev ; David S . Miller ; > Jakub Kicinski ; Jiri Pirko > ; Andrew Lunn ; f.faine...@gmail.com; Michal > Kubecek ; mlxsw > ; Ido Schimmel > S

RE: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-27 Thread Danielle Ratson
> -Original Message- > From: Edwin Peer > Sent: Tuesday, January 26, 2021 7:14 PM > To: Danielle Ratson > Cc: netdev ; David S . Miller ; > Jakub Kicinski ; Jiri Pirko > ; Andrew Lunn ; f.faine...@gmail.com; Michal > Kubecek ; mlxsw > ; Ido Schimmel > S

RE: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-31 Thread Danielle Ratson
> -Original Message- > From: Michal Kubecek > Sent: Thursday, January 28, 2021 10:27 PM > To: Danielle Ratson > Cc: Edwin Peer ; netdev ; > David S . Miller ; Jakub > Kicinski ; Jiri Pirko ; Andrew Lunn > ; f.faine...@gmail.com; mlxsw > ; Ido Schimmel >

RE: [PATCH net-next v3 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-02-01 Thread Danielle Ratson
> -Original Message- > From: Edwin Peer > Sent: Sunday, January 31, 2021 7:39 PM > To: Danielle Ratson > Cc: Michal Kubecek ; netdev ; David > S . Miller ; Jakub > Kicinski ; Jiri Pirko ; Andrew Lunn > ; f.faine...@gmail.com; mlxsw > ; Ido Schimmel > S

[PATCH net-next v4 1/8] ethtool: Validate master slave configuration before rtnl_lock()

2021-02-02 Thread Danielle Ratson
Create a new function for input validations to be called before rtnl_lock() and move the master slave validation to that function. This would be a cleanup for next patch that would add another validation to the new function. Signed-off-by: Danielle Ratson --- net/ethtool/linkmodes.c | 27

[PATCH net-next v4 8/8] net: selftests: Add lanes setting test

2021-02-02 Thread Danielle Ratson
width is not set [ OK ] Signed-off-by: Danielle Ratson --- Notes: v4: * Change the check for lanes unsupported, to not having "Lanes" line at all. v3: * Move the test to drivers/net/mlxsw. v2: * Fix "

[PATCH net-next v4 7/8] mlxsw: ethtool: Pass link mode in use to ethtool

2021-02-02 Thread Danielle Ratson
mode bit in the mask of the used link mode. Signed-off-by: Danielle Ratson --- Notes: v2: * Reword commit message. * Pass link mode bit to ethtool instead of link parameters. * Use u32 for lanes param instead ETHTOOL_LANES defines. .../net/ethernet/mellanox/mlxsw/spe

[PATCH net-next v4 5/8] mlxsw: ethtool: Remove max lanes filtering

2021-02-02 Thread Danielle Ratson
that filtering of the maximum number of lanes supported link modes, so indeed all the supported and advertised link modes will be shown. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 4 +-- .../mellanox/

[PATCH net-next v4 6/8] mlxsw: ethtool: Add support for setting lanes when autoneg is off

2021-02-02 Thread Danielle Ratson
parameter is passed from user space, choose the link mode that its actual width equals to it. Otherwise, the default link mode will be the one that supports the width of the port. Signed-off-by: Danielle Ratson --- Notes: v3: * Re-set the bitfield of supporting lanes in the driver to

[PATCH net-next v4 3/8] ethtool: Get link mode in use instead of speed and duplex parameters

2021-02-02 Thread Danielle Ratson
Currently, when user space queries the link's parameters, as speed and duplex, each parameter is passed from the driver to ethtool. Instead, get the link mode bit in use, and derive each of the parameters from it in ethtool. Signed-off-by: Danielle Ratson --- Notes: v3: * R

RE: [PATCH net-next v3 1/7] ethtool: Extend link modes settings uAPI with lanes

2021-02-02 Thread Danielle Ratson
> -Original Message- > From: Edwin Peer > Sent: Thursday, January 21, 2021 12:36 AM > To: Danielle Ratson > Cc: netdev ; David S . Miller ; > Jakub Kicinski ; Jiri Pirko > ; Andrew Lunn ; f.faine...@gmail.com; Michal > Kubecek ; mlxsw > ; Ido Schimmel >

[PATCH net-next v4 4/8] ethtool: Expose the number of lanes in use

2021-02-02 Thread Danielle Ratson
: Not reported Speed: 10Mb/s Lanes: 4 Duplex: Full Auto-negotiation: on Port: Direct Attach Copper PHYAD: 0 Transceiver: internal Link detected: yes Signed-off-by: Danielle Ratson --- Notes: v3: * Change the condition

[PATCH net-next v4 2/8] ethtool: Extend link modes settings uAPI with lanes

2021-02-02 Thread Danielle Ratson
Attach Copper PHYAD: 0 Transceiver: internal Link detected: no Signed-off-by: Danielle Ratson --- Notes: v4: * Change the way specifying lanes param in link_mode_params. * Remove ETHTOOL_LANES_UNKNOWN uAPI constant and don't report

[PATCH net-next v4 0/8] Support setting lanes via ethtool

2021-02-02 Thread Danielle Ratson
link_mode_info'. * Patch #7: Remove the test for recieving max_width when lanes is not set by user. When not setting lanes, we don't promise anything regarding what number of lanes will be chosen. Danielle Ratson (8): ethtool: Validate master slave configuration bef

[PATCH ethtool v2 0/5] Extend uAPI with lanes parameter

2021-02-02 Thread Danielle Ratson
: $ ethtool -s swp5 lanes N Patch #1: Update headers with the new parameter. Patch #2: Support lanes in netlink. Patch #3: Expose the number of lanes in use. Patch #4: Add auto-completion for lanes. Patch #5: Add lanes to man page. Danielle Ratson (5): ethtool: Extend ethtool link modes settings uAPI with

[PATCH ethtool v2 4/5] shell-completion: Add completion for lanes

2021-02-02 Thread Danielle Ratson
Lanes was added as a new link mode setting in ethtool. Support completion for lanes when setting parameters. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- shell-completion/bash/ethtool | 4 1 file changed, 4 insertions(+) diff --git a/shell-completion/bash/ethtool b/shell

[PATCH ethtool v2 1/5] ethtool: Extend ethtool link modes settings uAPI with lanes

2021-02-02 Thread Danielle Ratson
Add ETHTOOL_A_LINKMODES_LANES, expand ethtool_link_settings with lanes attribute and define valid lanes in order to support a new lanes-selector. Signed-off-by: Danielle Ratson --- Notes: v2: * Update headers after changes in upstream patches. netlink/desc-ethtool.c | 1

[PATCH ethtool v2 2/5] netlink: settings: Add netlink support for lanes parameter

2021-02-02 Thread Danielle Ratson
Add support for "ethtool -s lanes N ..." for setting a specific number of lanes. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- ethtool.c | 1 + netlink/settings.c | 8 2 files changed, 9 insertions(+) diff --git a/ethtool.c b/ethtool.c index 585aaf

[PATCH ethtool v2 3/5] netlink: settings: Expose the number of lanes in use

2021-02-02 Thread Danielle Ratson
. Signed-off-by: Danielle Ratson --- Notes: v2: * Remove possibility for printing unknown lanes, as now unknown lanes attribute doesn't pass to netlink. netlink/settings.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/netlink/settings.c b/netlink/settings.c

[PATCH ethtool v2 5/5] man: Add man page for setting lanes parameter

2021-02-02 Thread Danielle Ratson
Lanes parameter was added for setting using ethtool. Update the man page to include the new parameter. Signed-off-by: Danielle Ratson --- ethtool.8.in | 4 1 file changed, 4 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index ba4e245..fe49b66 100644 --- a/ethtool.8.in +++ b

[PATCH net v2 0/2] Fix link_mode derived params functionality

2021-04-04 Thread Danielle Ratson
dding a validity field to 'ethtool_link_ksettings' struct in patch #1. Danielle Ratson (2): ethtool: Add link_mode parameter capability bit to ethtool_ops ethtool: Derive parameters from link_mode in ioctl path .../mellanox/mlxsw/spectrum_ethtool.c | 1 + include/linux/ethtool.

[PATCH net v2 1/2] ethtool: Add link_mode parameter capability bit to ethtool_ops

2021-04-04 Thread Danielle Ratson
_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: c8907043c6ac9 ("ethtool: Get link mode in use instead of speed and duplex parameters") Signed-off-by: Danielle Ratson Reported

[PATCH net v2 2/2] ethtool: Derive parameters from link_mode in ioctl path

2021-04-04 Thread Danielle Ratson
irect Attach Copper PHYAD: 0 Transceiver: internal Auto-negotiation: on Link detected: yes Fixes: c8907043c6ac9 ("ethtool: Get link mode in use instead of speed and duplex parameters") Signed-off-by: Danielle Ratson Reported-by: Ido Schimmel Reviewed-b

RE: [PATCH net v2 1/2] ethtool: Add link_mode parameter capability bit to ethtool_ops

2021-04-04 Thread Danielle Ratson
> -Original Message- > From: Andrew Lunn > Sent: Sunday, April 4, 2021 5:18 PM > To: Danielle Ratson > Cc: netdev@vger.kernel.org; da...@davemloft.net; k...@kernel.org; > eric.duma...@gmail.com; mkube...@suse.cz; > f.faine...@gmail.com; acard...@redhat.com;

RE: [PATCH net v2 1/2] ethtool: Add link_mode parameter capability bit to ethtool_ops

2021-04-05 Thread Danielle Ratson
> -Original Message- > From: Andrew Lunn > Sent: Sunday, April 4, 2021 7:33 PM > To: Danielle Ratson > Cc: netdev@vger.kernel.org; da...@davemloft.net; k...@kernel.org; > eric.duma...@gmail.com; mkube...@suse.cz; > f.faine...@gmail.com; acard...@redhat.com;

[PATCH net v3 0/2] Fix link_mode derived params functionality

2021-04-07 Thread Danielle Ratson
;cap_link_mode_supported' instead of adding a validity field to 'ethtool_link_ksettings' struct in patch #1. Danielle Ratson (2): ethtool: Remove link_mode param and derive link params from driver ethtool: Add lanes parameter for ETHTOOL_LINK_MODE_1baseR_

[PATCH net v3 1/2] ethtool: Remove link_mode param and derive link params from driver

2021-04-07 Thread Danielle Ratson
tl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: c8907043c6ac9 ("ethtool: Get link mode in use instead of speed and duplex param

[PATCH net v3 2/2] ethtool: Add lanes parameter for ETHTOOL_LINK_MODE_10000baseR_FEC_BIT

2021-04-07 Thread Danielle Ratson
("ethtool: Get link mode in use instead of speed and duplex parameters") Signed-off-by: Danielle Ratson Reviewed-by: Ido Schimmel --- net/ethtool/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 030aa7984a91..f9dcbad84

[PATCH net-next] ethtool: Move __ethtool_get_link_ksettings() to common file

2021-04-08 Thread Danielle Ratson
__ethtool_get_link_ksettings() function is shared by both ioctl and netlink ethtool interfaces. Move it to net/ethtool/common.c file, which is the suitable place for a shared code. Signed-off-by: Danielle Ratson Suggested-by: Jakub Kicinski Reviewed-by: Ido Schimmel Reviewed-by: Jiri Pirko

[PATCH iproute2-next v2 2/2] devlink: Expose port split ability

2020-07-30 Thread Danielle Ratson
Add a new attribute that indicates the port split ability to devlink port. Expose the attribute to user space as RO value, for example: $devlink port show swp1 pci/:03:00.0/61: type eth netdev swp1 flavour physical port 1 splittable false lanes 1 Signed-off-by: Danielle Ratson --- devlink

[PATCH iproute2-next v2 0/2] Expose port attributes

2020-07-30 Thread Danielle Ratson
Add two new devlink port attributes: - Lanes: indicates the number of port lanes. - Splittable: indicates the port split ability. Patch 1: Update kernel headers Patch 2: Expose number of lanes v2: *Update 'devlink_policy' with the new attributes Danielle Ratson (2): devlink: Expose

[PATCH iproute2-next v2 1/2] devlink: Expose number of port lanes

2020-07-30 Thread Danielle Ratson
Add a new attribute that indicates the port's number of lanes to devlink port. Expose the attribute to user space as RO value, for example: $devlink port show swp1 pci/:03:00.0/61: type eth netdev swp1 flavour physical port 1 lanes 1 Signed-off-by: Danielle Ratson --- devlink/devl

[PATCH net-next repost v2 5/7] mlxsw: ethtool: Add support for setting lanes when autoneg is off

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Currently, when auto negotiation is set to off, the user can force a specific speed or both speed and duplex. The user cannot influence the number of lanes that will be forced. Add support for setting speed along with lanes so one would be able to choose how many lanes

[PATCH net-next repost v2 7/7] net: selftests: Add lanes setting test

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Test that setting lanes parameter is working. Set max speed and max lanes in the list of advertised link modes, and then try to set max speed with the lanes below max lanes if exists in the list. And then, test that setting number of lanes larger than max lanes fails. Do

[PATCH net-next repost v2 2/7] ethtool: Get link mode in use instead of speed and duplex parameters

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Currently, when user space queries the link's parameters, as speed and duplex, each parameter is passed from the driver to ethtool. Instead, get the link mode bit in use, and derive each of the parameters from it in ethtool. Signed-off-by: Danielle R

[PATCH net-next repost v2 6/7] mlxsw: ethtool: Pass link mode in use to ethtool

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Currently, when user space queries the link's parameters, as speed and duplex, each parameter is passed from the driver to ethtool. Instead, pass the link mode bit in use. In Spectrum-1, simply pass the bit that is set to '1' from PTYS register. In Spect

[PATCH net-next repost v2 3/7] ethtool: Expose the number of lanes in use

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Currently, ethtool does not expose how many lanes are used when the link is up. After adding a possibility to advertise or force a specific number of lanes, the lanes in use value can be either the maximum width of the port or below. Extend ethtool to expose the number of

[PATCH net-next repost v2 1/7] ethtool: Extend link modes settings uAPI with lanes

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Currently, when auto negotiation is on, the user can advertise all the linkmodes which correspond to a specific speed, but does not have a similar selector for the number of lanes. This is significant when a specific speed can be achieved using different number of lanes

[PATCH net-next repost v2 0/7] Support setting lanes via ethtool

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Some speeds can be achieved with different number of lanes. For example, 100Gbps can be achieved using two lanes of 50Gbps or four lanes of 25Gbps. This patch set adds a new selector that allows ethtool to advertise link modes according to their number of lanes and also

[PATCH net-next repost v2 4/7] mlxsw: ethtool: Remove max lanes filtering

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Currently, when a speed can be supported by different number of lanes, the supported link modes bitmask contains only link modes with a single number of lanes. This was done in order to prevent auto negotiation on number of lanes after 50G-1-lane and 100G-2-lanes link

[PATCH ethtool 0/5] Extend uAPI with lanes parameter

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Currently, there is no way of knowing how many lanes will be use to achieve a wanted speed. For example, 100G speed can be achieved using: 2X50 or 4X25. In order to solve that, extend ethtool uAPI with lanes as a new link mode setting so the command below, for example

[PATCH ethtool 5/5] man: Add man page for setting lanes parameter

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Lanes parameter was added for setting using ethtool. Update the man page to include the new parameter. Signed-off-by: Danielle Ratson --- ethtool.8.in | 4 1 file changed, 4 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index ba4e245..fe49b66 100644 --- a

[PATCH ethtool 2/5] netlink: settings: Add netlink support for lanes parameter

2021-01-06 Thread Danielle Ratson
Add support for "ethtool -s lanes N ..." for setting a specific number of lanes. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- ethtool.c | 1 + netlink/settings.c | 8 2 files changed, 9 insertions(+) diff --git a/ethtool.c b/ethtool.c index 585aaf

[PATCH ethtool 3/5] netlink: settings: Expose the number of lanes in use

2021-01-06 Thread Danielle Ratson
From: Danielle Ratson Currently, the user does not have the information regarding how many lanes are used when the link is up. After adding a possibility to advertise or force a specific number of lanes this information becomes helpful. Expose the number of lanes in use if the information is

[PATCH ethtool 1/5] ethtool: Extend ethtool link modes settings uAPI with lanes

2021-01-06 Thread Danielle Ratson
Add ETHTOOL_A_LINKMODES_LANES, expand ethtool_link_settings with lanes attribute and define valid lanes in order to support a new lanes-selector. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- netlink/desc-ethtool.c | 1 + uapi/linux/ethtool.h | 8 uapi/linux

[PATCH ethtool 4/5] shell-completion: Add completion for lanes

2021-01-06 Thread Danielle Ratson
Lanes was added as a new link mode setting in ethtool. Support completion for lanes when setting parameters. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- shell-completion/bash/ethtool | 4 1 file changed, 4 insertions(+) diff --git a/shell-completion/bash/ethtool b/shell

RE: [PATCH net-next repost v2 7/7] net: selftests: Add lanes setting test

2021-01-10 Thread Danielle Ratson
> -Original Message- > From: Jakub Kicinski > Sent: Friday, January 8, 2021 2:45 AM > To: Danielle Ratson > Cc: netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; and...@lunn.ch; f.faine...@gmail.com; > mkube...@suse.cz; mlxsw ; Ido Schimmel ; > Daniel

RE: [PATCH net-next repost v2 1/7] ethtool: Extend link modes settings uAPI with lanes

2021-01-11 Thread Danielle Ratson
> -Original Message- > From: Jakub Kicinski > Sent: Friday, January 8, 2021 2:35 AM > To: Danielle Ratson > Cc: netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; and...@lunn.ch; f.faine...@gmail.com; > mkube...@suse.cz; mlxsw ; Ido Schimmel ; > Da

RE: [PATCH net] ethtool: Add indicator field for link_mode validity to link_ksettings

2021-03-11 Thread Danielle Ratson
> -Original Message- > From: Jakub Kicinski > Sent: Thursday, March 4, 2021 8:47 PM > To: Danielle Ratson > Cc: netdev@vger.kernel.org; da...@davemloft.net; eric.duma...@gmail.com; > and...@lunn.ch; mkube...@suse.cz; > f.faine...@gmail.com; acard...@redhat.com;

RE: [PATCH ethtool v2 1/5] ethtool: Extend ethtool link modes settings uAPI with lanes

2021-02-10 Thread Danielle Ratson
> -Original Message- > From: Michal Kubecek > Sent: Tuesday, February 9, 2021 9:40 PM > To: Danielle Ratson > Cc: netdev@vger.kernel.org; f.faine...@gmail.com; k...@kernel.org; > and...@lunn.ch; mlxsw > Subject: Re: [PATCH ethtool v2 1/5] ethtool: Exte

[PATCH ethtool v3 0/5] Extend uAPI with lanes parameter

2021-02-10 Thread Danielle Ratson
* the rest of it to patch #2. Danielle Ratson (5): update UAPI header copies netlink: settings: Add netlink support for lanes parameter netlink: settings: Expose the number of lanes in use shell-completion: Add completion for lanes man: Add man page for setting lanes parameter

[PATCH ethtool v3 1/5] update UAPI header copies

2021-02-10 Thread Danielle Ratson
Update to kernel commit 012ce4dd3102. Signed-off-by: Danielle Ratson --- uapi/linux/ethtool.h | 2 +- uapi/linux/ethtool_netlink.h | 1 + uapi/linux/if_link.h | 10 -- uapi/linux/netlink.h | 2 +- uapi/linux/rtnetlink.h | 20 +++- 5 files

[PATCH ethtool v3 2/5] netlink: settings: Add netlink support for lanes parameter

2021-02-10 Thread Danielle Ratson
From: Danielle Ratson Add support for "ethtool -s lanes N ..." for setting a specific number of lanes. Signed-off-by: Danielle Ratson --- Notes: v3: * Remove a leftover. * After adding a seperated patch for uapi headers, squash rest of the f

[PATCH ethtool v3 5/5] man: Add man page for setting lanes parameter

2021-02-10 Thread Danielle Ratson
Lanes parameter was added for setting using ethtool. Update the man page to include the new parameter. Signed-off-by: Danielle Ratson --- ethtool.8.in | 4 1 file changed, 4 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index ba4e245..fe49b66 100644 --- a/ethtool.8.in +++ b

[PATCH ethtool v3 4/5] shell-completion: Add completion for lanes

2021-02-10 Thread Danielle Ratson
From: Danielle Ratson Lanes was added as a new link mode setting in ethtool. Support completion for lanes when setting parameters. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- shell-completion/bash/ethtool | 4 1 file changed, 4 insertions(+) diff --git a/shell

[PATCH ethtool v3 3/5] netlink: settings: Expose the number of lanes in use

2021-02-10 Thread Danielle Ratson
. Signed-off-by: Danielle Ratson --- Notes: v2: * Remove possibility for printing unknown lanes, as now unknown lanes attribute doesn't pass to netlink. netlink/settings.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/netlink/settings.c b/ne

RE: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes

2020-11-23 Thread Danielle Ratson
> -Original Message- > From: Michal Kubecek > Sent: Thursday, October 22, 2020 7:28 PM > To: Danielle Ratson > Cc: Jiri Pirko ; Andrew Lunn ; Jakub > Kicinski ; Ido Schimmel > ; netdev@vger.kernel.org; da...@davemloft.net; Jiri Pirko > ; f.faine...@gmail.com

Re: [PATCH net-next 3/3] selftests: net: Add port split test

2020-05-20 Thread Danielle Ratson
On 5/20/2020 4:53 PM, Jiri Pirko wrote: > Wed, May 20, 2020 at 03:43:40PM CEST, ido...@idosch.org wrote: >> On Tue, May 19, 2020 at 09:33:06PM +0200, Andrew Lunn wrote: It's basically the number of lanes >>> Then why not call it lanes? It makes it clearer how this maps to the >>> hardware? >>

[PATCH iproute2-next 3/3] devlink: Expose port split ability

2020-07-12 Thread Danielle Ratson
Add a new attribute that indicates the port split ability to devlink port. Expose the attribute to user space as RO value, for example: $devlink port show swp1 pci/:03:00.0/61: type eth netdev swp1 flavour physical port 1 splittable false lanes 1 Signed-off-by: Danielle Ratson Reviewed-by

[PATCH iproute2-next 2/3] devlink: Expose number of port lanes

2020-07-12 Thread Danielle Ratson
Add a new attribute that indicates the port's number of lanes to devlink port. Expose the attribute to user space as RO value, for example: $devlink port show swp1 pci/:03:00.0/61: type eth netdev swp1 flavour physical port 1 lanes 1 Signed-off-by: Danielle Ratson Reviewed-by: Jiri

[PATCH iproute2-next 0/3] Expose port attributes

2020-07-12 Thread Danielle Ratson
Add two new devlink port attributes: - Lanes: indicates the number of port lanes. - Splittable: indicates the port split ability. Patch 1: Update kernel headers Patch 2: Expose number of lanes Patch 3: Expose split ability Danielle Ratson (3): include: Update kernel headers devlink: Expose

[PATCH iproute2-next 1/3] include: Update kernel headers

2020-07-12 Thread Danielle Ratson
Update kernel headers for following commit, with new devlink attributes. Signed-off-by: Danielle Ratson --- include/uapi/linux/devlink.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index d3ee69ba..b7f23faa 100644 --- a

[RFC PATCH net-next 1/8] devlink: Move set attribute of devlink_port_attrs to devlink_port

2020-06-02 Thread Danielle Ratson
The struct devlink_port_attrs holds the attributes of devlink_port. The 'set' field is not devlink_port's attribute as opposed to most of the others. Move 'set' to be devlink_port's field called 'attrs_set'. Signed-off-by: Danielle Ratson Reviewed-by: Ji

[RFC PATCH net-next 0/8] Expose devlink port attributes

2020-06-02 Thread Danielle Ratson
: Add lanes attribute to devlink port and pass to netlink. Patch 6: Set and initialize splittable attribute in the driver. Patch 7: Add splittable attribute to devlink port and pass them to netlink. Patch 8: Add a split port test. Danielle Ratson (8): devlink: Move set attribute of

[RFC PATCH net-next 2/8] devlink: Move switch_port attribute of devlink_port_attrs to devlink_port

2020-06-02 Thread Danielle Ratson
The struct devlink_port_attrs holds the attributes of devlink_port. Similarly to the previous patch, 'switch_port' attribute is another exception. Move 'switch_port' to be devlink_port's field. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- include/net/

[RFC PATCH net-next 4/8] mlxsw: Set number of port lanes attribute in driver

2020-06-02 Thread Danielle Ratson
Currently, port attributes like flavour, port number and whether the port was split are set when initializing a port. Set the number of lanes of the port as well so that it could be easily passed to devlink in the next patch. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- drivers

[RFC PATCH net-next 3/8] devlink: Replace devlink_port_attrs_set parameters with a struct

2020-06-02 Thread Danielle Ratson
Currently, devlink_port_attrs_set accepts a long list of parameters, that most of them are devlink port's attributes. Use the devlink_port_attrs struct to replace the relevant parameters. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- .../net/ethernet/broadcom/bnxt/bnxt_devl

[RFC PATCH net-next 8/8] selftests: net: Add port split test

2020-06-02 Thread Danielle Ratson
:00.0/25 [ OK ] Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata --- tools/testing/selftests/net/Makefile | 1 + .../selftests/net/devlink_port_split.py | 259 ++ 2 files changed, 260 insertions(+) create mode 100755 tools

[RFC PATCH net-next 7/8] devlink: Add a new devlink port split ability attribute and pass to netlink

2020-06-02 Thread Danielle Ratson
Add a new attribute that indicates the split ability to devlink port. Drivers are expected to set it via devlink_port_attrs_set(), before registering the port. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 1 + drivers/net

[RFC PATCH net-next 5/8] devlink: Add a new devlink port lanes attribute and pass to netlink

2020-06-02 Thread Danielle Ratson
Add a new devlink port attribute that indicates the port's number of lanes. Drivers are expected to set it via devlink_port_attrs_set(), before registering the port. The attribute is not passed to user space in case the number of lanes is invalid (0). Signed-off-by: Danielle Ratson Review

[RFC PATCH net-next 6/8] mlxsw: Set port split ability attribute in driver

2020-06-02 Thread Danielle Ratson
the next patch. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c | 9 + drivers/net/ethernet/mellanox/mlxsw/core.h | 5 ++--- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 4 ++-- drivers/net/ethernet/mellanox/mlxsw/spectru

Re: [PATCH net-next v2 3/9] devlink: Replace devlink_port_attrs_set parameters with a struct

2020-07-02 Thread Danielle Ratson
On 7/1/2020 9:51 PM, Jakub Kicinski wrote: > On Wed, 1 Jul 2020 17:32:45 +0300 Ido Schimmel wrote: >> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c >> b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c >> index 2bd610fafc58..3af4e7397263 100644 >> --- a/drivers/net/ethernet/broa

  1   2   >