#include <linux/module.h>
#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/init.h>
#include <linux/slab.h>
#include <net/act_api.h>
#include <net/netlink.h>
#include <net/pkt_cls.h>
#include <net/tc_act/tc_gate.h>
#include <net/tc_wrapper.h>
static struct tc_action_ops act_gate_ops;
static ktime_t gate_get_time(struct tcf_gate *gact)
{ … }
static void gate_get_start_time(struct tcf_gate *gact, ktime_t *start)
{ … }
static void gate_start_timer(struct tcf_gate *gact, ktime_t start)
{ … }
static enum hrtimer_restart gate_timer_func(struct hrtimer *timer)
{ … }
TC_INDIRECT_SCOPE int tcf_gate_act(struct sk_buff *skb,
const struct tc_action *a,
struct tcf_result *res)
{ … }
static const struct nla_policy entry_policy[TCA_GATE_ENTRY_MAX + 1] = …;
static const struct nla_policy gate_policy[TCA_GATE_MAX + 1] = …;
static int fill_gate_entry(struct nlattr **tb, struct tcfg_gate_entry *entry,
struct netlink_ext_ack *extack)
{ … }
static int parse_gate_entry(struct nlattr *n, struct tcfg_gate_entry *entry,
int index, struct netlink_ext_ack *extack)
{ … }
static void release_entry_list(struct list_head *entries)
{ … }
static int parse_gate_list(struct nlattr *list_attr,
struct tcf_gate_params *sched,
struct netlink_ext_ack *extack)
{ … }
static void gate_setup_timer(struct tcf_gate *gact, u64 basetime,
enum tk_offsets tko, s32 clockid,
bool do_init)
{ … }
static int tcf_gate_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 void tcf_gate_cleanup(struct tc_action *a)
{ … }
static int dumping_entry(struct sk_buff *skb,
struct tcfg_gate_entry *entry)
{ … }
static int tcf_gate_dump(struct sk_buff *skb, struct tc_action *a,
int bind, int ref)
{ … }
static void tcf_gate_stats_update(struct tc_action *a, u64 bytes, u64 packets,
u64 drops, u64 lastuse, bool hw)
{ … }
static size_t tcf_gate_get_fill_size(const struct tc_action *act)
{ … }
static void tcf_gate_entry_destructor(void *priv)
{ … }
static int tcf_gate_get_entries(struct flow_action_entry *entry,
const struct tc_action *act)
{ … }
static int tcf_gate_offload_act_setup(struct tc_action *act, void *entry_data,
u32 *index_inc, bool bind,
struct netlink_ext_ack *extack)
{ … }
static struct tc_action_ops act_gate_ops = …;
MODULE_ALIAS_NET_ACT(…) …;
static __net_init int gate_init_net(struct net *net)
{ … }
static void __net_exit gate_exit_net(struct list_head *net_list)
{ … }
static struct pernet_operations gate_net_ops = …;
static int __init gate_init_module(void)
{ … }
static void __exit gate_cleanup_module(void)
{ … }
module_init(…) …;
module_exit(gate_cleanup_module);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;