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.

Differential Revision:	https://reviews.freebsd.org/D10425
Reviewed by:	smh, imp
MFC after:	3 days
Sponsored by:	Intel Corporation
This commit is contained in:
Eric Joyner 2017-05-10 18:33:40 +00:00
parent 0ce59aa848
commit 6e105d4e35
2 changed files with 16 additions and 0 deletions

View File

@ -1121,6 +1121,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:
@ -1145,6 +1146,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:

View File

@ -196,6 +196,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()
@ -450,6 +454,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 }, \
}
@ -782,6 +790,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) }, \