Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libshmif In recv, align data after ether_he...
details: https://anonhg.NetBSD.org/src/rev/f5816883a423
branches: trunk
changeset: 788836:f5816883a423
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Jul 22 21:12:03 2013 +0000
description:
In recv, align data after ether_header at _ALIGN_BYTES.
diffstat:
sys/rump/net/lib/libshmif/if_shmem.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 8529cf671cdf -r f5816883a423 sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c Mon Jul 22 19:43:54 2013 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c Mon Jul 22 21:12:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.56 2013/06/14 05:59:50 pooka Exp $ */
+/* $NetBSD: if_shmem.c,v 1.57 2013/07/22 21:12:03 pooka Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.56 2013/06/14 05:59:50 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.57 2013/07/22 21:12:03 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -647,6 +647,8 @@
uint32_t nextpkt;
bool wrap, passup;
int error;
+ const int align
+ = ALIGN(sizeof(struct ether_header)) - sizeof(struct ether_header);
reup:
mutex_enter(&sc->sc_mtx);
@@ -662,6 +664,7 @@
if (m == NULL) {
m = m_gethdr(M_WAIT, MT_DATA);
MCLGET(m, M_WAIT);
+ m->m_data += align;
}
DPRINTF(("waiting %d/%" PRIu64 "\n",
Home |
Main Index |
Thread Index |
Old Index