mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: sched: remove tcf_proto from ematch calls
This removes the tcf_proto argument from the ematch code paths that only need it to reference the net namespace. This allows simplifying qdisc code paths especially when we need to tear down the ematch from an RCU callback. In this case we can not guarentee that the tcf_proto structure is still valid. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Cong Wang <cwang@twopensource.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fcbeb976d7
commit
82a470f111
10 changed files with 26 additions and 25 deletions
|
@ -166,6 +166,7 @@ struct tcf_ematch {
|
|||
unsigned int datalen;
|
||||
u16 matchid;
|
||||
u16 flags;
|
||||
struct net *net;
|
||||
};
|
||||
|
||||
static inline int tcf_em_is_container(struct tcf_ematch *em)
|
||||
|
@ -229,12 +230,11 @@ struct tcf_ematch_tree {
|
|||
struct tcf_ematch_ops {
|
||||
int kind;
|
||||
int datalen;
|
||||
int (*change)(struct tcf_proto *, void *,
|
||||
int (*change)(struct net *net, void *,
|
||||
int, struct tcf_ematch *);
|
||||
int (*match)(struct sk_buff *, struct tcf_ematch *,
|
||||
struct tcf_pkt_info *);
|
||||
void (*destroy)(struct tcf_proto *,
|
||||
struct tcf_ematch *);
|
||||
void (*destroy)(struct tcf_ematch *);
|
||||
int (*dump)(struct sk_buff *, struct tcf_ematch *);
|
||||
struct module *owner;
|
||||
struct list_head link;
|
||||
|
@ -244,7 +244,7 @@ int tcf_em_register(struct tcf_ematch_ops *);
|
|||
void tcf_em_unregister(struct tcf_ematch_ops *);
|
||||
int tcf_em_tree_validate(struct tcf_proto *, struct nlattr *,
|
||||
struct tcf_ematch_tree *);
|
||||
void tcf_em_tree_destroy(struct tcf_proto *, struct tcf_ematch_tree *);
|
||||
void tcf_em_tree_destroy(struct tcf_ematch_tree *);
|
||||
int tcf_em_tree_dump(struct sk_buff *, struct tcf_ematch_tree *, int);
|
||||
int __tcf_em_tree_match(struct sk_buff *, struct tcf_ematch_tree *,
|
||||
struct tcf_pkt_info *);
|
||||
|
@ -301,7 +301,7 @@ struct tcf_ematch_tree {
|
|||
};
|
||||
|
||||
#define tcf_em_tree_validate(tp, tb, t) ((void)(t), 0)
|
||||
#define tcf_em_tree_destroy(tp, t) do { (void)(t); } while(0)
|
||||
#define tcf_em_tree_destroy(t) do { (void)(t); } while(0)
|
||||
#define tcf_em_tree_dump(skb, t, tlv) (0)
|
||||
#define tcf_em_tree_change(tp, dst, src) do { } while(0)
|
||||
#define tcf_em_tree_match(skb, t, info) ((void)(info), 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue