All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH ethtool 0/3] ethtool: Add support for new high speed adv.
@ 2016-08-22  5:50 Yuval Mintz
  2016-08-22  5:50 ` [PATCH ethtool 1/3] ethtool: Copy high-speed bits from ethtool.h Yuval Mintz
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Yuval Mintz @ 2016-08-22  5:50 UTC (permalink / raw)
  To: netdev, linville; +Cc: vidya, Yuval Mintz

This allows ethtool to utilize the link capabilities/adv./lp bitmasks
to show and set the additional 25g, 50g and 100g link speeds.

Patches #1 & #2 are based on Vidya Sagar Ravipati's patches
[with the only addition being the addition of the 50g SR2 mode],
while patch #3 updates the man-page with the additional modes.

Can't claim to have tried all modes, although I did play with both
25g KR and 50g KR2 which seemed to be working fine.

Yuval Mintz (3):
  ethtool: Copy high-speed bits from ethtool.h
  ethtool: Add support 25g, 50g and 100g speeds
  ethtool: Document new ethtool advertise speeds

 ethtool-copy.h | 12 +++++++++++-
 ethtool.8.in   | 10 ++++++++++
 ethtool.c      | 30 ++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 1 deletion(-)

-- 
1.9.3

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

* [PATCH ethtool 1/3] ethtool: Copy high-speed bits from ethtool.h
  2016-08-22  5:50 [PATCH ethtool 0/3] ethtool: Add support for new high speed adv Yuval Mintz
@ 2016-08-22  5:50 ` Yuval Mintz
  2016-08-22  5:50 ` [PATCH ethtool 2/3] ethtool: Add support for 25g, 50g and 100g advertise Yuval Mintz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Yuval Mintz @ 2016-08-22  5:50 UTC (permalink / raw)
  To: netdev, linville; +Cc: vidya, Yuval Mintz

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
 ethtool-copy.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/ethtool-copy.h b/ethtool-copy.h
index 7c581ea..f14300c 100644
--- a/ethtool-copy.h
+++ b/ethtool-copy.h
@@ -1351,6 +1351,16 @@ enum ethtool_link_mode_bit_indices {
 	ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT	= 28,
 	ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT	= 29,
 	ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT	= 30,
+	ETHTOOL_LINK_MODE_25000baseCR_Full_BIT	= 31,
+	ETHTOOL_LINK_MODE_25000baseKR_Full_BIT	= 32,
+	ETHTOOL_LINK_MODE_25000baseSR_Full_BIT	= 33,
+	ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT	= 34,
+	ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT	= 35,
+	ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT	= 36,
+	ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT	= 37,
+	ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT	= 38,
+	ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT	= 39,
+	ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT         = 40,
 
 	/* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
 	 * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
@@ -1359,7 +1369,7 @@ enum ethtool_link_mode_bit_indices {
 	 */
 
 	__ETHTOOL_LINK_MODE_LAST
-	  = ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT,
+	  = ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT,
 };
 
 #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name)	\
-- 
1.9.3

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

* [PATCH ethtool 2/3] ethtool: Add support for 25g, 50g and 100g advertise
  2016-08-22  5:50 [PATCH ethtool 0/3] ethtool: Add support for new high speed adv Yuval Mintz
  2016-08-22  5:50 ` [PATCH ethtool 1/3] ethtool: Copy high-speed bits from ethtool.h Yuval Mintz
