Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153078544
D5879.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
866 B
Referenced Files
None
Subscribers
None
D5879.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
@@ -136,6 +136,8 @@
#define HN_LROENT_CNT_DEF 128
+#define HN_RING_CNT_DEF_MAX 8
+
#define HN_RNDIS_MSG_LEN \
(sizeof(rndis_msg) + \
RNDIS_HASH_PPI_SIZE + \
@@ -460,8 +462,14 @@
* The # of RX rings to use is same as the # of channels to use.
*/
ring_cnt = hn_chan_cnt;
- if (ring_cnt <= 0 || ring_cnt > mp_ncpus)
+ if (ring_cnt <= 0) {
+ /* Default */
+ ring_cnt = mp_ncpus;
+ if (ring_cnt > HN_RING_CNT_DEF_MAX)
+ ring_cnt = HN_RING_CNT_DEF_MAX;
+ } else if (ring_cnt > mp_ncpus) {
ring_cnt = mp_ncpus;
+ }
tx_ring_cnt = hn_tx_ring_cnt;
if (tx_ring_cnt <= 0 || tx_ring_cnt > ring_cnt)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 12:05 AM (3 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31810307
Default Alt Text
D5879.diff (866 B)
Attached To
Mode
D5879: hyperv/hn: Cap default # of rings to 8.
Attached
Detach File
Event Timeline
Log In to Comment