Deleted Added
full compact
if_clone.c (195699) if_clone.c (195727)
1/*-
2 * Copyright (c) 1980, 1986, 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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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 * @(#)if.c 8.5 (Berkeley) 1/9/95
1/*-
2 * Copyright (c) 1980, 1986, 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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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 * @(#)if.c 8.5 (Berkeley) 1/9/95
30 * $FreeBSD: head/sys/net/if_clone.c 195699 2009-07-14 22:48:30Z rwatson $
30 * $FreeBSD: head/sys/net/if_clone.c 195727 2009-07-16 21:13:04Z rwatson $
31 */
32
33#include <sys/param.h>
34#include <sys/malloc.h>
35#include <sys/limits.h>
36#include <sys/lock.h>
37#include <sys/mutex.h>
38#include <sys/kernel.h>

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

56static int if_clone_createif(struct if_clone *ifc, char *name, size_t len,
57 caddr_t params);
58static int vnet_clone_iattach(const void *);
59
60static struct mtx if_cloners_mtx;
61static VNET_DEFINE(int, if_cloners_count);
62VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners);
63
31 */
32
33#include <sys/param.h>
34#include <sys/malloc.h>
35#include <sys/limits.h>
36#include <sys/lock.h>
37#include <sys/mutex.h>
38#include <sys/kernel.h>

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

56static int if_clone_createif(struct if_clone *ifc, char *name, size_t len,
57 caddr_t params);
58static int vnet_clone_iattach(const void *);
59
60static struct mtx if_cloners_mtx;
61static VNET_DEFINE(int, if_cloners_count);
62VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners);
63
64#define V_if_cloners_count VNET_GET(if_cloners_count)
65#define V_if_cloners VNET_GET(if_cloners)
64#define V_if_cloners_count VNET(if_cloners_count)
65#define V_if_cloners VNET(if_cloners)
66
67#define IF_CLONERS_LOCK_INIT() \
68 mtx_init(&if_cloners_mtx, "if_cloners lock", NULL, MTX_DEF)
69#define IF_CLONERS_LOCK_ASSERT() mtx_assert(&if_cloners_mtx, MA_OWNED)
70#define IF_CLONERS_LOCK() mtx_lock(&if_cloners_mtx)
71#define IF_CLONERS_UNLOCK() mtx_unlock(&if_cloners_mtx)
72
73#define IF_CLONE_LOCK_INIT(ifc) \

--- 542 unchanged lines hidden ---
66
67#define IF_CLONERS_LOCK_INIT() \
68 mtx_init(&if_cloners_mtx, "if_cloners lock", NULL, MTX_DEF)
69#define IF_CLONERS_LOCK_ASSERT() mtx_assert(&if_cloners_mtx, MA_OWNED)
70#define IF_CLONERS_LOCK() mtx_lock(&if_cloners_mtx)
71#define IF_CLONERS_UNLOCK() mtx_unlock(&if_cloners_mtx)
72
73#define IF_CLONE_LOCK_INIT(ifc) \

--- 542 unchanged lines hidden ---