Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107335695
D7924.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
D7924.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
@@ -435,6 +435,8 @@
struct ndis_rssprm_toeplitz *rss = &sc->hn_rss;
int i;
+ KASSERT(nchan > 1, ("invalid # of channels %d", nchan));
+
/*
* Check indirect table to make sure that all channels in it
* can be used.
@@ -2145,7 +2147,12 @@
if (error)
goto back;
- error = hn_rss_reconfig(sc);
+ if (sc->hn_rx_ring_inuse > 1) {
+ error = hn_rss_reconfig(sc);
+ } else {
+ /* Not RSS capable, at least for now; just save the RSS key. */
+ error = 0;
+ }
back:
HN_UNLOCK(sc);
return (error);
@@ -2163,6 +2170,15 @@
if (error || req->newptr == NULL)
goto back;
+ /*
+ * Don't allow RSS indirect table change, if this interface is not
+ * RSS capable currently.
+ */
+ if (sc->hn_rx_ring_inuse == 1) {
+ error = EOPNOTSUPP;
+ goto back;
+ }
+
error = SYSCTL_IN(req, sc->hn_rss.rss_ind, sizeof(sc->hn_rss.rss_ind));
if (error)
goto back;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 13, 4:20 PM (15 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15784060
Default Alt Text
D7924.diff (1 KB)
Attached To
Mode
D7924: hyperv/hn: Stringent RSS sysctl checks
Attached
Detach File
Event Timeline
Log In to Comment