linux/net/sched/act_ife.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * net/sched/ife.c	Inter-FE action based on ForCES WG InterFE LFB
 *
 *		Refer to:
 *		draft-ietf-forces-interfelfb-03
 *		and
 *		netdev01 paper:
 *		"Distributing Linux Traffic Control Classifier-Action
 *		Subsystem"
 *		Authors: Jamal Hadi Salim and Damascene M. Joachimpillai
 *
 * copyright Jamal Hadi Salim (2015)
*/

#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <linux/module.h>
#include <linux/init.h>
#include <net/net_namespace.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
#include <net/pkt_cls.h>
#include <uapi/linux/tc_act/tc_ife.h>
#include <net/tc_act/tc_ife.h>
#include <linux/etherdevice.h>
#include <net/ife.h>
#include <net/tc_wrapper.h>

static int max_metacnt =;
static struct tc_action_ops act_ife_ops;

static const struct nla_policy ife_policy[TCA_IFE_MAX + 1] =;

int ife_encode_meta_u16(u16 metaval, void *skbdata, struct tcf_meta_info *mi)
{}
EXPORT_SYMBOL_GPL();

int ife_get_meta_u32(struct sk_buff *skb, struct tcf_meta_info *mi)
{}
EXPORT_SYMBOL_GPL();

int ife_check_meta_u32(u32 metaval, struct tcf_meta_info *mi)
{}
EXPORT_SYMBOL_GPL();

int ife_check_meta_u16(u16 metaval, struct tcf_meta_info *mi)
{}
EXPORT_SYMBOL_GPL();

int ife_encode_meta_u32(u32 metaval, void *skbdata, struct tcf_meta_info *mi)
{}
EXPORT_SYMBOL_GPL();

int ife_get_meta_u16(struct sk_buff *skb, struct tcf_meta_info *mi)
{}
EXPORT_SYMBOL_GPL();

int ife_alloc_meta_u32(struct tcf_meta_info *mi, void *metaval, gfp_t gfp)
{}
EXPORT_SYMBOL_GPL();

int ife_alloc_meta_u16(struct tcf_meta_info *mi, void *metaval, gfp_t gfp)
{}
EXPORT_SYMBOL_GPL();

void ife_release_meta_gen(struct tcf_meta_info *mi)
{}
EXPORT_SYMBOL_GPL();

int ife_validate_meta_u32(void *val, int len)
{}
EXPORT_SYMBOL_GPL();

int ife_validate_meta_u16(void *val, int len)
{}
EXPORT_SYMBOL_GPL();

static LIST_HEAD(ifeoplist);
static DEFINE_RWLOCK(ife_mod_lock);

static struct tcf_meta_ops *find_ife_oplist(u16 metaid)
{}

int register_ife_op(struct tcf_meta_ops *mops)
{}
EXPORT_SYMBOL_GPL();

int unregister_ife_op(struct tcf_meta_ops *mops)
{}
EXPORT_SYMBOL_GPL();

static int ife_validate_metatype(struct tcf_meta_ops *ops, void *val, int len)
{}

#ifdef CONFIG_MODULES
static const char *ife_meta_id2name(u32 metaid)
{}
#endif

/* called when adding new meta information
*/
static int load_metaops_and_vet(u32 metaid, void *val, int len, bool rtnl_held)
{}

/* called when adding new meta information
*/
static int __add_metainfo(const struct tcf_meta_ops *ops,
			  struct tcf_ife_info *ife, u32 metaid, void *metaval,
			  int len, bool atomic, bool exists)
{}

static int add_metainfo_and_get_ops(const struct tcf_meta_ops *ops,
				    struct tcf_ife_info *ife, u32 metaid,
				    bool exists)
{}

static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval,
			int len, bool exists)
{}

static int use_all_metadata(struct tcf_ife_info *ife, bool exists)
{}

static int dump_metalist(struct sk_buff *skb, struct tcf_ife_info *ife)
{}

/* under ife->tcf_lock */
static void _tcf_ife_cleanup(struct tc_action *a)
{}

static void tcf_ife_cleanup(struct tc_action *a)
{}

static int load_metalist(struct nlattr **tb, bool rtnl_held)
{}

static int populate_metalist(struct tcf_ife_info *ife, struct nlattr **tb,
			     bool exists, bool rtnl_held)
{}

static int tcf_ife_init(struct net *net, struct nlattr *nla,
			struct nlattr *est, struct tc_action **a,
			struct tcf_proto *tp, u32 flags,
			struct netlink_ext_ack *extack)
{}

static int tcf_ife_dump(struct sk_buff *skb, struct tc_action *a, int bind,
			int ref)
{}

static int find_decode_metaid(struct sk_buff *skb, struct tcf_ife_info *ife,
			      u16 metaid, u16 mlen, void *mdata)
{}

static int tcf_ife_decode(struct sk_buff *skb, const struct tc_action *a,
			  struct tcf_result *res)
{}

/*XXX: check if we can do this at install time instead of current
 * send data path
**/
static int ife_get_sz(struct sk_buff *skb, struct tcf_ife_info *ife)
{}

static int tcf_ife_encode(struct sk_buff *skb, const struct tc_action *a,
			  struct tcf_result *res, struct tcf_ife_params *p)
{}

TC_INDIRECT_SCOPE int tcf_ife_act(struct sk_buff *skb,
				  const struct tc_action *a,
				  struct tcf_result *res)
{}

static struct tc_action_ops act_ife_ops =;
MODULE_ALIAS_NET_ACT();

static __net_init int ife_init_net(struct net *net)
{}

static void __net_exit ife_exit_net(struct list_head *net_list)
{}

static struct pernet_operations ife_net_ops =;

static int __init ife_init_module(void)
{}

static void __exit ife_cleanup_module(void)
{}

module_init();
module_exit(ife_cleanup_module);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();