Date: Sat, 3 Mar 2018 00:10:38 +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-11@freebsd.org Subject: svn commit: r330301 - stable/11/sys/net Message-ID: <201803030010.w230AcMa015288@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Sat Mar 3 00:10:37 2018 New Revision: 330301 URL: https://svnweb.freebsd.org/changeset/base/330301 Log: MFC r323221: 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@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D12188 Modified: stable/11/sys/net/ieee8023ad_lacp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/11/sys/net/ieee8023ad_lacp.c Fri Mar 2 23:31:55 2018 (r330300) +++ stable/11/sys/net/ieee8023ad_lacp.c Sat Mar 3 00:10:37 2018 (r330301) @@ -461,7 +461,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?201803030010.w230AcMa015288>