linux/drivers/net/vxlan/vxlan_mdb.c

// SPDX-License-Identifier: GPL-2.0-only

#include <linux/if_bridge.h>
#include <linux/in.h>
#include <linux/list.h>
#include <linux/netdevice.h>
#include <linux/netlink.h>
#include <linux/rhashtable.h>
#include <linux/rhashtable-types.h>
#include <linux/rtnetlink.h>
#include <linux/skbuff.h>
#include <linux/types.h>
#include <net/netlink.h>
#include <net/vxlan.h>

#include "vxlan_private.h"

struct vxlan_mdb_entry_key {};

struct vxlan_mdb_entry {};

#define VXLAN_MDB_REMOTE_F_BLOCKED

struct vxlan_mdb_remote {};

#define VXLAN_SGRP_F_DELETE

struct vxlan_mdb_src_entry {};

struct vxlan_mdb_dump_ctx {};

struct vxlan_mdb_config_src_entry {};

struct vxlan_mdb_config {};

struct vxlan_mdb_flush_desc {};

static const struct rhashtable_params vxlan_mdb_rht_params =;

static int __vxlan_mdb_add(const struct vxlan_mdb_config *cfg,
			   struct netlink_ext_ack *extack);
static int __vxlan_mdb_del(const struct vxlan_mdb_config *cfg,
			   struct netlink_ext_ack *extack);

static void vxlan_br_mdb_entry_fill(const struct vxlan_dev *vxlan,
				    const struct vxlan_mdb_entry *mdb_entry,
				    const struct vxlan_mdb_remote *remote,
				    struct br_mdb_entry *e)
{}

static int vxlan_mdb_entry_info_fill_srcs(struct sk_buff *skb,
					  const struct vxlan_mdb_remote *remote)
{}

static int vxlan_mdb_entry_info_fill(const struct vxlan_dev *vxlan,
				     struct sk_buff *skb,
				     const struct vxlan_mdb_entry *mdb_entry,
				     const struct vxlan_mdb_remote *remote)
{}

static int vxlan_mdb_entry_fill(const struct vxlan_dev *vxlan,
				struct sk_buff *skb,
				struct vxlan_mdb_dump_ctx *ctx,
				const struct vxlan_mdb_entry *mdb_entry)
{}

static int vxlan_mdb_fill(const struct vxlan_dev *vxlan, struct sk_buff *skb,
			  struct vxlan_mdb_dump_ctx *ctx)
{}

int vxlan_mdb_dump(struct net_device *dev, struct sk_buff *skb,
		   struct netlink_callback *cb)
{}

static const struct nla_policy
vxlan_mdbe_src_list_entry_pol[MDBE_SRCATTR_MAX + 1] =;

static const struct nla_policy
vxlan_mdbe_src_list_pol[MDBE_SRC_LIST_MAX + 1] =;

static const struct netlink_range_validation vni_range =;

static const struct nla_policy vxlan_mdbe_attrs_pol[MDBE_ATTR_MAX + 1] =;

static bool vxlan_mdb_is_valid_source(const struct nlattr *attr, __be16 proto,
				      struct netlink_ext_ack *extack)
{}

static void vxlan_mdb_group_set(struct vxlan_mdb_entry_key *group,
				const struct br_mdb_entry *entry,
				const struct nlattr *source_attr)
{}

static bool vxlan_mdb_is_star_g(const struct vxlan_mdb_entry_key *group)
{}

static bool vxlan_mdb_is_sg(const struct vxlan_mdb_entry_key *group)
{}

static int vxlan_mdb_config_src_entry_init(struct vxlan_mdb_config *cfg,
					   __be16 proto,
					   const struct nlattr *src_entry,
					   struct netlink_ext_ack *extack)
{}

static void
vxlan_mdb_config_src_entry_fini(struct vxlan_mdb_config_src_entry *src)
{}

static int vxlan_mdb_config_src_list_init(struct vxlan_mdb_config *cfg,
					  __be16 proto,
					  const struct nlattr *src_list,
					  struct netlink_ext_ack *extack)
{}

static void vxlan_mdb_config_src_list_fini(struct vxlan_mdb_config *cfg)
{}

static int vxlan_mdb_config_attrs_init(struct vxlan_mdb_config *cfg,
				       const struct br_mdb_entry *entry,
				       const struct nlattr *set_attrs,
				       struct netlink_ext_ack *extack)
{}

