From nobody@FreeBSD.org  Wed Feb 13 07:46:20 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 6394EC4D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Feb 2013 07:46:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 43DC6A4
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Feb 2013 07:46:20 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r1D7kIZw054165
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Feb 2013 07:46:18 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r1D7kInW054164;
	Wed, 13 Feb 2013 07:46:18 GMT
	(envelope-from nobody)
Message-Id: <201302130746.r1D7kInW054164@red.freebsd.org>
Date: Wed, 13 Feb 2013 07:46:18 GMT
From: Josef Pojsl <jp@tns.cz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: lagg/lacp broken when aggregated interfaces have same speed but different media type
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         176097
>Category:       kern
>Synopsis:       [lagg] [patch] lagg/lacp broken when aggregated interfaces have same speed but different media type
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ae
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 13 07:50:00 UTC 2013
>Closed-Date:    Mon Nov 11 10:22:24 UTC 2013
>Last-Modified:  Mon Nov 11 10:40:00 UTC 2013
>Originator:     Josef Pojsl
>Release:        8.3-RELEASE-p3
>Organization:
TNS, a.s.
>Environment:
FreeBSD FW-C-02.kr-jihomoravsky.cz 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #24: Tue Jun 12 23:26:38 CEST 2012     root@builder864.pha.tns.cz:/usr/obj/usr/src/sys/KERNUN.amd64  amd64
>Description:
I have aggregated two interfaces with the same speed but slightly different type of media (namely 10Gbase-SR and 10Gbase-LR). There is a Cisco switch on the other side.

LACP won't work as my FreeBSD box computes the actor key differently for the two interfaces. This is weird as LACP inists on the same speed but not on the exact same type of media. Cisco has no problem having one aggregated interface Short and the other Long Range.

Outputs of ifconfig:
[root@FW-C-02 /var/log]# ifconfig ix0
ix0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=401bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
	ether 90:e2:ba:26:3a:18
	media: Ethernet autoselect (10Gbase-SR <full-duplex>)
	status: active
[root@FW-C-02 /var/log]# ifconfig ix1
ix1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=401bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
	ether 90:e2:ba:26:3a:18
	media: Ethernet autoselect (10Gbase-LR <full-duplex>)
	status: active
[root@FW-C-02 /var/log]# ifconfig -v lagg0
lagg0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        description: LAGG  options=401bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
        ether 90:e2:ba:26:3a:18
        media: Ethernet autoselect
        status: active
        groups: lagg 
        laggproto lacp
        lag id: [(8000,90-E2-BA-26-3A-18,0353,0000,0000),
                 (8000,20-FD-F1-DF-9A-84,000A,0000,0000)]
        laggport: ix1 flags=0<> state=D
                [(8000,90-E2-BA-26-3A-18,0352,8000,0002),
                 (8000,20-FD-F1-DF-9A-84,000A,8000,00B3)]
        laggport: ix0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> state=3D
                [(8000,90-E2-BA-26-3A-18,0353,8000,0001),
                 (8000,20-FD-F1-DF-9A-84,000A,8000,00B2)]

Please note that the actor key is 0352 (for ix1) and 0353 (for ix0) respectively.
>How-To-Repeat:
Aggregate two ix interfaces, one short-range, the other one long-range, into a lagg interface using lacp.

Excerpt from rc.conf:
ifconfig_ix0=" up descr OPT10SR"
ifconfig_ix1=" up descr OPT10LR"
ifconfig_lagg0="inet 127.0.1.1 netmask 255.255.255.255 descr LAGG laggport ix0 laggport ix1 laggproto lacp"
>Fix:
I have found the place in code where actor key is computed.  When using the same key for media types of the same speed, lacp starts working. Please see the attached patch file.

The ok result can be demonstrated with ifconfig:

[root@FW-C-02 /var/log]# ifconfig -v lagg0
lagg0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
	description: LAGG
	options=401bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,VLAN_HWTSO>
	ether 90:e2:ba:26:3a:18
	inet 127.0.1.1 netmask 0xffffffff broadcast 127.0.1.1
	media: Ethernet autoselect
	status: active
	groups: lagg 
	laggproto lacp
	lag id: [(8000,90-E2-BA-26-3A-18,0352,0000,0000),
		 (8000,20-FD-F1-DF-9A-84,000A,0000,0000)]
	laggport: ix1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> state=3D
		[(8000,90-E2-BA-26-3A-18,0352,8000,0002),
		 (8000,20-FD-F1-DF-9A-84,000A,8000,00B3)]
	laggport: ix0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING> state=3D
		[(8000,90-E2-BA-26-3A-18,0352,8000,0001),
		 (8000,20-FD-F1-DF-9A-84,000A,8000,00B2)]

