Source-Changes-HG archive

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

[src/trunk]: src/sys Replace



details:   https://anonhg.NetBSD.org/src/rev/216aefa5d112
branches:  trunk
changeset: 318896:216aefa5d112
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed May 09 06:35:10 2018 +0000
description:
Replace
        m_copym(m, 0, M_COPYALL, M_DONTWAIT)
by
        m_copypacket(m, M_DONTWAIT)
when it is clear that we are copying a packet (that has M_PKTHDR) and not
a raw mbuf chain.

diffstat:

 sys/net/if_arcsubr.c      |  6 +++---
 sys/net/if_ethersubr.c    |  6 +++---
 sys/net/if_fddisubr.c     |  6 +++---
 sys/net/if_ieee1394subr.c |  6 +++---
 sys/net/if_tokensubr.c    |  6 +++---
 sys/net/raw_usrreq.c      |  6 +++---
 sys/netinet6/ip6_output.c |  6 +++---
 7 files changed, 21 insertions(+), 21 deletions(-)

diffs (189 lines):

diff -r 2b51123cf69a -r 216aefa5d112 sys/net/if_arcsubr.c
--- a/sys/net/if_arcsubr.c      Wed May 09 06:32:52 2018 +0000
+++ b/sys/net/if_arcsubr.c      Wed May 09 06:35:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_arcsubr.c,v 1.79 2018/04/26 19:56:55 maxv Exp $     */
+/*     $NetBSD: if_arcsubr.c,v 1.80 2018/05/09 06:35:10 maxv Exp $     */
 
 /*
  * Copyright (c) 1994, 1995 Ignatios Souvatzis
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.79 2018/04/26 19:56:55 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arcsubr.c,v 1.80 2018/05/09 06:35:10 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -155,7 +155,7 @@
                /* If broadcasting on a simplex interface, loopback a copy */
                if ((m->m_flags & (M_BCAST|M_MCAST)) &&
                    (ifp->if_flags & IFF_SIMPLEX))
-                       mcopy = m_copym(m, 0, (int)M_COPYALL, M_DONTWAIT);
+                       mcopy = m_copypacket(m, M_DONTWAIT);
                if (ifp->if_flags & IFF_LINK0) {
                        atype = ARCTYPE_IP;
                        newencoding = 1;
diff -r 2b51123cf69a -r 216aefa5d112 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Wed May 09 06:32:52 2018 +0000
+++ b/sys/net/if_ethersubr.c    Wed May 09 06:35:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.265 2018/04/29 07:13:10 maxv Exp $  */
+/*     $NetBSD: if_ethersubr.c,v 1.266 2018/05/09 06:35:10 maxv Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.265 2018/04/29 07:13:10 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.266 2018/05/09 06:35:10 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -247,7 +247,7 @@
                }
                /* If broadcasting on a simplex interface, loopback a copy */
                if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
-                       mcopy = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
+                       mcopy = m_copypacket(m, M_DONTWAIT);
                etype = htons(ETHERTYPE_IP);
                break;
 
diff -r 2b51123cf69a -r 216aefa5d112 sys/net/if_fddisubr.c
--- a/sys/net/if_fddisubr.c     Wed May 09 06:32:52 2018 +0000
+++ b/sys/net/if_fddisubr.c     Wed May 09 06:35:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_fddisubr.c,v 1.108 2018/04/29 07:16:28 maxv Exp $   */
+/*     $NetBSD: if_fddisubr.c,v 1.109 2018/05/09 06:35:10 maxv Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.108 2018/04/29 07:16:28 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fddisubr.c,v 1.109 2018/05/09 06:35:10 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_gateway.h"
@@ -243,7 +243,7 @@
                        return error == EWOULDBLOCK ? 0 : error;
                /* If broadcasting on a simplex interface, loopback a copy */
                if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
-                       mcopy = m_copym(m, 0, (int)M_COPYALL, M_DONTWAIT);
+                       mcopy = m_copypacket(m, M_DONTWAIT);
                etype = htons(ETHERTYPE_IP);
                break;
        }