static int vxlan_mdb_config_init(struct vxlan_mdb_config *cfg,
				 struct net_device *dev, struct nlattr *tb[],
				 u16 nlmsg_flags,
				 struct netlink_ext_ack *extack)
{}

static void vxlan_mdb_config_fini(struct vxlan_mdb_config *cfg)
{}

static struct vxlan_mdb_entry *
vxlan_mdb_entry_lookup(struct vxlan_dev *vxlan,
		       const struct vxlan_mdb_entry_key *group)
{}

static struct vxlan_mdb_remote *
vxlan_mdb_remote_lookup(const struct vxlan_mdb_entry *mdb_entry,
			const union vxlan_addr *addr)
{}

static void vxlan_mdb_rdst_free(struct rcu_head *head)
{}

static int vxlan_mdb_remote_rdst_init(const struct vxlan_mdb_config *cfg,
				      struct vxlan_mdb_remote *remote)
{}

static void vxlan_mdb_remote_rdst_fini(struct vxlan_rdst *rd)
{}

static int vxlan_mdb_remote_init(const struct vxlan_mdb_config *cfg,
				 struct vxlan_mdb_remote *remote)
{}

static void vxlan_mdb_remote_fini(struct vxlan_dev *vxlan,
				  struct vxlan_mdb_remote *remote)
{}

static struct vxlan_mdb_src_entry *
vxlan_mdb_remote_src_entry_lookup(const struct vxlan_mdb_remote *remote,
				  const union vxlan_addr *addr)
{}

static struct vxlan_mdb_src_entry *
vxlan_mdb_remote_src_entry_add(struct vxlan_mdb_remote *remote,
			       const union vxlan_addr *addr)
{}

static void
vxlan_mdb_remote_src_entry_del(struct vxlan_mdb_src_entry *ent)
{}

static int
vxlan_mdb_remote_src_fwd_add(const struct vxlan_mdb_config *cfg,
			     const union vxlan_addr *addr,
			     struct netlink_ext_ack *extack)
{}

static void
vxlan_mdb_remote_src_fwd_del(struct vxlan_dev *vxlan,
			     const struct vxlan_mdb_entry_key *group,
			     const struct vxlan_mdb_remote *remote,
			     const union vxlan_addr *addr)
{}

static int
vxlan_mdb_remote_src_add(const struct vxlan_mdb_config *cfg,
			 struct vxlan_mdb_remote *remote,
			 const struct vxlan_mdb_config_src_entry *src,
			 struct netlink_ext_ack *extack)
{}

static void vxlan_mdb_remote_src_del(struct vxlan_dev *vxlan,
				     const struct vxlan_mdb_entry_key *group,
				     const struct vxlan_mdb_remote *remote,
				     struct vxlan_mdb_src_entry *ent)
{}

static int vxlan_mdb_remote_srcs_add(const struct vxlan_mdb_config *cfg,
				     struct vxlan_mdb_remote *remote,
				     struct netlink_ext_ack *extack)
{}

static void vxlan_mdb_remote_srcs_del(struct vxlan_dev *vxlan,
				      const struct vxlan_mdb_entry_key *group,
				      struct vxlan_mdb_remote *remote)
{}

static size_t
vxlan_mdb_nlmsg_src_list_size(const struct vxlan_mdb_entry_key *group,
			      const struct vxlan_mdb_remote *remote)
{}

static size_t
vxlan_mdb_nlmsg_remote_size(const struct vxlan_dev *vxlan,
			    const struct vxlan_mdb_entry *mdb_entry,
			    const struct vxlan_mdb_remote *remote)
{}

static size_t vxlan_mdb_nlmsg_size(const struct vxlan_dev *vxlan,
				   const struct vxlan_mdb_entry *mdb_entry,
				   const struct vxlan_mdb_remote *remote)
{}

static int vxlan_mdb_nlmsg_fill(const struct vxlan_dev *vxlan,
				struct sk_buff *skb,
				const struct vxlan_mdb_entry *mdb_entry,
				const struct vxlan_mdb_remote *remote,
				int type)
{}

static void vxlan_mdb_remote_notify(const struct vxlan_dev *vxlan,
				    const struct vxlan_mdb_entry *mdb_entry,
				    const struct vxlan_mdb_remote *remote,
				    int type)
{}

