summaryrefslogtreecommitdiffstats
path: root/include/net/vxlan.h
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-07-21 10:44:06 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-21 10:39:07 -0700
commit614732eaa12dd462c0ab274700bed14f36afea5e (patch)
treea1c33082de3ab1192f072605ab1abe106f11065c /include/net/vxlan.h
parentc9db965c524ea27451e60d5ddcd242f6c33a70fd (diff)
downloadlinux-614732eaa12dd462c0ab274700bed14f36afea5e.tar.bz2
openvswitch: Use regular VXLAN net_device device
This gets rid of all OVS specific VXLAN code in the receive and transmit path by using a VXLAN net_device to represent the vport. Only a small shim layer remains which takes care of handling the VXLAN specific OVS Netlink configuration. Unexports vxlan_sock_add(), vxlan_sock_release(), vxlan_xmit_skb() since they are no longer needed. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/vxlan.h')
-rw-r--r--include/net/vxlan.h24
1 files changed, 4 insertions, 20 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 19535f85eb2c..eb8d721cdb67 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -101,22 +101,12 @@ struct vxlanhdr {
#define FDB_HASH_SIZE (1<<FDB_HASH_BITS)
struct vxlan_metadata {
- __be32 vni;
u32 gbp;
-
- /* Temporary until vxlan_rcv() API is gone */
- struct metadata_dst *tun_dst;
};
-struct vxlan_sock;
-typedef void (vxlan_rcv_t)(struct vxlan_sock *vh, struct sk_buff *skb,
- struct vxlan_metadata *md);
-
/* per UDP socket information */
struct vxlan_sock {
struct hlist_node hlist;
- vxlan_rcv_t *rcv;
- void *data;
struct work_struct del_work;
struct socket *sock;
struct rcu_head rcu;
@@ -203,19 +193,13 @@ struct vxlan_dev {
VXLAN_F_COLLECT_METADATA | \
VXLAN_F_FLOW_BASED)
-struct vxlan_sock *vxlan_sock_add(struct net *net, __be16 port,
- vxlan_rcv_t *rcv, void *data,
- bool no_share, u32 flags);
-
struct net_device *vxlan_dev_create(struct net *net, const char *name,
u8 name_assign_type, struct vxlan_config *conf);
-void vxlan_sock_release(struct vxlan_sock *vs);
-
-int vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb,
- __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df,
- __be16 src_port, __be16 dst_port, struct vxlan_metadata *md,
- bool xnet, u32 vxflags);
+static inline __be16 vxlan_dev_dst_port(struct vxlan_dev *vxlan)
+{
+ return inet_sk(vxlan->vn_sock->sock->sk)->inet_sport;
+}
static inline netdev_features_t vxlan_features_check(struct sk_buff *skb,
netdev_features_t features)