Module Name:    src
Committed By:   msaitoh
Date:           Wed Jul  6 06:31:47 UTC 2022

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

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.322 -r1.323 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.182 -r1.183 src/sys/dev/pci/ixgbe/ixv.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/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.322 src/sys/dev/pci/ixgbe/ixgbe.c:1.323
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.322	Sat Jun 18 08:20:56 2022
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Jul  6 06:31:47 2022
@@ -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_handle_que(void *context)
 	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_handle_que(void *context)
 		    && (!ixgbe_legacy_ring_empty(ifp, NULL)))
 			ixgbe_legacy_start_locked(ifp, txr);
 		IXGBE_TX_UNLOCK(txr);
+		more |= ixgbe_rxeof(que);
 	}
 
 	if (more) {

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.182 src/sys/dev/pci/ixgbe/ixv.c:1.183
--- src/sys/dev/pci/ixgbe/ixv.c:1.182	Thu Jun  2 01:57:27 2022
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Jul  6 06:31:47 2022
@@ -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 @@ ixv_handle_que(void *context)
 	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 @@ ixv_handle_que(void *context)
 		    && (!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) {

Reply via email to