Patch attached with submission follows:

*** sys/net/ieee8023ad_lacp.c.orig	2013-02-12 21:03:16.000000000 +0100
--- sys/net/ieee8023ad_lacp.c	2013-02-12 21:13:39.000000000 +0100
***************
*** 1028,1035 ****
  		KASSERT(IFM_TYPE(media) == IFM_ETHER, ("invalid media type"));
  		KASSERT((media & IFM_FDX) != 0, ("aggregating HDX interface"));
  
! 		/* bit 0..4:	IFM_SUBTYPE */
! 		key = subtype;
  		/* bit 5..14:	(some bits of) if_index of lagg device */
  		key |= 0x7fe0 & ((sc->sc_ifp->if_index) << 5);
  		/* bit 15:	0 */
--- 1028,1063 ----
  		KASSERT(IFM_TYPE(media) == IFM_ETHER, ("invalid media type"));
  		KASSERT((media & IFM_FDX) != 0, ("aggregating HDX interface"));
  
! 		/* bit 0..4:	IFM_SUBTYPE modulo speed */
! 		switch (subtype) {
! 		case IFM_10_T:
! 		case IFM_10_2:
! 		case IFM_10_5:
! 		case IFM_10_STP:
! 		case IFM_10_FL:
! 			key = IFM_10_T; break;
! 		case IFM_100_TX:
! 		case IFM_100_FX:
! 		case IFM_100_T4:
! 		case IFM_100_VG:
! 		case IFM_100_T2:
! 			key = IFM_100_TX; break;
! 		case IFM_1000_SX:
! 		case IFM_1000_LX:
! 		case IFM_1000_CX:
! 		case IFM_1000_T:
! 			key = IFM_1000_SX; break;
! 		case IFM_10G_LR:
! 		case IFM_10G_SR:
! 		case IFM_10G_CX4:
! 		case IFM_10G_TWINAX:
! 		case IFM_10G_TWINAX_LONG:
! 		case IFM_10G_LRM:
! 		case IFM_10G_T:
! 			key = IFM_10G_LR; break;
! 		default:
! 			key = subtype;
! 		}
  		/* bit 5..14:	(some bits of) if_index of lagg device */
  		key |= 0x7fe0 & ((sc->sc_ifp->if_index) << 5);
  		/* bit 15:	0 */


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Feb 13 16:00:22 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176097 
State-Changed-From-To: open->patched 
State-Changed-By: ae 
State-Changed-When: Thu Oct 17 15:15:18 UTC 2013 
State-Changed-Why:  
Committed in head/. Thanks! 


Responsible-Changed-From-To: freebsd-net->ae 
Responsible-Changed-By: ae 
Responsible-Changed-When: Thu Oct 17 15:15:18 UTC 2013 
Responsible-Changed-Why:  
Take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176097 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/176097: commit references a PR
Date: Thu, 17 Oct 2013 15:15:06 +0000 (UTC)

 Author: ae
 Date: Thu Oct 17 15:14:58 2013
 New Revision: 256689
 URL: http://svnweb.freebsd.org/changeset/base/256689
 
 Log:
   Use the same actor key for media types of the same speed.
   
   PR:		176097
   MFC after:	2 weeks
 
 Modified:
   head/sys/net/ieee8023ad_lacp.c
 
 Modified: head/sys/net/ieee8023ad_lacp.c
 ==============================================================================
 --- head/sys/net/ieee8023ad_lacp.c	Thu Oct 17 14:20:44 2013	(r256688)
 +++ head/sys/net/ieee8023ad_lacp.c	Thu Oct 17 15:14:58 2013	(r256689)
 @@ -1089,8 +1089,45 @@ lacp_compose_key(struct lacp_port *lp)
  		KASSERT(IFM_TYPE(media) == IFM_ETHER, ("invalid media type"));
  		KASSERT((media & IFM_FDX) != 0, ("aggregating HDX interface"));
  
 -		/* bit 0..4:	IFM_SUBTYPE */
 -		key = subtype;
 +		/* bit 0..4:	IFM_SUBTYPE modulo speed */
 +		switch (subtype) {
 +		case IFM_10_T:
 +		case IFM_10_2:
 +		case IFM_10_5:
 +		case IFM_10_STP:
 +		case IFM_10_FL:
 +			key = IFM_10_T;
 +			break;
 +		case IFM_100_TX:
 +		case IFM_100_FX:
 +		case IFM_100_T4:
 +		case IFM_100_VG:
 +		case IFM_100_T2:
 +			key = IFM_100_TX;
 +			break;
 +		case IFM_1000_SX:
 +		case IFM_1000_LX:
 +		case IFM_1000_CX:
 +		case IFM_1000_T:
 +			key = IFM_1000_SX;
 +			break;
 +		case IFM_10G_LR:
 +		case IFM_10G_SR:
 +		case IFM_10G_CX4:
 +		case IFM_10G_TWINAX:
 +		case IFM_10G_TWINAX_LONG:
 +		case IFM_10G_LRM:
 +		case IFM_10G_T:
 +			key = IFM_10G_LR;
 +			break;
 +		case IFM_40G_CR4:
 +		case IFM_40G_SR4:
 +		case IFM_40G_LR4:
 +			key = IFM_40G_CR4;
 +			break;
 +		default:
 +			key = subtype;
 +		}
  		/* bit 5..14:	(some bits of) if_index of lagg device */
  		key |= 0x7fe0 & ((sc->sc_ifp->if_index) << 5);
  		/* bit 15:	0 */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/176097: commit references a PR
