Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/sibyte/dev sbmac_start(): Replace "IF_DEQUEUE(...



details:   https://anonhg.NetBSD.org/src/rev/754c04e4c9b1
branches:  trunk
changeset: 369515:754c04e4c9b1
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Aug 20 18:40:35 2022 +0000

description:
sbmac_start(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".

diffstat:

 sys/arch/mips/sibyte/dev/sbmac.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 051c8ab4b3d9 -r 754c04e4c9b1 sys/arch/mips/sibyte/dev/sbmac.c
--- a/sys/arch/mips/sibyte/dev/sbmac.c  Sat Aug 20 18:36:16 2022 +0000
+++ b/sys/arch/mips/sibyte/dev/sbmac.c  Sat Aug 20 18:40:35 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbmac.c,v 1.63 2021/12/05 07:21:59 msaitoh Exp $ */
+/* $NetBSD: sbmac.c,v 1.64 2022/08/20 18:40:35 thorpej Exp $ */
 
 /*
  * Copyright 2000, 2001, 2004
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.63 2021/12/05 07:21:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.64 2022/08/20 18:40:35 thorpej Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -1786,7 +1786,7 @@
 
        for (;;) {
 
-               IF_DEQUEUE(&ifp->if_snd, m_head);
+               IF_POLL(&ifp->if_snd, m_head);
                if (m_head == NULL)
                    break;
 
@@ -1803,6 +1803,7 @@
                         * If there's a BPF listener, bounce a copy of this
                         * frame to it.
                         */
+                       IF_DEQUEUE(&ifp->if_snd, m_head);
                        bpf_mtap(ifp, m_head, BPF_D_OUT);
                        if (!sc->sbm_pass3_dma) {
                                /*
@@ -1813,7 +1814,6 @@
                                m_freem(m_head);
                        }
                } else {
-                   IF_PREPEND(&ifp->if_snd, m_head);
                    ifp->if_flags |= IFF_OACTIVE;
                    break;
                }



Home | Main Index | Thread Index | Old Index