Module Name: src
Committed By: thorpej
Date: Sat Aug 20 19:04:07 UTC 2022
Modified Files:
src/sys/dev/marvell: if_gfe.c
Log Message:
gfe_ifstart(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".
To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/marvell/if_gfe.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/marvell/if_gfe.c
diff -u src/sys/dev/marvell/if_gfe.c:1.59 src/sys/dev/marvell/if_gfe.c:1.60
--- src/sys/dev/marvell/if_gfe.c:1.59 Sat Aug 7 16:19:13 2021
+++ src/sys/dev/marvell/if_gfe.c Sat Aug 20 19:04:07 2022
@@ -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 @@ gfe_ifstart(struct ifnet *ifp)
}
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 @@ gfe_ifstart(struct ifnet *ifp)
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 @@ gfe_ifstart(struct ifnet *ifp)
/*
* Attempt to queue the mbuf for send failed.
*/
- IF_PREPEND(&ifp->if_snd, m);
ifp->if_flags |= IFF_OACTIVE;
GE_FUNC_EXIT(sc, "%%");
}