The branch main has been updated by donner:

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

commit c3e75b6c1a02d36b9b6c62511725ab5d3d94fdb0
Author:     Lutz Donnerhacke <don...@freebsd.org>
AuthorDate: 2021-01-18 13:10:34 +0000
Commit:     Lutz Donnerhacke <don...@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);
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to