svn commit: r298561 - head/sys/dev/hyperv/netvsc

Sepherosa Ziehau sephe at FreeBSD.org
Mon Apr 25 03:14:56 UTC 2016


Author: sephe
Date: Mon Apr 25 03:14:55 2016
New Revision: 298561
URL: https://svnweb.freebsd.org/changeset/base/298561

Log:
  hn: Increase odrops for if_transmit method if drbr_enqueue fails.
  
  MFC after:	1 week
  Sponsored by:	Microsoft OSTC

Modified:
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c	Mon Apr 25 03:01:57 2016	(r298560)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c	Mon Apr 25 03:14:55 2016	(r298561)
@@ -2700,8 +2700,10 @@ hn_transmit(struct ifnet *ifp, struct mb
 	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;


More information about the svn-src-head mailing list