Module Name: src
Committed By: msaitoh
Date: Wed Jul 6 06:32:50 UTC 2022
Modified Files:
src/sys/dev/pci: if_vmx.c
Log Message:
Call txeof first, then rxeof for the consistency.
There are three functions where the txeof and rxeof are called. The MSI-X
interrupt function and the workqueue function call rxeof first, then rxeof.
For legacy interrupt. rxeof is called first. Modify it to match with other
two.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/if_vmx.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/if_vmx.c
diff -u src/sys/dev/pci/if_vmx.c:1.8 src/sys/dev/pci/if_vmx.c:1.9
--- src/sys/dev/pci/if_vmx.c:1.8 Tue May 24 02:22:47 2022
+++ src/sys/dev/pci/if_vmx.c Wed Jul 6 06:32:50 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vmx.c,v 1.8 2022/05/24 02:22:47 msaitoh Exp $ */
+/* $NetBSD: if_vmx.c,v 1.9 2022/07/06 06:32:50 msaitoh Exp $ */
/* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.8 2022/05/24 02:22:47 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.9 2022/07/06 06:32:50 msaitoh Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -2522,14 +2522,14 @@ vmxnet3_legacy_intr(void *xsc)
if (sc->vmx_ds->event != 0)
vmxnet3_evintr(sc);
- VMXNET3_RXQ_LOCK(rxq);
- rxmore = vmxnet3_rxq_eof(rxq, rxlimit);
- VMXNET3_RXQ_UNLOCK(rxq);
-
VMXNET3_TXQ_LOCK(txq);
txmore = vmxnet3_txq_eof(txq, txlimit);
VMXNET3_TXQ_UNLOCK(txq);
+ VMXNET3_RXQ_LOCK(rxq);
+ rxmore = vmxnet3_rxq_eof(rxq, rxlimit);
+ VMXNET3_RXQ_UNLOCK(rxq);
+
if (txmore || rxmore)
vmxnet3_sched_handle_queue(sc, vmxq);
else {