aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutz Donnerhacke <donner@FreeBSD.org>2021-01-18 13:10:34 +0000
committerLutz Donnerhacke <donner@FreeBSD.org>2021-01-18 13:10:34 +0000
commitc3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0 (patch)
tree142c5d7ee2c0a601b616b394a49d1db7ec16d698
parent7c7c231c14246a709270bf3f3a4593208e84d01a (diff)
downloadsrc-c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0.tar.gz
src-c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0.zip
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
-rw-r--r--sys/netgraph/ng_one2many.c6
1 files 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);