Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Reduce diff among vmxnet3_{legacy_intr,txrxq_int...
details: https://anonhg.NetBSD.org/src/rev/7a35aee876df
branches: trunk
changeset: 366372:7a35aee876df
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue May 24 02:22:47 2022 +0000
description:
Reduce diff among vmxnet3_{legacy_intr,txrxq_intr,handle_que}(). NFCI.
diffstat:
sys/dev/pci/if_vmx.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diffs (67 lines):
diff -r 63020b9890f1 -r 7a35aee876df sys/dev/pci/if_vmx.c
--- a/sys/dev/pci/if_vmx.c Mon May 23 22:33:56 2022 +0000
+++ b/sys/dev/pci/if_vmx.c Tue May 24 02:22:47 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vmx.c,v 1.7 2022/03/30 02:45:14 knakahara Exp $ */
+/* $NetBSD: if_vmx.c,v 1.8 2022/05/24 02:22:47 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.7 2022/03/30 02:45:14 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.8 2022/05/24 02:22:47 msaitoh Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -2499,14 +2499,16 @@
vmxnet3_legacy_intr(void *xsc)
{
struct vmxnet3_softc *sc;
+ struct vmxnet3_queue *vmxq;
+ struct vmxnet3_txqueue *txq;
struct vmxnet3_rxqueue *rxq;
- struct vmxnet3_txqueue *txq;
u_int txlimit, rxlimit;
bool txmore, rxmore;
sc = xsc;
- rxq = &sc->vmx_queue[0].vxq_rxqueue;
- txq = &sc->vmx_queue[0].vxq_txqueue;
+ vmxq = &sc->vmx_queue[0];
+ txq = &vmxq->vxq_txqueue;
+ rxq = &vmxq->vxq_rxqueue;
txlimit = sc->vmx_tx_intr_process_limit;
rxlimit = sc->vmx_rx_intr_process_limit;
@@ -2528,12 +2530,13 @@
txmore = vmxnet3_txq_eof(txq, txlimit);
VMXNET3_TXQ_UNLOCK(txq);
- if (txmore || rxmore) {
- vmxnet3_sched_handle_queue(sc, &sc->vmx_queue[0]);
- } else {
+ if (txmore || rxmore)
+ vmxnet3_sched_handle_queue(sc, vmxq);
+ else {
if_schedule_deferred_start(&sc->vmx_ethercom.ec_if);
vmxnet3_enable_all_intrs(sc);
}
+
return (1);
}
@@ -2568,9 +2571,9 @@
rxmore = vmxnet3_rxq_eof(rxq, rxlimit);
VMXNET3_RXQ_UNLOCK(rxq);
- if (txmore || rxmore) {
+ if (txmore || rxmore)
vmxnet3_sched_handle_queue(sc, vmxq);
- } else {
+ else {
/* for ALTQ */
if (vmxq->vxq_id == 0)
if_schedule_deferred_start(&sc->vmx_ethercom.ec_if);
Home |
Main Index |
Thread Index |
Old Index