Date: Mon, 11 Nov 2013 09:47:59 +0000 (UTC)

 Author: ae
 Date: Mon Nov 11 09:47:51 2013
 New Revision: 257956
 URL: http://svnweb.freebsd.org/changeset/base/257956
 
 Log:
   MFC r256689:
     Use the same actor key for media types of the same speed.
   
     PR:		176097
   
   MFC r256832:
     Add a note that lacp_compose_key() should be updated, when new media
     types will be added.
   
     Submitted by:	melifaro
   
   Approved by:	re (hrs)
 
 Modified:
   stable/10/sys/net/ieee8023ad_lacp.c
   stable/10/sys/net/if_media.h
 Directory Properties:
   stable/10/sys/   (props changed)
 
 Modified: stable/10/sys/net/ieee8023ad_lacp.c
 ==============================================================================
 --- stable/10/sys/net/ieee8023ad_lacp.c	Mon Nov 11 09:47:33 2013	(r257955)
 +++ stable/10/sys/net/ieee8023ad_lacp.c	Mon Nov 11 09:47:51 2013	(r257956)
 @@ -1089,8 +1089,45 @@ lacp_compose_key(struct lacp_port *lp)
  		KASSERT(IFM_TYPE(media) == IFM_ETHER, ("invalid media type"));
  		KASSERT((media & IFM_FDX) != 0, ("aggregating HDX interface"));
  
 -		/* bit 0..4:	IFM_SUBTYPE */
 -		key = subtype;
 +		/* bit 0..4:	IFM_SUBTYPE modulo speed */
 +		switch (subtype) {
 +		case IFM_10_T:
 +		case IFM_10_2:
 +		case IFM_10_5:
 +		case IFM_10_STP:
 +		case IFM_10_FL:
 +			key = IFM_10_T;
 +			break;
 +		case IFM_100_TX:
 +		case IFM_100_FX:
 +		case IFM_100_T4:
 +		case IFM_100_VG:
 +		case IFM_100_T2:
 +			key = IFM_100_TX;
 +			break;
 +		case IFM_1000_SX:
 +		case IFM_1000_LX:
 +		case IFM_1000_CX:
 +		case IFM_1000_T:
 +			key = IFM_1000_SX;
 +			break;
 +		case IFM_10G_LR:
 +		case IFM_10G_SR:
 +		case IFM_10G_CX4:
 +		case IFM_10G_TWINAX:
 +		case IFM_10G_TWINAX_LONG:
 +		case IFM_10G_LRM:
 +		case IFM_10G_T:
 +			key = IFM_10G_LR;
 +			break;
 +		case IFM_40G_CR4:
 +		case IFM_40G_SR4:
 +		case IFM_40G_LR4:
 +			key = IFM_40G_CR4;
 +			break;
 +		default:
 +			key = subtype;
 +		}
  		/* bit 5..14:	(some bits of) if_index of lagg device */
  		key |= 0x7fe0 & ((sc->sc_ifp->if_index) << 5);
  		/* bit 15:	0 */
 
 Modified: stable/10/sys/net/if_media.h
 ==============================================================================
 --- stable/10/sys/net/if_media.h	Mon Nov 11 09:47:33 2013	(r257955)
 +++ stable/10/sys/net/if_media.h	Mon Nov 11 09:47:51 2013	(r257956)
 @@ -153,7 +153,10 @@ uint64_t	ifmedia_baudrate(int);
  #define	IFM_40G_CR4	27		/* 40GBase-CR4 */
  #define	IFM_40G_SR4	28		/* 40GBase-SR4 */
  #define	IFM_40G_LR4	29		/* 40GBase-LR4 */
 -
 +/*
 + * Please update ieee8023ad_lacp.c:lacp_compose_key()
 + * after adding new Ethernet media types.
 + */
  /* note 31 is the max! */
  
  #define	IFM_ETH_MASTER	0x00000100	/* master mode (1000baseT) */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/176097: commit references a PR
