Deleted Added
full compact
uipc_mbuf.c (268844) uipc_mbuf.c (271088)
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 268844 2014-07-18 14:59:35Z glebius $");
33__FBSDID("$FreeBSD: head/sys/kern/uipc_mbuf.c 271088 2014-09-04 09:07:14Z 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>

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

985 /* splat the data from one into the other */
986 bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len,
987 (u_int)n->m_len);
988 m->m_len += n->m_len;
989 n = m_free(n);
990 }
991}
992
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>

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

985 /* splat the data from one into the other */
986 bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len,
987 (u_int)n->m_len);
988 m->m_len += n->m_len;
989 n = m_free(n);
990 }
991}
992
993/*
994 * Concatenate two pkthdr mbuf chains.
995 */
993void
996void
997m_catpkt(struct mbuf *m, struct mbuf *n)
998{
999
1000 M_ASSERTPKTHDR(m);
1001 M_ASSERTPKTHDR(n);
1002
1003 m->m_pkthdr.len += n->m_pkthdr.len;
1004 m_demote(n, 1);
1005
1006 m_cat(m, n);
1007}
1008
1009void
994m_adj(struct mbuf *mp, int req_len)
995{
996 int len = req_len;
997 struct mbuf *m;
998 int count;
999
1000 if ((m = mp) == NULL)
1001 return;

--- 1180 unchanged lines hidden ---
1010m_adj(struct mbuf *mp, int req_len)
1011{
1012 int len = req_len;
1013 struct mbuf *m;
1014 int count;
1015
1016 if ((m = mp) == NULL)
1017 return;

--- 1180 unchanged lines hidden ---