Re: git: 17cbcf33c3b6 - main - mbuf(9): Assert receive mbufs don't carry a send tag.
Date: Thu, 27 Jan 2022 05:16:08 UTC
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