Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2021 13:19:25 GMT
From:      Lutz Donnerhacke <donner@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c3e75b6c1a02 - main - netgraph/ng_one2main: Clarification in comments about copy mode The original comment suggests an optimization, which was proven wrong.
Message-ID:  <202101181319.10IDJPHR048355@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by donner:

URL: https://cgit.FreeBSD.org/src/commit/?id=c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0

commit c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0
Author:     Lutz Donnerhacke <donner@FreeBSD.org>
AuthorDate: 2021-01-18 13:10:34 +0000
Commit:     Lutz Donnerhacke <donner@FreeBSD.org>
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101181319.10IDJPHR048355>