@ 2016-08-22  5:50 ` Yuval Mintz
  2016-08-22  5:50 ` [PATCH ethtool 3/3] ethtool: Document new ethtool advertise speeds Yuval Mintz
  2016-08-22 19:32 ` [PATCH ethtool 0/3] ethtool: Add support for new high speed adv John W. Linville
  3 siblings, 0 replies; 6+ messages in thread
From: Yuval Mintz @ 2016-08-22  5:50 UTC (permalink / raw)
  To: netdev, linville; +Cc: vidya, Yuval Mintz

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
 ethtool.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/ethtool.c b/ethtool.c
index 4aa4762..aa8f34d 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -512,6 +512,16 @@ static void init_global_link_mode_masks(void)
 		ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT,
 		ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT,
 		ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT,
+		ETHTOOL_LINK_MODE_25000baseCR_Full_BIT,
+		ETHTOOL_LINK_MODE_25000baseKR_Full_BIT,
+		ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
+		ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT,
+		ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT,
+		ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT,
+		ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT,
+		ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT,
+		ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT,
+		ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT,
 	};
 	static const enum ethtool_link_mode_bit_indices
 		additional_advertised_flags_bits[] = {
@@ -632,6 +642,26 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
 		  "56000baseSR4/Full" },
 		{ 0, ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT,
 		  "56000baseLR4/Full" },
+		{ 0, ETHTOOL_LINK_MODE_25000baseCR_Full_BIT,
+		  "25000baseCR/Full" },
+		{ 0, ETHTOOL_LINK_MODE_25000baseKR_Full_BIT,
+		  "25000baseKR/Full" },
+		{ 0, ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
+		  "25000baseSR/Full" },
+		{ 0, ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT,
+		  "50000baseCR2/Full" },
+		{ 0, ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT,
+		  "50000baseKR2/Full" },
+		{ 0, ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT,
+		  "100000baseKR4/Full" },
+		{ 0, ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT,
+		  "100000baseSR4/Full" },
+		{ 0, ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT,
+		  "100000baseCR4/Full" },
+		{ 0, ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT,
+		  "100000baseLR4_ER4/Full" },
+		{ 0, ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT,
+		  "50000baseSR2/Full" },
 	};
 	int indent;
 	int did1, new_line_pend, i;
-- 
1.9.3

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

* [PATCH ethtool 3/3] ethtool: Document new ethtool advertise speeds
  2016-08-22  5:50 [PATCH ethtool 0/3] ethtool: Add support for new high speed adv Yuval Mintz
  2016-08-22  5:50 ` [PATCH ethtool 1/3] ethtool: Copy high-speed bits from ethtool.h Yuval Mintz
  2016-08-22  5:50 ` [PATCH ethtool 2/3] ethtool: Add support for 25g, 50g and 100g advertise Yuval Mintz
@ 2016-08-22  5:50 ` Yuval Mintz
  2016-08-22 19:32 ` [PATCH ethtool 0/3] ethtool: Add support for new high speed adv John W. Linville
  3 siblings, 0 replies; 6+ messages in thread
From: Yuval Mintz @ 2016-08-22  5:50 UTC (permalink / raw)
  To: netdev, linville; +Cc: vidya, Yuval Mintz

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
---
This is actually quite a horrible API - i.e., forcing the user to use
the same bits as defined in ethtool-copy.h instead of having some sort
of translation. But as these issues are already existing with current
modes [==> can't be changed without breaking backward compatibility]
I've continued doing the same.
---
 ethtool.8.in | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/ethtool.8.in b/ethtool.8.in
index 9269a8d..821d0bc 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -581,10 +581,20 @@ lB	l	lB.
 0x80000	10000baseKR Full
 0x200000	20000baseMLD2 Full	(not supported by IEEE standards)
 0x400000	20000baseKR2 Full	(not supported by IEEE standards)
+0x80000000	25000baseCR Full
+0x100000000	25000baseKR Full
+0x200000000	25000baseSR Full
 0x800000	40000baseKR4 Full
 0x1000000	40000baseCR4 Full
 0x2000000	40000baseSR4 Full
 0x4000000	40000baseLR4 Full
+0x400000000	50000baseCR2 Full
+0x800000000	50000baseKR2 Full
+0x10000000000	50000baseSR2 Full
+0x1000000000	100000baseKR4 Full
+0x2000000000	100000baseSR4 Full
+0x4000000000	100000baseCR4 Full
+0x8000000000	100000baseLR4_ER4 Full
 .TE
 .TP
 .BI phyad \ N
-- 
1.9.3

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

* Re: [PATCH ethtool 0/3] ethtool: Add support for new high speed adv.
  2016-08-22  5:50 [PATCH ethtool 0/3] ethtool: Add support for new high speed adv Yuval Mintz
                   ` (2 preceding siblings ...)
  2016-08-22  5:50 ` [PATCH ethtool 3/3] ethtool: Document new ethtool advertise speeds Yuval Mintz
@ 2016-08-22 19:32 ` John W. Linville
  2016-08-23  3:44   ` Yuval Mintz
  3 siblings, 1 reply; 6+ messages in thread
From: John W. Linville @ 2016-08-22 19:32 UTC (permalink / raw)
  To: Yuval Mintz; +Cc: netdev, vidya

On Mon, Aug 22, 2016 at 08:50:36AM +0300, Yuval Mintz wrote:
> This allows ethtool to utilize the link capabilities/adv./lp bitmasks
> to show and set the additional 25g, 50g and 100g link speeds.
> 
> Patches #1 & #2 are based on Vidya Sagar Ravipati's patches
> [with the only addition being the addition of the 50g SR2 mode],
> while patch #3 updates the man-page with the additional modes.
> 
> Can't claim to have tried all modes, although I did play with both
> 25g KR and 50g KR2 which seemed to be working fine.
> 
> Yuval Mintz (3):
>   ethtool: Copy high-speed bits from ethtool.h
>   ethtool: Add support 25g, 50g and 100g speeds
>   ethtool: Document new ethtool advertise speeds
> 
>  ethtool-copy.h | 12 +++++++++++-
>  ethtool.8.in   | 10 ++++++++++
>  ethtool.c      | 30 ++++++++++++++++++++++++++++++
>  3 files changed, 51 insertions(+), 1 deletion(-)

It looks like Vidya wasn't completely in-sync with you on this! But,
I like that you included the later bits for ethtool-copy.h and that
you added man page updates.

Could you and Vidya get together and post a unified patchset,
please? Or if Vidya posts the updates I requested, I can simply take
your (i.e. Yuval's) patch 3/3 on top of that.

John
-- 
John W. Linville		Someday the world will need a hero, yand you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* RE: [PATCH ethtool 0/3] ethtool: Add support for new high speed adv.
  2016-08-22 19:32 ` [PATCH ethtool 0/3] ethtool: Add support for new high speed adv John W. Linville
