Remove M_COPY_PKTHDR, M_MOVE_PKTHDR, M_ALIGN and MH_ALIGN.

This commit is contained in:
maxv 2018-12-27 14:03:54 +00:00
parent c5df89da71
commit 506a6ab369
4 changed files with 11 additions and 17 deletions

View File

@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.62 2018/10/05 05:37:49 msaitoh Exp $"
#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

View File

@ -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 @@ m_split_internal(struct mbuf *m0, int len0, int wait, bool copyhdr)
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 @@ m_split_internal(struct mbuf *m0, int len0, int wait, bool copyhdr)
}
return n;
} else {
MH_ALIGN(n, remain);
m_align(n, remain);
}
} else if (remain == 0) {
n = m->m_next;

View File

@ -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 @@ mpls_icmp_error(struct mbuf *n, int type, int code, n_long dest,
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);

View File

@ -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 @@ do { \
(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,