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 Call txeof first, then rxeof for the consi...



details:   https://anonhg.NetBSD.org/src/rev/4811b7dcf689
branches:  trunk
changeset: 368349:4811b7dcf689
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Jul 06 06:31:47 2022 +0000

description:
Call txeof first, then rxeof for the consistency.

 There are three functions where the txeof and rxeof are called. The legacy
interrupt function and MSI-X function call rxeof first, then rxeof.
For the workqueue function. rxeof is called first. Modify it to match with
other two.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  8 ++++----
 sys/dev/pci/ixgbe/ixv.c   |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (74 lines):

diff -r 722f744f0c0d -r 4811b7dcf689 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Wed Jul 06 06:25:24 2022 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Wed Jul 06 06:31:47 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.322 2022/06/18 08:20:56 skrll Exp $ */
+/* $NetBSD: ixgbe.c,v 1.323 2022/07/06 06:31:47 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.322 2022/06/18 08:20:56 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.323 2022/07/06 06:31:47 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -6662,9 +6662,8 @@
        IXGBE_EVC_ADD(&que->handleq, 1);
 
        if (ifp->if_flags & IFF_RUNNING) {
-               more = ixgbe_rxeof(que);
                IXGBE_TX_LOCK(txr);
-               more |= ixgbe_txeof(txr);
+               more = ixgbe_txeof(txr);
                if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX))
                        if (!ixgbe_mq_ring_empty(ifp, txr->txr_interq))
                                ixgbe_mq_start_locked(ifp, txr);
@@ -6674,6 +6673,7 @@
                    && (!ixgbe_legacy_ring_empty(ifp, NULL)))
                        ixgbe_legacy_start_locked(ifp, txr);
                IXGBE_TX_UNLOCK(txr);
+               more |= ixgbe_rxeof(que);
        }
 
        if (more) {
diff -r 722f744f0c0d -r 4811b7dcf689 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Wed Jul 06 06:25:24 2022 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Wed Jul 06 06:31:47 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.182 2022/06/02 01:57:27 msaitoh Exp $ */
+/* $NetBSD: ixv.c,v 1.183 2022/07/06 06:31:47 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.182 2022/06/02 01:57:27 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.183 2022/07/06 06:31:47 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3296,9 +3296,8 @@
        IXGBE_EVC_ADD(&que->handleq, 1);
 
        if (ifp->if_flags & IFF_RUNNING) {
-               more = ixgbe_rxeof(que);
                IXGBE_TX_LOCK(txr);
-               more |= ixgbe_txeof(txr);
+               more = ixgbe_txeof(txr);
                if (!(adapter->feat_en & IXGBE_FEATURE_LEGACY_TX))
                        if (!ixgbe_mq_ring_empty(ifp, txr->txr_interq))
                                ixgbe_mq_start_locked(ifp, txr);
@@ -3308,6 +3307,7 @@
                    && (!ixgbe_legacy_ring_empty(ifp, NULL)))
                        ixgbe_legacy_start_locked(ifp, txr);
                IXGBE_TX_UNLOCK(txr);
+               more |= ixgbe_rxeof(que);
                if (more) {
                        IXGBE_EVC_ADD(&que->req, 1);
                        if (adapter->txrx_use_workqueue) {



Home | Main Index | Thread Index | Old Index