Date: Mon, 29 Aug 2016 05:08:53 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304976 - head/sys/dev/hyperv/netvsc Message-ID: <201608290508.u7T58r15043080@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sephe Date: Mon Aug 29 05:08:53 2016 New Revision: 304976 URL: https://svnweb.freebsd.org/changeset/base/304976 Log: hyperv/hn: Fix # of channels setting, if RSS is not available. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7657 Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Mon Aug 29 04:54:13 2016 (r304975) +++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Mon Aug 29 05:08:53 2016 (r304976) @@ -1377,8 +1377,14 @@ hv_rf_on_device_add(struct hn_softc *sc, dev_info->link_state = rndis_dev->link_status; - if (sc->hn_ndis_ver < NDIS_VERSION_6_30 || nchan == 1) + if (sc->hn_ndis_ver < NDIS_VERSION_6_30 || nchan == 1) { + /* + * Either RSS is not supported, or multiple RX/TX rings + * are not requested. + */ + *nchan0 = 1; return (0); + } /* * Get RSS capabilities, e.g. # of RX rings, and # of indirect @@ -1386,9 +1392,9 @@ hv_rf_on_device_add(struct hn_softc *sc, */ ret = hn_rndis_get_rsscaps(sc, &rxr_cnt); if (ret) { - /* This is benign. */ - ret = 0; - goto out; + /* No RSS; this is benign. */ + *nchan0 = 1; + return (0); } if (nchan > rxr_cnt) nchan = rxr_cnt;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608290508.u7T58r15043080>