Commit ab3fc8a0 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[PKT_SCHED]: Mark some functions static in tc actions/act_api

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab0a9fd1
...@@ -88,7 +88,7 @@ int tcf_unregister_action(struct tc_action_ops *act) ...@@ -88,7 +88,7 @@ int tcf_unregister_action(struct tc_action_ops *act)
} }
/* lookup by name */ /* lookup by name */
struct tc_action_ops *tc_lookup_action_n(char *kind) static struct tc_action_ops *tc_lookup_action_n(char *kind)
{ {
struct tc_action_ops *a = NULL; struct tc_action_ops *a = NULL;
...@@ -111,7 +111,7 @@ struct tc_action_ops *tc_lookup_action_n(char *kind) ...@@ -111,7 +111,7 @@ struct tc_action_ops *tc_lookup_action_n(char *kind)
} }
/* lookup by rtattr */ /* lookup by rtattr */
struct tc_action_ops *tc_lookup_action(struct rtattr *kind) static struct tc_action_ops *tc_lookup_action(struct rtattr *kind)
{ {
struct tc_action_ops *a = NULL; struct tc_action_ops *a = NULL;
...@@ -134,8 +134,9 @@ struct tc_action_ops *tc_lookup_action(struct rtattr *kind) ...@@ -134,8 +134,9 @@ struct tc_action_ops *tc_lookup_action(struct rtattr *kind)
return a; return a;
} }
#if 0
/* lookup by id */ /* lookup by id */
struct tc_action_ops *tc_lookup_action_id(u32 type) static struct tc_action_ops *tc_lookup_action_id(u32 type)
{ {
struct tc_action_ops *a = NULL; struct tc_action_ops *a = NULL;
...@@ -155,6 +156,7 @@ struct tc_action_ops *tc_lookup_action_id(u32 type) ...@@ -155,6 +156,7 @@ struct tc_action_ops *tc_lookup_action_id(u32 type)
return a; return a;
} }
#endif
int tcf_action_exec(struct sk_buff *skb,struct tc_action *act, struct tcf_result *res) int tcf_action_exec(struct sk_buff *skb,struct tc_action *act, struct tcf_result *res)
{ {
...@@ -504,7 +506,7 @@ static int act_get_notify(u32 pid, struct nlmsghdr *n, ...@@ -504,7 +506,7 @@ static int act_get_notify(u32 pid, struct nlmsghdr *n,
return err; return err;
} }
int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct nlmsghdr *n, u32 pid) static int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct nlmsghdr *n, u32 pid)
{ {
struct tc_action_ops *a_o; struct tc_action_ops *a_o;
char act_name[4 + IFNAMSIZ + 1]; char act_name[4 + IFNAMSIZ + 1];
...@@ -571,7 +573,7 @@ int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct nlmsghdr *n ...@@ -571,7 +573,7 @@ int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct nlmsghdr *n
return err; return err;
} }
void cleanup_a (struct tc_action *act) static void cleanup_a (struct tc_action *act)
{ {
struct tc_action *a; struct tc_action *a;
...@@ -587,7 +589,7 @@ void cleanup_a (struct tc_action *act) ...@@ -587,7 +589,7 @@ void cleanup_a (struct tc_action *act)
} }
} }
struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a) static struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a)
{ {
char act_name[4 + IFNAMSIZ + 1]; char act_name[4 + IFNAMSIZ + 1];
struct tc_action_ops *a_o = NULL; struct tc_action_ops *a_o = NULL;
...@@ -622,7 +624,7 @@ struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a) ...@@ -622,7 +624,7 @@ struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a)
return a_o; return a_o;
} }
struct tc_action *create_a(int i) static struct tc_action *create_a(int i)
{ {
struct tc_action *act = NULL; struct tc_action *act = NULL;
...@@ -639,7 +641,7 @@ struct tc_action *create_a(int i) ...@@ -639,7 +641,7 @@ struct tc_action *create_a(int i)
return act; return act;
} }
int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid) static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
{ {
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *b; unsigned char *b;
...@@ -709,7 +711,7 @@ int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid) ...@@ -709,7 +711,7 @@ int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
return err; return err;
} }
int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event ) static int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event )
{ {
int s = 0; int s = 0;
...@@ -793,7 +795,7 @@ int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event ) ...@@ -793,7 +795,7 @@ int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event )
} }
int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, unsigned flags) static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, unsigned flags)
{ {
struct tcamsg *t; struct tcamsg *t;
struct nlmsghdr *nlh; struct nlmsghdr *nlh;
...@@ -840,7 +842,7 @@ int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, unsigned fl ...@@ -840,7 +842,7 @@ int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, unsigned fl
} }
int tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr ) static int tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr )
{ {
int ret = 0; int ret = 0;
struct tc_action *act = NULL; struct tc_action *act = NULL;
...@@ -923,7 +925,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -923,7 +925,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
return ret; return ret;
} }
char * static char *
find_dump_kind(struct nlmsghdr *n) find_dump_kind(struct nlmsghdr *n)
{ {
struct rtattr *tb1, *tb2[TCA_ACT_MAX+1]; struct rtattr *tb1, *tb2[TCA_ACT_MAX+1];
......
...@@ -53,14 +53,14 @@ static rwlock_t gact_lock = RW_LOCK_UNLOCKED; ...@@ -53,14 +53,14 @@ static rwlock_t gact_lock = RW_LOCK_UNLOCKED;
#ifdef CONFIG_GACT_PROB #ifdef CONFIG_GACT_PROB
typedef int (*g_rand)(struct tcf_gact *p); typedef int (*g_rand)(struct tcf_gact *p);
int static int
gact_net_rand(struct tcf_gact *p) { gact_net_rand(struct tcf_gact *p) {
if (net_random()%p->pval) if (net_random()%p->pval)
return p->action; return p->action;
return p->paction; return p->paction;
} }
int static int
gact_determ(struct tcf_gact *p) { gact_determ(struct tcf_gact *p) {
if (p->bstats.packets%p->pval) if (p->bstats.packets%p->pval)
return p->action; return p->action;
...@@ -71,7 +71,7 @@ gact_determ(struct tcf_gact *p) { ...@@ -71,7 +71,7 @@ gact_determ(struct tcf_gact *p) {
g_rand gact_rand[MAX_RAND]= { NULL,gact_net_rand, gact_determ}; g_rand gact_rand[MAX_RAND]= { NULL,gact_net_rand, gact_determ};
#endif #endif
int static int
tcf_gact_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ovr,int bind) tcf_gact_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ovr,int bind)
{ {
struct rtattr *tb[TCA_GACT_MAX]; struct rtattr *tb[TCA_GACT_MAX];
...@@ -129,7 +129,7 @@ tcf_gact_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ov ...@@ -129,7 +129,7 @@ tcf_gact_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ov
return ret; return ret;
} }
int static int
tcf_gact_cleanup(struct tc_action *a, int bind) tcf_gact_cleanup(struct tc_action *a, int bind)
{ {
struct tcf_gact *p; struct tcf_gact *p;
...@@ -139,7 +139,7 @@ tcf_gact_cleanup(struct tc_action *a, int bind) ...@@ -139,7 +139,7 @@ tcf_gact_cleanup(struct tc_action *a, int bind)
return 0; return 0;
} }
int static int
tcf_gact(struct sk_buff **pskb, struct tc_action *a) tcf_gact(struct sk_buff **pskb, struct tc_action *a)
{ {
struct tcf_gact *p; struct tcf_gact *p;
...@@ -173,7 +173,7 @@ tcf_gact(struct sk_buff **pskb, struct tc_action *a) ...@@ -173,7 +173,7 @@ tcf_gact(struct sk_buff **pskb, struct tc_action *a)
return action; return action;
} }
int static int
tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
{ {
unsigned char *b = skb->tail; unsigned char *b = skb->tail;
...@@ -214,7 +214,7 @@ tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) ...@@ -214,7 +214,7 @@ tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
return -1; return -1;
} }
struct tc_action_ops act_gact_ops = { static struct tc_action_ops act_gact_ops = {
.next = NULL, .next = NULL,
.kind = "gact", .kind = "gact",
.type = TCA_ACT_GACT, .type = TCA_ACT_GACT,
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define MY_TAB_SIZE 16 #define MY_TAB_SIZE 16
#define MY_TAB_MASK 15 #define MY_TAB_MASK 15
u32 idx_gen; static u32 idx_gen;
static struct tcf_ipt *tcf_ipt_ht[MY_TAB_SIZE]; static struct tcf_ipt *tcf_ipt_ht[MY_TAB_SIZE];
/* ipt hash table lock */ /* ipt hash table lock */
static rwlock_t ipt_lock = RW_LOCK_UNLOCKED; static rwlock_t ipt_lock = RW_LOCK_UNLOCKED;
...@@ -93,7 +93,7 @@ init_targ(struct tcf_ipt *p) ...@@ -93,7 +93,7 @@ init_targ(struct tcf_ipt *p)
return ret; return ret;
} }
int static int
tcf_ipt_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a, int ovr, int bind) tcf_ipt_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a, int ovr, int bind)
{ {
struct ipt_entry_target *t; struct ipt_entry_target *t;
...@@ -231,7 +231,7 @@ tcf_ipt_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a, int ov ...@@ -231,7 +231,7 @@ tcf_ipt_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a, int ov
} }
int static int
tcf_ipt_cleanup(struct tc_action *a, int bind) tcf_ipt_cleanup(struct tc_action *a, int bind)
{ {
struct tcf_ipt *p; struct tcf_ipt *p;
...@@ -241,7 +241,7 @@ tcf_ipt_cleanup(struct tc_action *a, int bind) ...@@ -241,7 +241,7 @@ tcf_ipt_cleanup(struct tc_action *a, int bind)
return 0; return 0;
} }
int static int
tcf_ipt(struct sk_buff **pskb, struct tc_action *a) tcf_ipt(struct sk_buff **pskb, struct tc_action *a)
{ {
int ret = 0, result = 0; int ret = 0, result = 0;
...@@ -293,7 +293,7 @@ tcf_ipt(struct sk_buff **pskb, struct tc_action *a) ...@@ -293,7 +293,7 @@ tcf_ipt(struct sk_buff **pskb, struct tc_action *a)
} }
int static int
tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
{ {
struct ipt_entry_target *t; struct ipt_entry_target *t;
...@@ -345,7 +345,7 @@ tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) ...@@ -345,7 +345,7 @@ tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
return -1; return -1;
} }
struct tc_action_ops act_ipt_ops = { static struct tc_action_ops act_ipt_ops = {
.next = NULL, .next = NULL,
.kind = "ipt", .kind = "ipt",
.type = TCA_ACT_IPT, .type = TCA_ACT_IPT,
......
...@@ -76,7 +76,7 @@ tcf_mirred_release(struct tcf_mirred *p, int bind) ...@@ -76,7 +76,7 @@ tcf_mirred_release(struct tcf_mirred *p, int bind)
return 0; return 0;
} }
int static int
tcf_mirred_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ovr, int bind) tcf_mirred_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ovr, int bind)
{ {
struct rtattr *tb[TCA_MIRRED_MAX]; struct rtattr *tb[TCA_MIRRED_MAX];
...@@ -151,7 +151,7 @@ tcf_mirred_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ...@@ -151,7 +151,7 @@ tcf_mirred_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int
} }
int static int
tcf_mirred_cleanup(struct tc_action *a, int bind) tcf_mirred_cleanup(struct tc_action *a, int bind)
{ {
struct tcf_mirred *p; struct tcf_mirred *p;
...@@ -161,7 +161,7 @@ tcf_mirred_cleanup(struct tc_action *a, int bind) ...@@ -161,7 +161,7 @@ tcf_mirred_cleanup(struct tc_action *a, int bind)
return 0; return 0;
} }
int static int
tcf_mirred(struct sk_buff **pskb, struct tc_action *a) tcf_mirred(struct sk_buff **pskb, struct tc_action *a)
{ {
struct tcf_mirred *p; struct tcf_mirred *p;
...@@ -236,7 +236,7 @@ tcf_mirred(struct sk_buff **pskb, struct tc_action *a) ...@@ -236,7 +236,7 @@ tcf_mirred(struct sk_buff **pskb, struct tc_action *a)
return p->action; return p->action;
} }
int static int
tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref)
{ {
unsigned char *b = skb->tail; unsigned char *b = skb->tail;
......
...@@ -53,7 +53,7 @@ static rwlock_t pedit_lock = RW_LOCK_UNLOCKED; ...@@ -53,7 +53,7 @@ static rwlock_t pedit_lock = RW_LOCK_UNLOCKED;
#include <net/pkt_act.h> #include <net/pkt_act.h>
int static int
tcf_pedit_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ovr, int bind) tcf_pedit_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ovr, int bind)
{ {
struct rtattr *tb[TCA_PEDIT_MAX]; struct rtattr *tb[TCA_PEDIT_MAX];
...@@ -100,7 +100,7 @@ tcf_pedit_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int o ...@@ -100,7 +100,7 @@ tcf_pedit_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int o
return ret; return ret;
} }
int static int
tcf_pedit_cleanup(struct tc_action *a, int bind) tcf_pedit_cleanup(struct tc_action *a, int bind)
{ {
struct tcf_pedit *p; struct tcf_pedit *p;
...@@ -113,7 +113,7 @@ tcf_pedit_cleanup(struct tc_action *a, int bind) ...@@ -113,7 +113,7 @@ tcf_pedit_cleanup(struct tc_action *a, int bind)
/* /*
** **
*/ */
int static int
tcf_pedit(struct sk_buff **pskb, struct tc_action *a) tcf_pedit(struct sk_buff **pskb, struct tc_action *a)
{ {
struct tcf_pedit *p; struct tcf_pedit *p;
...@@ -191,7 +191,7 @@ tcf_pedit(struct sk_buff **pskb, struct tc_action *a) ...@@ -191,7 +191,7 @@ tcf_pedit(struct sk_buff **pskb, struct tc_action *a)
return p->action; return p->action;
} }
int static int
tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref)
{ {
unsigned char *b = skb->tail; unsigned char *b = skb->tail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment