Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Sep 2017 14:36:35 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r323221 - head/sys/net
Message-ID:  <201709061436.v86EaZEO091780@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Wed Sep  6 14:36:35 2017
New Revision: 323221
URL: https://svnweb.freebsd.org/changeset/base/323221

Log:
  Make LACP based lagg work with interfaces (like 100Gbps and 25Gbps) that
  report extended media types.
  
  lacp_aggregator_bandwidth() uses the media to determine the speed of the
  interface and returns 0 for IFM_OTHER without the bits in the extended
  range.
  
  Reported by:	kbowling@
  Reviewed by:	eugen_grosbein.net, mjoras@
  MFC after:	1 week
  Sponsored by:	Chelsio Communications
  Differential Revision:	https://reviews.freebsd.org/D12188

Modified:
  head/sys/net/ieee8023ad_lacp.c

Modified: head/sys/net/ieee8023ad_lacp.c
==============================================================================
--- head/sys/net/ieee8023ad_lacp.c	Wed Sep  6 13:59:57 2017	(r323220)
+++ head/sys/net/ieee8023ad_lacp.c	Wed Sep  6 14:36:35 2017	(r323221)
@@ -463,7 +463,11 @@ lacp_linkstate(struct lagg_port *lgp)
 	uint16_t old_key;
 
 	bzero((char *)&ifmr, sizeof(ifmr));
-	error = (*ifp->if_ioctl)(ifp, SIOCGIFMEDIA, (caddr_t)&ifmr);
+	error = (*ifp->if_ioctl)(ifp, SIOCGIFXMEDIA, (caddr_t)&ifmr);
+	if (error != 0) {
+		bzero((char *)&ifmr, sizeof(ifmr));
+		error = (*ifp->if_ioctl)(ifp, SIOCGIFMEDIA, (caddr_t)&ifmr);
+	}
 	if (error != 0)
 		return;
 



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