svn commit: r323221 - head/sys/net

Navdeep Parhar np at FreeBSD.org
Wed Sep 6 14:36:36 UTC 2017


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;
 


More information about the svn-src-all mailing list