static int
vxlan_mdb_remote_srcs_replace(const struct vxlan_mdb_config *cfg,
			      const struct vxlan_mdb_entry *mdb_entry,
			      struct vxlan_mdb_remote *remote,
			      struct netlink_ext_ack *extack)
{}

static int vxlan_mdb_remote_replace(const struct vxlan_mdb_config *cfg,
				    const struct vxlan_mdb_entry *mdb_entry,
				    struct vxlan_mdb_remote *remote,
				    struct netlink_ext_ack *extack)
{}

static int vxlan_mdb_remote_add(const struct vxlan_mdb_config *cfg,
				struct vxlan_mdb_entry *mdb_entry,
				struct netlink_ext_ack *extack)
{}

static void vxlan_mdb_remote_del(struct vxlan_dev *vxlan,
				 struct vxlan_mdb_entry *mdb_entry,
				 struct vxlan_mdb_remote *remote)
{}

static struct vxlan_mdb_entry *
vxlan_mdb_entry_get(struct vxlan_dev *vxlan,
		    const struct vxlan_mdb_entry_key *group)
{}

static void vxlan_mdb_entry_put(struct vxlan_dev *vxlan,
				struct vxlan_mdb_entry *mdb_entry)
{}

static int __vxlan_mdb_add(const struct vxlan_mdb_config *cfg,
			   struct netlink_ext_ack *extack)
{}

static int __vxlan_mdb_del(const struct vxlan_mdb_config *cfg,
			   struct netlink_ext_ack *extack)
{}

int vxlan_mdb_add(struct net_device *dev, struct nlattr *tb[], u16 nlmsg_flags,
		  struct netlink_ext_ack *extack)
{}

int vxlan_mdb_del(struct net_device *dev, struct nlattr *tb[],
		  struct netlink_ext_ack *extack)
{}

static const struct nla_policy
vxlan_mdbe_attrs_del_bulk_pol[MDBE_ATTR_MAX + 1] =;

static int vxlan_mdb_flush_desc_init(struct vxlan_dev *vxlan,
				     struct vxlan_mdb_flush_desc *desc,
				     struct nlattr *tb[],
				     struct netlink_ext_ack *extack)
{}

static void vxlan_mdb_remotes_flush(struct vxlan_dev *vxlan,
				    struct vxlan_mdb_entry *mdb_entry,
				    const struct vxlan_mdb_flush_desc *desc)
{}

static void vxlan_mdb_flush(struct vxlan_dev *vxlan,
			    const struct vxlan_mdb_flush_desc *desc)
{}

int vxlan_mdb_del_bulk(struct net_device *dev, struct nlattr *tb[],
		       struct netlink_ext_ack *extack)
{}

static const struct nla_policy vxlan_mdbe_attrs_get_pol[MDBE_ATTR_MAX + 1] =;

static int vxlan_mdb_get_parse(struct net_device *dev, struct nlattr *tb[],
			       struct vxlan_mdb_entry_key *group,
			       struct netlink_ext_ack *extack)
{}

static struct sk_buff *
vxlan_mdb_get_reply_alloc(const struct vxlan_dev *vxlan,
			  const struct vxlan_mdb_entry *mdb_entry)
{}

static int
vxlan_mdb_get_reply_fill(const struct vxlan_dev *vxlan,
			 struct sk_buff *skb,
			 const struct vxlan_mdb_entry *mdb_entry,
			 u32 portid, u32 seq)
{}

int vxlan_mdb_get(struct net_device *dev, struct nlattr *tb[], u32 portid,
		  u32 seq, struct netlink_ext_ack *extack)
{}

struct vxlan_mdb_entry *vxlan_mdb_entry_skb_get(struct vxlan_dev *vxlan,
						struct sk_buff *skb,
						__be32 src_vni)
{}

netdev_tx_t vxlan_mdb_xmit(struct vxlan_dev *vxlan,
			   const struct vxlan_mdb_entry *mdb_entry,
			   struct sk_buff *skb)
{}

static void vxlan_mdb_check_empty(void *ptr, void *arg)
{}

int vxlan_mdb_init(struct vxlan_dev *vxlan)
{}

void vxlan_mdb_fini(struct vxlan_dev *vxlan)
{}