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

Commit 235a9d89 authored by Sainath Grandhi's avatar Sainath Grandhi Committed by David S. Miller
Browse files

ipvtap: IP-VLAN based tap driver



This patch adds a tap character device driver that is based on the
IP-VLAN network interface, called ipvtap. An ipvtap device can be created
in the same way as an ipvlan device, using 'type ipvtap', and then accessed
using the tap user space interface.

Signed-off-by: default avatarSainath Grandhi <sainath.grandhi@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a393b5d
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -166,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)"
+1 −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
+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