Date: Wed, 26 Jan 2022 21:16:08 -0800 From: Gleb Smirnoff <glebius@freebsd.org> To: Hans Petter Selasky <hselasky@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 17cbcf33c3b6 - main - mbuf(9): Assert receive mbufs don't carry a send tag. Message-ID: <YfIqmPWq09gz1AWJ@FreeBSD.org> In-Reply-To: <202201261242.20QCg8jX074972@gitrepo.freebsd.org> References: <202201261242.20QCg8jX074972@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 26, 2022 at 12:42:08PM +0000, Hans Petter Selasky wrote: H> The branch main has been updated by hselasky: H> H> URL: https://cgit.FreeBSD.org/src/commit/?id=17cbcf33c3b6d0361d71bdb00b8633ec9bb5ae53 H> H> commit 17cbcf33c3b6d0361d71bdb00b8633ec9bb5ae53 H> Author: Hans Petter Selasky <hselasky@FreeBSD.org> H> AuthorDate: 2022-01-26 11:13:53 +0000 H> Commit: Hans Petter Selasky <hselasky@FreeBSD.org> H> CommitDate: 2022-01-26 11:55:00 +0000 H> H> mbuf(9): Assert receive mbufs don't carry a send tag. H> H> Else we would start leaking reference counts. H> H> Discussed with: jhb@ H> MFC after: 1 week H> Sponsored by: NVIDIA Networking Why do you allow (m == NULL) in the assertion? Does it make any sense to relax it this way? H> +/* Check if the supplied mbuf has no send tag, or else panic. */ H> +#define M_ASSERT_NO_SND_TAG(m) \ H> + KASSERT((m) == NULL || ((m)->m_flags & M_PKTHDR) == 0 || \ H> + ((m)->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0, \ H> + ("%s: receive mbuf has send tag!", __func__)) H> + -- Gleb Smirnoff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YfIqmPWq09gz1AWJ>