Module Name: src Committed By: msaitoh Date: Tue Sep 7 08:17:20 UTC 2021
Modified Files: src/sys/dev/pci/ixgbe: ix_txrx.c Log Message: Don't increment no_mbuf evcnt(9) when discarding multi-descriptor packet. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 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.91 src/sys/dev/pci/ixgbe/ix_txrx.c:1.92 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.91 Tue Sep 7 03:48:01 2021 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Tue Sep 7 08:17:20 2021 @@ -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 @@ ixgbe_rxeof(struct ix_queue *que) } /* 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).