diff -r 2b51123cf69a -r 216aefa5d112 sys/net/if_ieee1394subr.c
--- a/sys/net/if_ieee1394subr.c Wed May 09 06:32:52 2018 +0000
+++ b/sys/net/if_ieee1394subr.c Wed May 09 06:35:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ieee1394subr.c,v 1.61 2018/05/07 09:51:02 maxv Exp $        */
+/*     $NetBSD: if_ieee1394subr.c,v 1.62 2018/05/09 06:35:10 maxv Exp $        */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.61 2018/05/07 09:51:02 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.62 2018/05/09 06:35:10 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -143,7 +143,7 @@
                        return error == EWOULDBLOCK ? 0 : error;
                /* if broadcasting on a simplex interface, loopback a copy */
                if ((m0->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
-                       mcopy = m_copym(m0, 0, M_COPYALL, M_DONTWAIT);
+                       mcopy = m_copypacket(m0, M_DONTWAIT);
                etype = htons(ETHERTYPE_IP);
                break;
        case AF_ARP:
diff -r 2b51123cf69a -r 216aefa5d112 sys/net/if_tokensubr.c
--- a/sys/net/if_tokensubr.c    Wed May 09 06:32:52 2018 +0000
+++ b/sys/net/if_tokensubr.c    Wed May 09 06:35:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tokensubr.c,v 1.82 2018/04/26 19:56:55 maxv Exp $   */
+/*     $NetBSD: if_tokensubr.c,v 1.83 2018/05/09 06:35:10 maxv Exp $   */
 
 /*
  * Copyright (c) 1982, 1989, 1993
@@ -92,7 +92,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tokensubr.c,v 1.82 2018/04/26 19:56:55 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tokensubr.c,v 1.83 2018/05/09 06:35:10 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -235,7 +235,7 @@
                }
                /* If broadcasting on a simplex interface, loopback a copy. */
                if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
-                       mcopy = m_copym(m, 0, (int)M_COPYALL, M_DONTWAIT);
+                       mcopy = m_copypacket(m, M_DONTWAIT);
                etype = htons(ETHERTYPE_IP);
                break;
        case AF_ARP:
diff -r 2b51123cf69a -r 216aefa5d112 sys/net/raw_usrreq.c
--- a/sys/net/raw_usrreq.c      Wed May 09 06:32:52 2018 +0000
+++ b/sys/net/raw_usrreq.c      Wed May 09 06:35:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: raw_usrreq.c,v 1.60 2018/04/26 19:56:55 maxv Exp $     */
+/*     $NetBSD: raw_usrreq.c,v 1.61 2018/05/09 06:35:10 maxv Exp $     */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.60 2018/04/26 19:56:55 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.61 2018/05/09 06:35:10 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/mbuf.h>
@@ -107,7 +107,7 @@
                if (last != NULL) {
                        struct mbuf *n;
 
-                       if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL ||
+                       if ((n = m_copypacket(m, M_DONTWAIT)) == NULL ||
                            sbappendaddr(&last->so_rcv, src, n, NULL) == 0)
                        {
                                if (n != NULL)
diff -r 2b51123cf69a -r 216aefa5d112 sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Wed May 09 06:32:52 2018 +0000
+++ b/sys/netinet6/ip6_output.c Wed May 09 06:35:10 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_output.c,v 1.208 2018/05/01 07:21:39 maxv Exp $    */
+/*     $NetBSD: ip6_output.c,v 1.209 2018/05/09 06:35:10 maxv Exp $    */
 /*     $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $    */
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.208 2018/05/01 07:21:39 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.209 2018/05/09 06:35:10 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3257,7 +3257,7 @@
        struct mbuf *copym;
        struct ip6_hdr *ip6;
 
-       copym = m_copym(m, 0, M_COPYALL, M_DONTWAIT);
+       copym = m_copypacket(m, M_DONTWAIT);
        if (copym == NULL)
                return;
 



Home | Main Index | Thread Index | Old Index