diff options
author | kmacy <kmacy@FreeBSD.org> | 2007-04-15 04:55:39 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2007-04-15 04:55:39 +0000 |
commit | f6d283a04eaf5e94c6cafcce7175750d0ac4b105 (patch) | |
tree | 80e6668d6e35122a424d0ff181a3e5915bd51a0a /sys/dev | |
parent | 688cc6519fc6ff275c9f960dd2a8830ecf5ac870 (diff) | |
download | FreeBSD-src-f6d283a04eaf5e94c6cafcce7175750d0ac4b105.zip FreeBSD-src-f6d283a04eaf5e94c6cafcce7175750d0ac4b105.tar.gz |
Implement ZERO_COPY_SOCKETS check in a way that doesn't make LINT unhappy
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cxgb/sys/uipc_mvec.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/cxgb/sys/uipc_mvec.c b/sys/dev/cxgb/sys/uipc_mvec.c index 16926510..978fc36 100644 --- a/sys/dev/cxgb/sys/uipc_mvec.c +++ b/sys/dev/cxgb/sys/uipc_mvec.c @@ -42,11 +42,7 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <dev/cxgb/sys/mvec.h> - #include "opt_zero.h" -#ifdef ZERO_COPY_SOCKETS -#error "ZERO_COPY_SOCKETS not supported with mvec" -#endif #ifdef DEBUG #define DPRINTF printf @@ -161,10 +157,15 @@ m_vectorize(struct mbuf *m, int max, struct mbuf **vec, int *count) for (i = 0; i < max; i++) { if (m == NULL) break; -#ifndef PACKET_ZONE_DISABLED +#ifndef MBUF_PACKET_ZONE_DISABLE if ((m->m_flags & M_EXT) && (m->m_ext.ext_type == EXT_PACKET)) return (EINVAL); #endif +#ifdef ZERO_COPY_SOCKETS + if ((m->m_flags & M_EXT) && (m->m_ext.ext_type == EXT_SFBUF)) + return (EINVAL); +#endif + if (m->m_len == 0) DPRINTF("m=%p is len=0\n", m); M_SANITY(m, 0); |