Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Micro optimization. m_copym(M_COPYALL) -> m_copypack...



details:   https://anonhg.NetBSD.org/src/rev/a59db1828f73
branches:  trunk
changeset: 835964:a59db1828f73
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Sep 19 07:51:23 2018 +0000

description:
Micro optimization. m_copym(M_COPYALL) -> m_copypacket().

diffstat:

 sys/net/if_bridge.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (55 lines):

diff -r d1aa89ebc2ab -r a59db1828f73 sys/net/if_bridge.c
--- a/sys/net/if_bridge.c       Wed Sep 19 07:26:54 2018 +0000
+++ b/sys/net/if_bridge.c       Wed Sep 19 07:51:23 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bridge.c,v 1.158 2018/09/18 09:27:35 msaitoh Exp $  */
+/*     $NetBSD: if_bridge.c,v 1.159 2018/09/19 07:51:23 msaitoh Exp $  */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.158 2018/09/18 09:27:35 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.159 2018/09/19 07:51:23 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -1540,7 +1540,7 @@
                                used = true;
                                mc = m;
                        } else {
-                               mc = m_copym(m, 0, M_COPYALL, M_NOWAIT);
+                               mc = m_copypacket(m, M_DONTWAIT);
                                if (mc == NULL) {
                                        sc->sc_if.if_oerrors++;
                                        goto next;
@@ -1558,8 +1558,7 @@
                                        used = true;
                                        mc = m;
                                } else {
-                                       mc = m_copym(m, 0, M_COPYALL,
-                                           M_DONTWAIT);
+                                       mc = m_copypacket(m, M_DONTWAIT);
                                        if (mc == NULL) {
                                                sc->sc_if.if_oerrors++;
                                                goto next;
@@ -1975,7 +1974,7 @@
                        goto next;
 
                if (dst_if != src_if) {
-                       mc = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
+                       mc = m_copypacket(m, M_DONTWAIT);
                        if (mc == NULL) {
                                sc->sc_if.if_oerrors++;
                                goto next;
@@ -1993,7 +1992,7 @@
                }
 
                if (bmcast) {
-                       mc = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
+                       mc = m_copypacket(m, M_DONTWAIT);
                        if (mc == NULL) {
                                sc->sc_if.if_oerrors++;
                                goto next;



Home | Main Index | Thread Index | Old Index