From owner-dev-commits-src-main@freebsd.org Mon Jan 18 13:19:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1637E4EB837; Mon, 18 Jan 2021 13:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DKC7206Jxz3vfT; Mon, 18 Jan 2021 13:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAF9B148BC; Mon, 18 Jan 2021 13:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10IDJPlP048356; Mon, 18 Jan 2021 13:19:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10IDJPHR048355; Mon, 18 Jan 2021 13:19:25 GMT (envelope-from git) Date: Mon, 18 Jan 2021 13:19:25 GMT Message-Id: <202101181319.10IDJPHR048355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: c3e75b6c1a02 - main - netgraph/ng_one2main: Clarification in comments about copy mode The original comment suggests an optimization, which was proven wrong. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2021 13:19:26 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0 commit c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0 Author: Lutz Donnerhacke AuthorDate: 2021-01-18 13:10:34 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-01-18 13:10:34 +0000 netgraph/ng_one2main: Clarification in comments about copy mode The original comment suggests an optimization, which was proven wrong. Reported by: nc Reviewed by: kp, nc Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D23727 --- sys/netgraph/ng_one2many.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_one2many.c b/sys/netgraph/ng_one2many.c index 501575155e99..aa224e78bb9d 100644 --- a/sys/netgraph/ng_one2many.c +++ b/sys/netgraph/ng_one2many.c @@ -451,15 +451,15 @@ ng_one2many_rcvdata(hook_p hook, item_p item) /* no need to copy data for the 1st one */ dst = &priv->many[priv->activeMany[0]]; - /* make copies of data and send for all links - * except the first one, which we'll do last + /* make modifiable copies of data and send for all + * links except the first one, which we'll do last */ for (i = 1; i < priv->numActiveMany; i++) { struct mbuf *m2; struct ng_one2many_link *mdst; mdst = &priv->many[priv->activeMany[i]]; - m2 = m_dup(m, M_NOWAIT); /* XXX m_copypacket() */ + m2 = m_dup(m, M_NOWAIT); if (m2 == NULL) { mdst->stats.memoryFailures++; NG_FREE_ITEM(item);