Date: Mon, 11 Nov 2013 10:10:01 +0000 (UTC)

 Author: ae
 Date: Mon Nov 11 10:09:52 2013
 New Revision: 257959
 URL: http://svnweb.freebsd.org/changeset/base/257959
 
 Log:
   MFC r256689:
     Use the same actor key for media types of the same speed.
   
     PR:		176097
   
   MFC r256832:
     Add a note that lacp_compose_key() should be updated, when new media
     types will be added.
   
     Submitted by:	melifaro
 
 Modified:
   stable/9/sys/net/ieee8023ad_lacp.c
   stable/9/sys/net/if_media.h
 Directory Properties:
   stable/9/sys/   (props changed)
   stable/9/sys/net/   (props changed)
 
 Modified: stable/9/sys/net/ieee8023ad_lacp.c
 ==============================================================================
 --- stable/9/sys/net/ieee8023ad_lacp.c	Mon Nov 11 10:00:19 2013	(r257958)
 +++ stable/9/sys/net/ieee8023ad_lacp.c	Mon Nov 11 10:09:52 2013	(r257959)
 @@ -1028,8 +1028,45 @@ lacp_compose_key(struct lacp_port *lp)
  		KASSERT(IFM_TYPE(media) == IFM_ETHER, ("invalid media type"));
  		KASSERT((media & IFM_FDX) != 0, ("aggregating HDX interface"));
  
 -		/* bit 0..4:	IFM_SUBTYPE */
 -		key = subtype;
 +		/* bit 0..4:	IFM_SUBTYPE modulo speed */
 +		switch (subtype) {
 +		case IFM_10_T:
 +		case IFM_10_2:
 +		case IFM_10_5:
 +		case IFM_10_STP:
 +		case IFM_10_FL:
 +			key = IFM_10_T;
 +			break;
 +		case IFM_100_TX:
 +		case IFM_100_FX:
 +		case IFM_100_T4:
 +		case IFM_100_VG:
 +		case IFM_100_T2:
 +			key = IFM_100_TX;
 +			break;
 +		case IFM_1000_SX:
 +		case IFM_1000_LX:
 +		case IFM_1000_CX:
 +		case IFM_1000_T:
 +			key = IFM_1000_SX;
 +			break;
 +		case IFM_10G_LR:
 +		case IFM_10G_SR:
 +		case IFM_10G_CX4:
 +		case IFM_10G_TWINAX:
 +		case IFM_10G_TWINAX_LONG:
 +		case IFM_10G_LRM:
 +		case IFM_10G_T:
 +			key = IFM_10G_LR;
 +			break;
 +		case IFM_40G_CR4:
 +		case IFM_40G_SR4:
 +		case IFM_40G_LR4:
 +			key = IFM_40G_CR4;
 +			break;
 +		default:
 +			key = subtype;
 +		}
  		/* bit 5..14:	(some bits of) if_index of lagg device */
  		key |= 0x7fe0 & ((sc->sc_ifp->if_index) << 5);
  		/* bit 15:	0 */
 
 Modified: stable/9/sys/net/if_media.h
 ==============================================================================
 --- stable/9/sys/net/if_media.h	Mon Nov 11 10:00:19 2013	(r257958)
 +++ stable/9/sys/net/if_media.h	Mon Nov 11 10:09:52 2013	(r257959)
 @@ -153,7 +153,10 @@ uint64_t	ifmedia_baudrate(int);
  #define	IFM_40G_CR4	27		/* 40GBase-CR4 */
  #define	IFM_40G_SR4	28		/* 40GBase-SR4 */
  #define	IFM_40G_LR4	29		/* 40GBase-LR4 */
 -
 +/*
 + * Please update ieee8023ad_lacp.c:lacp_compose_key()
 + * after adding new Ethernet media types.
 + */
  /* note 31 is the max! */
  
  #define	IFM_ETH_MASTER	0x00000100	/* master mode (1000baseT) */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: ae 
