Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Support MBUFTRACE.



details:   https://anonhg.NetBSD.org/src/rev/c5c3a16102dc
branches:  trunk
changeset: 970112:c5c3a16102dc
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Mar 13 03:45:58 2020 +0000

description:
Support MBUFTRACE.

diffstat:

 sys/dev/pci/if_stge.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r c5313e5c1852 -r c5c3a16102dc sys/dev/pci/if_stge.c
--- a/sys/dev/pci/if_stge.c     Fri Mar 13 02:57:26 2020 +0000
+++ b/sys/dev/pci/if_stge.c     Fri Mar 13 03:45:58 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_stge.c,v 1.84 2020/03/07 07:33:39 thorpej Exp $     */
+/*     $NetBSD: if_stge.c,v 1.85 2020/03/13 03:45:58 thorpej Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.84 2020/03/07 07:33:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.85 2020/03/13 03:45:58 thorpej Exp $");
 
 
 #include <sys/param.h>
@@ -1354,6 +1354,7 @@
                                m_freem(m);
                                continue;
                        }
+                       MCLAIM(m, &sc->sc_ethercom.ec_rx_mowner);
                        nm->m_data += 2;
                        nm->m_pkthdr.len = nm->m_len = len;
                        m_copydata(m, 0, len, mtod(nm, void *));
@@ -1853,6 +1854,7 @@
        if (m == NULL)
                return (ENOBUFS);
 
+       MCLAIM(m, &sc->sc_ethercom.ec_rx_mowner);
        MCLGET(m, M_DONTWAIT);
        if ((m->m_flags & M_EXT) == 0) {
                m_freem(m);



Home | Main Index | Thread Index | Old Index