Module Name:    src
Committed By:   msaitoh
Date:           Fri Dec 16 08:24:41 UTC 2016

Modified Files:
        src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
 The rx_bytes event counter is cleared when if_init() is called, but not for
rx_packets. It's inconsistent. It makes rx_packets is bigger than rx_bytes.
IMHO, it's not required to clear them. At least the above comment says
"/* Setup our descriptor indices */". It's not descriptor indice...


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.12 src/sys/dev/pci/ixgbe/ix_txrx.c:1.13
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.12	Thu Dec 15 09:28:05 2016
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Fri Dec 16 08:24:40 2016
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/ix_txrx.c 301538 2016-06-07 04:51:50Z sephe $*/
-/*$NetBSD: ix_txrx.c,v 1.12 2016/12/15 09:28:05 ozaki-r Exp $*/
+/*$NetBSD: ix_txrx.c,v 1.13 2016/12/16 08:24:40 msaitoh Exp $*/
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1573,7 +1573,12 @@ ixgbe_setup_receive_ring(struct rx_ring 
 	rxr->next_to_refresh = 0;
 	rxr->lro_enabled = FALSE;
 	rxr->rx_copies.ev_count = 0;
+#if 0 /* NetBSD */
 	rxr->rx_bytes.ev_count = 0;
+#if 1	/* Fix inconsistency */
+	rxr->rx_packets.ev_count = 0;
+#endif
+#endif
 	rxr->vtag_strip = FALSE;
 
 	ixgbe_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,

Reply via email to