Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/marvell gfe_ifstart(): Replace "IF_DEQUEUE() -> IF_P...
details: https://anonhg.NetBSD.org/src/rev/89db8e7e600a
branches: trunk
changeset: 369518:89db8e7e600a
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Aug 20 19:04:07 2022 +0000
description:
gfe_ifstart(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".
diffstat:
sys/dev/marvell/if_gfe.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r e205a057d9ee -r 89db8e7e600a sys/dev/marvell/if_gfe.c
--- a/sys/dev/marvell/if_gfe.c Sat Aug 20 19:01:31 2022 +0000
+++ b/sys/dev/marvell/if_gfe.c Sat Aug 20 19:04:07 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gfe.c,v 1.59 2021/08/07 16:19:13 thorpej Exp $ */
+/* $NetBSD: if_gfe.c,v 1.60 2022/08/20 19:04:07 thorpej Exp $ */
/*
* Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.59 2021/08/07 16:19:13 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.60 2022/08/20 19:04:07 thorpej Exp $");
#include "opt_inet.h"
@@ -691,7 +691,7 @@
}
for (;;) {
- IF_DEQUEUE(&ifp->if_snd, m);
+ IF_POLL(&ifp->if_snd, m);
if (m == NULL) {
ifp->if_flags &= ~IFF_OACTIVE;
GE_FUNC_EXIT(sc, "");
@@ -704,6 +704,8 @@
if (IF_QFULL(&sc->sc_txq[GE_TXPRIO_HI].txq_pendq))
break;
+ IF_DEQUEUE(&ifp->if_snd, m);
+
/*
* Try to enqueue a mbuf to the device. If that fails, we
* can always try to map the next mbuf.
@@ -718,7 +720,6 @@
/*
* Attempt to queue the mbuf for send failed.
*/
- IF_PREPEND(&ifp->if_snd, m);
ifp->if_flags |= IFF_OACTIVE;
GE_FUNC_EXIT(sc, "%%");
}
Home |
Main Index |
Thread Index |
Old Index