uipc_mbuf.c (254973) | uipc_mbuf.c (258128) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/kern/uipc_mbuf.c 254973 2013-08-27 20:52:02Z andre $"); | 33__FBSDID("$FreeBSD: head/sys/kern/uipc_mbuf.c 258128 2013-11-14 09:45:33Z glebius $"); |
34 35#include "opt_param.h" 36#include "opt_mbuf_stress_test.h" 37#include "opt_mbuf_profiling.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> --- 1149 unchanged lines hidden (view full) --- 1191 MBUF_CHECKSLEEP(wait); 1192 for (m = m0; m && len > m->m_len; m = m->m_next) 1193 len -= m->m_len; 1194 if (m == NULL) 1195 return (NULL); 1196 remain = m->m_len - len; 1197 if (m0->m_flags & M_PKTHDR && remain == 0) { 1198 n = m_gethdr(wait, m0->m_type); | 34 35#include "opt_param.h" 36#include "opt_mbuf_stress_test.h" 37#include "opt_mbuf_profiling.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> --- 1149 unchanged lines hidden (view full) --- 1191 MBUF_CHECKSLEEP(wait); 1192 for (m = m0; m && len > m->m_len; m = m->m_next) 1193 len -= m->m_len; 1194 if (m == NULL) 1195 return (NULL); 1196 remain = m->m_len - len; 1197 if (m0->m_flags & M_PKTHDR && remain == 0) { 1198 n = m_gethdr(wait, m0->m_type); |
1199 if (n == NULL) |
|
1199 return (NULL); 1200 n->m_next = m->m_next; 1201 m->m_next = NULL; 1202 n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif; 1203 n->m_pkthdr.len = m0->m_pkthdr.len - len0; 1204 m0->m_pkthdr.len = len0; 1205 return (n); 1206 } else if (m0->m_flags & M_PKTHDR) { --- 976 unchanged lines hidden --- | 1200 return (NULL); 1201 n->m_next = m->m_next; 1202 m->m_next = NULL; 1203 n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif; 1204 n->m_pkthdr.len = m0->m_pkthdr.len - len0; 1205 m0->m_pkthdr.len = len0; 1206 return (n); 1207 } else if (m0->m_flags & M_PKTHDR) { --- 976 unchanged lines hidden --- |