diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 8f940f0c6d6..001cf20a60a 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -126,7 +126,7 @@ __FBSDID("$FreeBSD$"); #define HN_XPNT_VF_ATTWAIT_MIN 2 /* seconds */ /* YYY should get it from the underlying channel */ -#define HN_TX_DESC_CNT 512 +#define HN_TX_DESC_CNT 256 #define HN_RNDIS_PKT_LEN \ (sizeof(struct rndis_packet_msg) + \ @@ -952,11 +952,14 @@ done: static int hn_get_txswq_depth(const struct hn_tx_ring *txr) { + int target; KASSERT(txr->hn_txdesc_cnt > 0, ("tx ring is not setup yet")); - if (hn_tx_swq_depth < txr->hn_txdesc_cnt) - return txr->hn_txdesc_cnt; - return hn_tx_swq_depth; + target = txr->hn_txdesc_cnt * 4; + + if (hn_tx_swq_depth < target) + return (target); + return (hn_tx_swq_depth); } #ifndef RSS