Deleted Added
full compact
if_epair.c (301270) if_epair.c (302054)
1/*-
2 * Copyright (c) 2008 The FreeBSD Foundation
3 * Copyright (c) 2009-2010 Bjoern A. Zeeb <bz@FreeBSD.org>
4 * All rights reserved.
5 *
6 * This software was developed by CK Software GmbH under sponsorship
7 * from the FreeBSD Foundation.
8 *

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

43 * to re-do them in case we move the interface between network stacks
44 * in a private if_reassign function.
45 * In case we bridge to a real interface/network or between indepedent
46 * epairs on multiple stacks/machines, we may need this.
47 * For now let the user handle that case.
48 */
49
50#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 The FreeBSD Foundation
3 * Copyright (c) 2009-2010 Bjoern A. Zeeb <bz@FreeBSD.org>
4 * All rights reserved.
5 *
6 * This software was developed by CK Software GmbH under sponsorship
7 * from the FreeBSD Foundation.
8 *

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

43 * to re-do them in case we move the interface between network stacks
44 * in a private if_reassign function.
45 * In case we bridge to a real interface/network or between indepedent
46 * epairs on multiple stacks/machines, we may need this.
47 * For now let the user handle that case.
48 */
49
50#include <sys/cdefs.h>
51__FBSDID("$FreeBSD: head/sys/net/if_epair.c 301270 2016-06-03 13:57:10Z bz $");
51__FBSDID("$FreeBSD: head/sys/net/if_epair.c 302054 2016-06-21 13:48:49Z bz $");
52
53#include <sys/param.h>
54#include <sys/kernel.h>
55#include <sys/malloc.h>
56#include <sys/mbuf.h>
57#include <sys/module.h>
58#include <sys/refcount.h>
59#include <sys/queue.h>

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

958{
959
960 V_epair_cloner = if_clone_advanced(epairname, 0,
961 epair_clone_match, epair_clone_create, epair_clone_destroy);
962#ifdef VIMAGE
963 netisr_register_vnet(&epair_nh);
964#endif
965}
52
53#include <sys/param.h>
54#include <sys/kernel.h>
55#include <sys/malloc.h>
56#include <sys/mbuf.h>
57#include <sys/module.h>
58#include <sys/refcount.h>
59#include <sys/queue.h>

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

958{
959
960 V_epair_cloner = if_clone_advanced(epairname, 0,
961 epair_clone_match, epair_clone_create, epair_clone_destroy);
962#ifdef VIMAGE
963 netisr_register_vnet(&epair_nh);
964#endif
965}
966VNET_SYSINIT(vnet_epair_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
966VNET_SYSINIT(vnet_epair_init, SI_SUB_PSEUDO, SI_ORDER_ANY,
967 vnet_epair_init, NULL);
968
969static void
970vnet_epair_uninit(const void *unused __unused)
971{
972
973#ifdef VIMAGE
974 netisr_unregister_vnet(&epair_nh);
975#endif
976 if_clone_detach(V_epair_cloner);
977}
967 vnet_epair_init, NULL);
968
969static void
970vnet_epair_uninit(const void *unused __unused)
971{
972
973#ifdef VIMAGE
974 netisr_unregister_vnet(&epair_nh);
975#endif
976 if_clone_detach(V_epair_cloner);
977}
978VNET_SYSUNINIT(vnet_epair_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
978VNET_SYSUNINIT(vnet_epair_uninit, SI_SUB_INIT_IF, SI_ORDER_ANY,
979 vnet_epair_uninit, NULL);
980
981static int
982epair_modevent(module_t mod, int type, void *data)
983{
984 int qlimit;
985
986 switch (type) {

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

1007}
1008
1009static moduledata_t epair_mod = {
1010 "if_epair",
1011 epair_modevent,
1012 0
1013};
1014
979 vnet_epair_uninit, NULL);
980
981static int
982epair_modevent(module_t mod, int type, void *data)
983{
984 int qlimit;
985
986 switch (type) {

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

1007}
1008
1009static moduledata_t epair_mod = {
1010 "if_epair",
1011 epair_modevent,
1012 0
1013};
1014
1015DECLARE_MODULE(if_epair, epair_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
1015DECLARE_MODULE(if_epair, epair_mod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE);
1016MODULE_VERSION(if_epair, 1);
1016MODULE_VERSION(if_epair, 1);