Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2019 20:28:34 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r353414 - stable/10/sys/net
Message-ID:  <201910102028.x9AKSYBg067574@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Thu Oct 10 20:28:34 2019
New Revision: 353414
URL: https://svnweb.freebsd.org/changeset/base/353414

Log:
  MFC r318147 (by erj@):
  
  Add several new media types to if_media.h
  
  These include several 25G types (for active direct attach cables and LR modules),
  and a missing type for 10G active direct attach.

Modified:
  stable/10/sys/net/ieee8023ad_lacp.c
  stable/10/sys/net/if_media.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net/ieee8023ad_lacp.c
==============================================================================
--- stable/10/sys/net/ieee8023ad_lacp.c	Thu Oct 10 18:52:24 2019	(r353413)
+++ stable/10/sys/net/ieee8023ad_lacp.c	Thu Oct 10 20:28:34 2019	(r353414)
@@ -1091,6 +1091,7 @@ lacp_compose_key(struct lacp_port *lp)
 		case IFM_10G_CR1:
 		case IFM_10G_ER:
 		case IFM_10G_SFI:
+		case IFM_10G_AOC:
 			key = IFM_10G_LR;
 			break;
 		case IFM_20G_KR2:
@@ -1115,6 +1116,9 @@ lacp_compose_key(struct lacp_port *lp)
 		case IFM_25G_CR:
 		case IFM_25G_KR:
 		case IFM_25G_SR:
+		case IFM_25G_LR:
+		case IFM_25G_ACC:
+		case IFM_25G_AOC:
 			key = IFM_25G_PCIE;
 			break;
 		case IFM_40G_CR4:

Modified: stable/10/sys/net/if_media.h
==============================================================================
--- stable/10/sys/net/if_media.h	Thu Oct 10 18:52:24 2019	(r353413)
+++ stable/10/sys/net/if_media.h	Thu Oct 10 20:28:34 2019	(r353414)
@@ -193,6 +193,10 @@ uint64_t	ifmedia_baudrate(int);
 #define	IFM_25G_SR	IFM_X(55)	/* 25GBase-SR */
 #define	IFM_50G_CR2	IFM_X(56)	/* 50GBase-CR2 */
 #define	IFM_50G_KR2	IFM_X(57)	/* 50GBase-KR2 */
+#define	IFM_25G_LR	IFM_X(58)	/* 25GBase-LR */
+#define	IFM_10G_AOC	IFM_X(59)	/* 10G active optical cable */
+#define	IFM_25G_ACC	IFM_X(60)	/* 25G active copper cable */
+#define	IFM_25G_AOC	IFM_X(61)	/* 25G active optical cable */
 
 /*
  * Please update ieee8023ad_lacp.c:lacp_compose_key()
@@ -444,6 +448,10 @@ struct ifmedia_description {
 	{ IFM_25G_SR,	"25GBase-SR" },					\
 	{ IFM_50G_CR2,	"50GBase-CR2" },				\
 	{ IFM_50G_KR2,	"50GBase-KR2" },				\
+	{ IFM_25G_LR,	"25GBase-LR" },					\
+	{ IFM_10G_AOC,	"10GBase-AOC" },				\
+	{ IFM_25G_ACC,	"25GBase-ACC" },				\
+	{ IFM_25G_AOC,	"25GBase-AOC" },				\
 	{ 0, NULL },							\
 }
 
@@ -772,6 +780,10 @@ struct ifmedia_baudrate {
 	{ IFM_ETHER | IFM_25G_SR,	IF_Gbps(25ULL) },		\
 	{ IFM_ETHER | IFM_50G_CR2,	IF_Gbps(50ULL) },		\
 	{ IFM_ETHER | IFM_50G_KR2,	IF_Gbps(50ULL) },		\
+	{ IFM_ETHER | IFM_25G_LR,	IF_Gbps(25ULL) },		\
+	{ IFM_ETHER | IFM_10G_AOC,	IF_Gbps(10ULL) },		\
+	{ IFM_ETHER | IFM_25G_ACC,	IF_Gbps(25ULL) },		\
+	{ IFM_ETHER | IFM_25G_AOC,	IF_Gbps(25ULL) },		\
 									\
 	{ IFM_TOKEN | IFM_TOK_STP4,	IF_Mbps(4) },			\
 	{ IFM_TOKEN | IFM_TOK_STP16,	IF_Mbps(16) },			\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910102028.x9AKSYBg067574>