From 62cffb8d9339bf6a0a2b43453e8d30ff9d1e5de1 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Mon, 25 Apr 2016 03:14:55 +0000 Subject: [PATCH] hn: Increase odrops for if_transmit method if drbr_enqueue fails. MFC after: 1 week Sponsored by: Microsoft OSTC --- sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c index 906aeed6efec..b01930c7b456 100644 --- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c +++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c @@ -2700,8 +2700,10 @@ hn_transmit(struct ifnet *ifp, struct mbuf *m) txr = &sc->hn_tx_ring[idx]; error = drbr_enqueue(ifp, txr->hn_mbuf_br, m); - if (error) + if (error) { + if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); return error; + } if (txr->hn_oactive) return 0;