State-Changed-When: Mon Nov 11 10:21:55 UTC 2013 
State-Changed-Why:  
Merged to stable/9 and stable/10. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=176097 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/176097: commit references a PR
Date: Mon, 11 Nov 2013 10:38:45 +0000 (UTC)

 Author: ae
 Date: Mon Nov 11 10:38:37 2013
 New Revision: 257960
 URL: http://svnweb.freebsd.org/changeset/base/257960
 
 Log:
   MFC r256689 (modified):
     Use the same actor key for media types of the same speed.
   
     PR:		176097
   
   MFC r256832:
     Add a note that lacp_compose_key() should be updated, when new media
     types will be added.
   
     Submitted by:	melifaro
 
 Modified:
   stable/8/sys/net/ieee8023ad_lacp.c
   stable/8/sys/net/if_media.h
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/net/   (props changed)
 
 Modified: stable/8/sys/net/ieee8023ad_lacp.c
 ==============================================================================
 --- stable/8/sys/net/ieee8023ad_lacp.c	Mon Nov 11 10:09:52 2013	(r257959)
 +++ stable/8/sys/net/ieee8023ad_lacp.c	Mon Nov 11 10:38:37 2013	(r257960)
 @@ -1028,8 +1028,40 @@ lacp_compose_key(struct lacp_port *lp)
  		KASSERT(IFM_TYPE(media) == IFM_ETHER, ("invalid media type"));
  		KASSERT((media & IFM_FDX) != 0, ("aggregating HDX interface"));
  
 -		/* bit 0..4:	IFM_SUBTYPE */
 -		key = subtype;
 +		/* bit 0..4:	IFM_SUBTYPE modulo speed */
 +		switch (subtype) {
 +		case IFM_10_T:
 +		case IFM_10_2:
 +		case IFM_10_5:
 +		case IFM_10_STP:
 +		case IFM_10_FL:
 +			key = IFM_10_T;
 +			break;
 +		case IFM_100_TX:
 +		case IFM_100_FX:
 +		case IFM_100_T4:
 +		case IFM_100_VG:
 +		case IFM_100_T2:
 +			key = IFM_100_TX;
 +			break;
 +		case IFM_1000_SX:
 +		case IFM_1000_LX:
 +		case IFM_1000_CX:
 +		case IFM_1000_T:
 +			key = IFM_1000_SX;
 +			break;
 +		case IFM_10G_LR:
 +		case IFM_10G_SR:
 +		case IFM_10G_CX4:
 +		case IFM_10G_TWINAX:
 +		case IFM_10G_TWINAX_LONG:
 +		case IFM_10G_LRM:
 +		case IFM_10G_T:
 +			key = IFM_10G_LR;
 +			break;
 +		default:
 +			key = subtype;
 +		}
  		/* bit 5..14:	(some bits of) if_index of lagg device */
  		key |= 0x7fe0 & ((sc->sc_ifp->if_index) << 5);
  		/* bit 15:	0 */
 
 Modified: stable/8/sys/net/if_media.h
 ==============================================================================
 --- stable/8/sys/net/if_media.h	Mon Nov 11 10:09:52 2013	(r257959)
 +++ stable/8/sys/net/if_media.h	Mon Nov 11 10:38:37 2013	(r257960)
 @@ -150,7 +150,10 @@ uint64_t	ifmedia_baudrate(int);
  #define	IFM_10G_LRM	24		/* 10GBase-LRM 850nm Multi-mode */
  #define	IFM_UNKNOWN	25		/* media types not defined yet */
  #define	IFM_10G_T	26		/* 10GBase-T - RJ45 */
 -
 +/*
 + * Please update ieee8023ad_lacp.c:lacp_compose_key()
 + * after adding new Ethernet media types.
 + */
  /* note 31 is the max! */
  
  #define	IFM_ETH_MASTER	0x00000100	/* master mode (1000baseT) */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
