From nobody Thu Jan 27 05:16:08 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 42FBD1978D58; Thu, 27 Jan 2022 05:16:16 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jkphv2c5qz4YSQ; Thu, 27 Jan 2022 05:16:15 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.16.1/8.16.1) with ESMTPS id 20R5G8Lc046836 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 26 Jan 2022 21:16:08 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.16.1/8.16.1/Submit) id 20R5G8H5046835; Wed, 26 Jan 2022 21:16:08 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 26 Jan 2022 21:16:08 -0800 From: Gleb Smirnoff To: Hans Petter Selasky 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: References: <202201261242.20QCg8jX074972@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202201261242.20QCg8jX074972@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Jkphv2c5qz4YSQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org X-Spamd-Result: default: False [0.90 / 15.00]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[glebius]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all:c]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_SHORT(1.00)[1.000]; MLMMJ_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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 H> AuthorDate: 2022-01-26 11:13:53 +0000 H> Commit: Hans Petter Selasky 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