Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174612679
D7916.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7916.diff
View Options
Index: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
===================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -428,6 +428,26 @@
return (0);
}
+static void
+hn_rss_ind_fixup(struct hn_softc *sc, int nchan)
+{
+ struct ndis_rssprm_toeplitz *rss = &sc->hn_rss;
+ int i;
+
+ /*
+ * Check indirect table to make sure that all channels in it
+ * can be used.
+ */
+ for (i = 0; i < NDIS_HASH_INDCNT; ++i) {
+ if (rss->rss_ind[i] >= nchan) {
+ if_printf(sc->hn_ifp,
+ "RSS indirect table %d fixup: %u -> %d\n",
+ i, rss->rss_ind[i], nchan - 1);
+ rss->rss_ind[i] = nchan - 1;
+ }
+ }
+}
+
static int
hn_ifmedia_upd(struct ifnet *ifp __unused)
{
@@ -2112,6 +2132,7 @@
if (error)
goto back;
+ hn_rss_ind_fixup(sc, sc->hn_rx_ring_inuse);
error = hn_rss_reconfig(sc);
back:
HN_UNLOCK(sc);
@@ -3265,6 +3286,13 @@
/* TODO: Take ndis_rss_caps.ndis_nind into account. */
for (i = 0; i < NDIS_HASH_INDCNT; ++i)
rss->rss_ind[i] = i % nchan;
+ } else {
+ /*
+ * # of usable channels may be changed, so we have to
+ * make sure that all entries in RSS indirect table
+ * are valid.
+ */
+ hn_rss_ind_fixup(sc, nchan);
}
error = hn_rndis_conf_rss(sc, NDIS_RSS_FLAG_NONE);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 5, 4:32 PM (2 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40247056
Default Alt Text
D7916.diff (1 KB)
Attached To
Mode
D7916: hyperv/hn: Apply RSS indirect table fixup before configure RNDIS RSS.
Attached
Detach File
Event Timeline
Log In to Comment