Module Name: src Committed By: mlelstv Date: Sun Nov 10 10:57:52 UTC 2024
Modified Files: src/sys/net: if_tap.c Log Message: Add MBUFTRACE To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/net/if_tap.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/net/if_tap.c diff -u src/sys/net/if_tap.c:1.135 src/sys/net/if_tap.c:1.136 --- src/sys/net/if_tap.c:1.135 Sun Sep 8 09:36:51 2024 +++ src/sys/net/if_tap.c Sun Nov 10 10:57:52 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_tap.c,v 1.135 2024/09/08 09:36:51 rillig Exp $ */ +/* $NetBSD: if_tap.c,v 1.136 2024/11/10 10:57:52 mlelstv Exp $ */ /* * Copyright (c) 2003, 2004, 2008, 2009 The NetBSD Foundation. @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.135 2024/09/08 09:36:51 rillig Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.136 2024/11/10 10:57:52 mlelstv Exp $"); #if defined(_KERNEL_OPT) #include "opt_modular.h" @@ -976,6 +976,7 @@ tap_dev_write(int unit, struct uio *uio, if_statinc(ifp, if_ierrors); return ENOBUFS; } + MCLAIM(m, &sc->sc_ec.ec_rx_mowner); m->m_pkthdr.len = uio->uio_resid; mp = &m; @@ -986,6 +987,7 @@ tap_dev_write(int unit, struct uio *uio, error = ENOBUFS; break; } + MCLAIM(*mp, &sc->sc_ec.ec_rx_mowner); } (*mp)->m_len = uimin(MHLEN, uio->uio_resid); len += (*mp)->m_len;