Deleted Added
full compact
uipc_mbuf.c (254842) uipc_mbuf.c (254973)
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 254842 2013-08-25 10:57:09Z andre $");
33__FBSDID("$FreeBSD: head/sys/kern/uipc_mbuf.c 254973 2013-08-27 20:52:02Z andre $");
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>

--- 38 unchanged lines hidden (view full) ---

80 &m_defraguseless, 0, "");
81SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragfailure, CTLFLAG_RD,
82 &m_defragfailure, 0, "");
83SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragrandomfailures, CTLFLAG_RW,
84 &m_defragrandomfailures, 0, "");
85#endif
86
87/*
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>

--- 38 unchanged lines hidden (view full) ---

80 &m_defraguseless, 0, "");
81SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragfailure, CTLFLAG_RD,
82 &m_defragfailure, 0, "");
83SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragrandomfailures, CTLFLAG_RW,
84 &m_defragrandomfailures, 0, "");
85#endif
86
87/*
88 * Ensure the correct size of various mbuf parameters. It could be off due
89 * to compiler-induced padding and alignment artifacts.
90 */
91CTASSERT(sizeof(struct mbuf) == MSIZE);
92CTASSERT(MSIZE - offsetof(struct mbuf, m_dat) == MLEN);
93CTASSERT(MSIZE - offsetof(struct mbuf, m_pktdat) == MHLEN);
94
95/*
88 * m_get2() allocates minimum mbuf that would fit "size" argument.
89 */
90struct mbuf *
91m_get2(int size, int how, short type, int flags)
92{
93 struct mb_args args;
94 struct mbuf *m, *n;
95

--- 2079 unchanged lines hidden ---
96 * m_get2() allocates minimum mbuf that would fit "size" argument.
97 */
98struct mbuf *
99m_get2(int size, int how, short type, int flags)
100{
101 struct mb_args args;
102 struct mbuf *m, *n;
103

--- 2079 unchanged lines hidden ---