Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Remove M_COPY_PKTHDR, M_MOVE_PKTHDR, M_ALIGN and MH_...



details:   https://anonhg.NetBSD.org/src/rev/5d5ebdb12144
branches:  trunk
changeset: 995545:5d5ebdb12144
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Dec 27 14:03:54 2018 +0000

description:
Remove M_COPY_PKTHDR, M_MOVE_PKTHDR, M_ALIGN and MH_ALIGN.

diffstat:

 sys/dev/pci/hifn7751.c |  6 +++---
 sys/kern/uipc_mbuf.c   |  8 ++++----
 sys/netmpls/mpls_ttl.c |  6 +++---
 sys/sys/mbuf.h         |  8 +-------
 4 files changed, 11 insertions(+), 17 deletions(-)

diffs (112 lines):

diff -r 0968044422ff -r 5d5ebdb12144 sys/dev/pci/hifn7751.c
--- a/sys/dev/pci/hifn7751.c    Thu Dec 27 10:09:56 2018 +0000
+++ b/sys/dev/pci/hifn7751.c    Thu Dec 27 14:03:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hifn7751.c,v 1.62 2018/10/05 05:37:49 msaitoh Exp $    */
+/*     $NetBSD: hifn7751.c,v 1.63 2018/12/27 14:03:54 maxv Exp $       */
 /*     $FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */
 /*     $OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $  */
 
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.62 2018/10/05 05:37:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.63 2018/12/27 14:03:54 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -82,7 +82,7 @@
 #undef HIFN_DEBUG
 
 #ifdef __NetBSD__
-#define M_DUP_PKTHDR M_COPY_PKTHDR     /* XXX */
+#define M_DUP_PKTHDR m_copy_pkthdr     /* XXX */
 #endif
 
 #ifdef HIFN_DEBUG
diff -r 0968044422ff -r 5d5ebdb12144 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c      Thu Dec 27 10:09:56 2018 +0000
+++ b/sys/kern/uipc_mbuf.c      Thu Dec 27 14:03:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_mbuf.c,v 1.229 2018/12/22 14:28:56 maxv Exp $     */
+/*     $NetBSD: uipc_mbuf.c,v 1.230 2018/12/27 14:03:55 maxv Exp $     */
 
 /*
  * Copyright (c) 1999, 2001, 2018 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.229 2018/12/22 14:28:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.230 2018/12/27 14:03:55 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mbuftrace.h"
@@ -1279,7 +1279,7 @@
 
                if (remain > MHLEN) {
                        /* m can't be the lead packet */
-                       MH_ALIGN(n, 0);
+                       m_align(n, 0);
                        n->m_len = 0;
                        n->m_next = m_split(m, len, wait);
                        if (n->m_next == NULL) {
@@ -1289,7 +1289,7 @@
                        }
                        return n;
                } else {
-                       MH_ALIGN(n, remain);
+                       m_align(n, remain);
                }
        } else if (remain == 0) {
                n = m->m_next;
diff -r 0968044422ff -r 5d5ebdb12144 sys/netmpls/mpls_ttl.c
--- a/sys/netmpls/mpls_ttl.c    Thu Dec 27 10:09:56 2018 +0000
+++ b/sys/netmpls/mpls_ttl.c    Thu Dec 27 14:03:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpls_ttl.c,v 1.14 2018/09/03 16:29:36 riastradh Exp $ */
+/*     $NetBSD: mpls_ttl.c,v 1.15 2018/12/27 14:03:55 maxv Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpls_ttl.c,v 1.14 2018/09/03 16:29:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpls_ttl.c,v 1.15 2018/12/27 14:03:55 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -250,7 +250,7 @@
        MCLAIM(m, n->m_owner);
        m->m_len = packetlen;
        if ((m->m_flags & M_EXT) == 0)
-               MH_ALIGN(m, m->m_len);
+               m_align(m, m->m_len);
        m->m_data += sizeof(struct ip);
        m->m_len -= sizeof(struct ip);
 
diff -r 0968044422ff -r 5d5ebdb12144 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h    Thu Dec 27 10:09:56 2018 +0000
+++ b/sys/sys/mbuf.h    Thu Dec 27 14:03:54 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbuf.h,v 1.216 2018/12/22 13:55:56 maxv Exp $  */
+/*     $NetBSD: mbuf.h,v 1.217 2018/12/27 14:03:55 maxv Exp $  */
 
 /*
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -514,12 +514,6 @@
                (m)->m_data = (m)->m_dat;                               \
 } while (/* CONSTCOND */ 0)
 
-#define        M_COPY_PKTHDR(to, from) m_copy_pkthdr(to, from)
-#define        M_MOVE_PKTHDR(to, from) m_move_pkthdr(to, from)
-
-#define M_ALIGN(m, len)                m_align(m, len)
-#define MH_ALIGN(m, len)       m_align(m, len)
-
 /*
  * Determine if an mbuf's data area is read-only.  This is true
  * if external storage is read-only mapped, or not marked as R/W,



Home | Main Index | Thread Index | Old Index