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/788afa316544
branches:  trunk
changeset: 745805:788afa316544
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 f0ad85a4fd79 -r 788afa316544 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