@ 2016-08-23  3:44   ` Yuval Mintz
  0 siblings, 0 replies; 6+ messages in thread
From: Yuval Mintz @ 2016-08-23  3:44 UTC (permalink / raw)
  To: John W. Linville, vidya; +Cc: netdev

> It looks like Vidya wasn't completely in-sync with you on this! But, I like that you
> included the later bits for ethtool-copy.h and that you added man page updates.
> 
> Could you and Vidya get together and post a unified patchset, please? Or if
> Vidya posts the updates I requested, I can simply take your (i.e. Yuval's) patch
> 3/3 on top of that.

My bad in not seeing he has re-posted.
Sure, although I don't think he actually needs me for it; Vidya should simply update
his #1 and #4 patches, and take #3 from this series.

Cheers,
Yuval

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

end of thread, other threads:[~2016-08-23  3:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22  5:50 [PATCH ethtool 0/3] ethtool: Add support for new high speed adv Yuval Mintz
2016-08-22  5:50 ` [PATCH ethtool 1/3] ethtool: Copy high-speed bits from ethtool.h Yuval Mintz
2016-08-22  5:50 ` [PATCH ethtool 2/3] ethtool: Add support for 25g, 50g and 100g advertise Yuval Mintz
2016-08-22  5:50 ` [PATCH ethtool 3/3] ethtool: Document new ethtool advertise speeds Yuval Mintz
2016-08-22 19:32 ` [PATCH ethtool 0/3] ethtool: Add support for new high speed adv John W. Linville
2016-08-23  3:44   ` Yuval Mintz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.