Module Name: src
Committed By: msaitoh
Date: Wed Dec 13 08:25:54 UTC 2023
Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c
Log Message:
ixgbe: micro-optimize ixgbe_txeof()
Update txr->packets outside the loop in ixgbe_txeof().
To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 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.110 src/sys/dev/pci/ixgbe/ix_txrx.c:1.111
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.110 Fri Dec 8 05:42:59 2023
+++ src/sys/dev/pci/ixgbe/ix_txrx.c Wed Dec 13 08:25:54 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.110 2023/12/08 05:42:59 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.111 2023/12/13 08:25:54 msaitoh Exp $ */
/******************************************************************************
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.110 2023/12/08 05:42:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.111 2023/12/13 08:25:54 msaitoh Exp $");
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -1203,7 +1203,6 @@ ixgbe_txeof(struct tx_ring *txr)
buf->eop = NULL;
}
- ++txr->packets;
++processed;
/* Try the next packet */
@@ -1227,6 +1226,7 @@ ixgbe_txeof(struct tx_ring *txr)
if (processed) {
txr->tx_avail = avail;
txr->txr_no_space = false;
+ txr->packets += processed;
if_statadd(ifp, if_opackets, processed);
}