Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe Don't increment no_mbuf evcnt(9) when disc...



details:   https://anonhg.NetBSD.org/src/rev/92aac76a5a46
branches:  trunk
changeset: 1023424:92aac76a5a46
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Sep 07 08:17:20 2021 +0000

description:
Don't increment no_mbuf evcnt(9) when discarding multi-descriptor packet.

diffstat:

 sys/dev/pci/ixgbe/ix_txrx.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r f47667a0f859 -r 92aac76a5a46 sys/dev/pci/ixgbe/ix_txrx.c
--- a/sys/dev/pci/ixgbe/ix_txrx.c       Tue Sep 07 06:36:06 2021 +0000
+++ b/sys/dev/pci/ixgbe/ix_txrx.c       Tue Sep 07 08:17:20 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.91 2021/09/07 03:48:01 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.92 2021/09/07 08:17:20 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.91 2021/09/07 03:48:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.92 2021/09/07 08:17:20 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1877,12 +1877,14 @@
                }
 
                /* pre-alloc new mbuf */
-               if (!discard_multidesc)
+               if (!discard_multidesc) {
                        newmp = ixgbe_getcl();
-               else
+                       if (__predict_false(newmp == NULL))
+                               rxr->no_mbuf.ev_count++;
+               } else
                        newmp = NULL;
+
                if (__predict_false(newmp == NULL)) {
-                       rxr->no_mbuf.ev_count++;
                        /*
                         * Descriptor initialization is already done by the
                         * above code (cur->wb.upper.status_error = 0).



Home | Main Index | Thread Index | Old Index