Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135539968
D12175.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
D12175.diff
View Options
Index: head/sys/dev/hyperv/netvsc/if_hn.c
===================================================================
--- head/sys/dev/hyperv/netvsc/if_hn.c
+++ head/sys/dev/hyperv/netvsc/if_hn.c
@@ -3316,6 +3316,8 @@
struct ifreq *ifr = (struct ifreq *)data, ifr_vf;
struct ifnet *vf_ifp;
int mask, error = 0;
+ struct ifrsskey *ifrk;
+ struct ifrsshash *ifrh;
switch (cmd) {
case SIOCSIFMTU:
@@ -3571,6 +3573,56 @@
}
HN_UNLOCK(sc);
error = ifmedia_ioctl(ifp, ifr, &sc->hn_media, cmd);
+ break;
+
+ case SIOCGIFRSSHASH:
+ ifrh = (struct ifrsshash *)data;
+ HN_LOCK(sc);
+ if (sc->hn_rx_ring_inuse == 1) {
+ HN_UNLOCK(sc);
+ ifrh->ifrh_func = RSS_FUNC_NONE;
+ ifrh->ifrh_types = 0;
+ break;
+ }
+
+ if (sc->hn_rss_hash & NDIS_HASH_FUNCTION_TOEPLITZ)
+ ifrh->ifrh_func = RSS_FUNC_TOEPLITZ;
+ else
+ ifrh->ifrh_func = RSS_FUNC_PRIVATE;
+
+ ifrh->ifrh_types = 0;
+ if (sc->hn_rss_hash & NDIS_HASH_IPV4)
+ ifrh->ifrh_types |= RSS_TYPE_IPV4;
+ if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV4)
+ ifrh->ifrh_types |= RSS_TYPE_TCP_IPV4;
+ if (sc->hn_rss_hash & NDIS_HASH_IPV6)
+ ifrh->ifrh_types |= RSS_TYPE_IPV6;
+ if (sc->hn_rss_hash & NDIS_HASH_IPV6_EX)
+ ifrh->ifrh_types |= RSS_TYPE_IPV6_EX;
+ if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV6)
+ ifrh->ifrh_types |= RSS_TYPE_TCP_IPV6;
+ if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV6_EX)
+ ifrh->ifrh_types |= RSS_TYPE_TCP_IPV6_EX;
+ HN_UNLOCK(sc);
+ break;
+
+ case SIOCGIFRSSKEY:
+ ifrk = (struct ifrsskey *)data;
+ HN_LOCK(sc);
+ if (sc->hn_rx_ring_inuse == 1) {
+ HN_UNLOCK(sc);
+ ifrk->ifrk_func = RSS_FUNC_NONE;
+ ifrk->ifrk_keylen = 0;
+ break;
+ }
+ if (sc->hn_rss_hash & NDIS_HASH_FUNCTION_TOEPLITZ)
+ ifrk->ifrk_func = RSS_FUNC_TOEPLITZ;
+ else
+ ifrk->ifrk_func = RSS_FUNC_PRIVATE;
+ ifrk->ifrk_keylen = NDIS_HASH_KEYSIZE_TOEPLITZ;
+ memcpy(ifrk->ifrk_key, sc->hn_rss.rss_key,
+ NDIS_HASH_KEYSIZE_TOEPLITZ);
+ HN_UNLOCK(sc);
break;
default:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 11, 4:01 PM (1 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25170123
Default Alt Text
D12175.diff (1 KB)
Attached To
Mode
D12175: hyperv/hn: Implement SIOCGIFRSS{KEY,HASH}.
Attached
Detach File
Event Timeline
Log In to Comment