Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Remove m_checkalignment(), unused. This elimina...
details: https://anonhg.NetBSD.org/src/rev/b8687c5c4a27
branches: trunk
changeset: 829843:b8687c5c4a27
user: maxv <maxv%NetBSD.org@localhost>
date: Wed Feb 14 14:19:53 2018 +0000
description:
Remove m_checkalignment(), unused. This eliminates a reference to
m_getptr().
diffstat:
sys/netipsec/ipsec.h | 3 +--
sys/netipsec/ipsec_mbuf.c | 42 ++----------------------------------------
2 files changed, 3 insertions(+), 42 deletions(-)
diffs (77 lines):
diff -r 0ae3e32697f4 -r b8687c5c4a27 sys/netipsec/ipsec.h
--- a/sys/netipsec/ipsec.h Wed Feb 14 14:15:53 2018 +0000
+++ b/sys/netipsec/ipsec.h Wed Feb 14 14:19:53 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec.h,v 1.62 2018/01/10 10:56:30 knakahara Exp $ */
+/* $NetBSD: ipsec.h,v 1.63 2018/02/14 14:19:53 maxv Exp $ */
/* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.h,v 1.2.4.2 2004/02/14 22:23:23 bms Exp $ */
/* $KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $ */
@@ -356,7 +356,6 @@
struct mbuf *ipsec_copypkt (struct mbuf *);
-void m_checkalignment(const char* , struct mbuf *, int, int);
struct mbuf *m_clone(struct mbuf *);
struct mbuf *m_makespace(struct mbuf *, int, int, int *);
void *m_pad(struct mbuf *, int );
diff -r 0ae3e32697f4 -r b8687c5c4a27 sys/netipsec/ipsec_mbuf.c
--- a/sys/netipsec/ipsec_mbuf.c Wed Feb 14 14:15:53 2018 +0000
+++ b/sys/netipsec/ipsec_mbuf.c Wed Feb 14 14:19:53 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_mbuf.c,v 1.18 2018/02/08 20:57:41 maxv Exp $ */
+/* $NetBSD: ipsec_mbuf.c,v 1.19 2018/02/14 14:19:53 maxv Exp $ */
/*-
* Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
* All rights reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_mbuf.c,v 1.18 2018/02/08 20:57:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_mbuf.c,v 1.19 2018/02/14 14:19:53 maxv Exp $");
/*
* IPsec-specific mbuf routines.
@@ -445,41 +445,3 @@
}
return (0);
}
-
-/*
- * Diagnostic routine to check mbuf alignment as required by the
- * crypto device drivers (that use DMA).
- */
-void
-m_checkalignment(const char* where, struct mbuf *m0, int off, int len)
-{
- int roff;
- struct mbuf *m = m_getptr(m0, off, &roff);
- void *addr;
-
- if (m == NULL)
- return;
- printf("%s (off %u len %u): ", where, off, len);
- addr = mtod(m, char *) + roff;
- do {
- int mlen;
-
- if (((uintptr_t) addr) & 3) {
- printf("addr misaligned %p,", addr);
- break;
- }
- mlen = m->m_len;
- if (mlen > len)
- mlen = len;
- len -= mlen;
- if (len && (mlen & 3)) {
- printf("len mismatch %u,", mlen);
- break;
- }
- m = m->m_next;
- addr = m ? mtod(m, void *) : NULL;
- } while (m && len > 0);
- for (m = m0; m; m = m->m_next)
- printf(" [%p:%u]", mtod(m, void *), m->m_len);
- printf("\n");
-}
Home |
Main Index |
Thread Index |
Old Index