Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfcb7a14 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'ipvtap'



Sainath Grandhi says:

====================
Refactor macvtap to re-use tap functionality by other virtual intefaces

Tap character devices can be implemented on other virtual interfaces like
ipvlan, similar to macvtap. Source code for tap functionality in macvtap
can be re-used for this purpose.

This patch series splits macvtap source into two modules, macvtap and tap.
This patch series also includes a patch for implementing tap character
device driver based on the IP-VLAN network interface, called ipvtap.

These patches are tested on x86 platform.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 35eeacf1 235a9d89
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ config MACVTAP
	tristate "MAC-VLAN based tap driver"
	depends on MACVLAN
	depends on INET
	select TAP
	help
	  This adds a specialized tap character device driver that is based
	  on the MAC-VLAN network interface, called macvtap. A macvtap device
@@ -165,6 +166,19 @@ config IPVLAN
      To compile this driver as a module, choose M here: the module
      will be called ipvlan.

config IPVTAP
	tristate "IP-VLAN based tap driver"
	depends on IPVLAN
	depends on INET
	select TAP
	---help---
	  This adds a specialized tap character device driver that is based
	  on the IP-VLAN network interface, called ipvtap. An ipvtap device
	  can be added in the same way as a ipvlan device, using 'type
	  ipvtap', and then be accessed through the tap user space interface.

	  To compile this driver as a module, choose M here: the module
	  will be called ipvtap.

config VXLAN
       tristate "Virtual eXtensible Local Area Network (VXLAN)"
@@ -287,6 +301,12 @@ config TUN

	  If you don't know what to use this for, you don't need it.

config TAP
	tristate
	---help---
	  This option is selected by any driver implementing tap user space
	  interface for a virtual interface to re-use core tap functionality.

config TUN_VNET_CROSS_LE
	bool "Support for cross-endian vnet headers on little-endian kernels"
	default n
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#
obj-$(CONFIG_BONDING) += bonding/
obj-$(CONFIG_IPVLAN) += ipvlan/
obj-$(CONFIG_IPVTAP) += ipvlan/
obj-$(CONFIG_DUMMY) += dummy.o
obj-$(CONFIG_EQUALIZER) += eql.o
obj-$(CONFIG_IFB) += ifb.o
@@ -21,6 +22,7 @@ obj-$(CONFIG_PHYLIB) += phy/
obj-$(CONFIG_RIONET) += rionet.o
obj-$(CONFIG_NET_TEAM) += team/
obj-$(CONFIG_TUN) += tun.o
obj-$(CONFIG_TAP) += tap.o
obj-$(CONFIG_VETH) += veth.o
obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
obj-$(CONFIG_VXLAN) += vxlan.o
+1 −0
Original line number Diff line number Diff line
@@ -3,5 +3,6 @@
#

obj-$(CONFIG_IPVLAN) += ipvlan.o
obj-$(CONFIG_IPVTAP) += ipvtap.o

ipvlan-objs := ipvlan_core.o ipvlan_main.o
+7 −0
Original line number Diff line number Diff line
@@ -135,4 +135,11 @@ struct sk_buff *ipvlan_l3_rcv(struct net_device *dev, struct sk_buff *skb,
			      u16 proto);
unsigned int ipvlan_nf_input(void *priv, struct sk_buff *skb,
			     const struct nf_hook_state *state);
void ipvlan_count_rx(const struct ipvl_dev *ipvlan,
		     unsigned int len, bool success, bool mcast);
int ipvlan_link_new(struct net *src_net, struct net_device *dev,
		    struct nlattr *tb[], struct nlattr *data[]);
void ipvlan_link_delete(struct net_device *dev, struct list_head *head);
void ipvlan_link_setup(struct net_device *dev);
int ipvlan_link_register(struct rtnl_link_ops *ops);
#endif /* __IPVLAN_H */
+2 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ void ipvlan_init_secret(void)
	net_get_random_once(&ipvlan_jhash_secret, sizeof(ipvlan_jhash_secret));
}

static void ipvlan_count_rx(const struct ipvl_dev *ipvlan,
void ipvlan_count_rx(const struct ipvl_dev *ipvlan,
			    unsigned int len, bool success, bool mcast)
{
	if (likely(success)) {
@@ -33,6 +33,7 @@ static void ipvlan_count_rx(const struct ipvl_dev *ipvlan,
		this_cpu_inc(ipvlan->pcpu_stats->rx_errs);
	}
}
EXPORT_SYMBOL_GPL(ipvlan_count_rx);

static u8 ipvlan_get_v6_hash(const void *iaddr)
{
Loading