Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6028323b authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'net_sched'



Cong Wang says:

====================
net_sched: act: more cleanup and improvement

v2 -> v3:
* fix a mis-splitted patch
* keep hinfo as a pointer in ops

v1 -> v2:
* Fix a bug noticed by Jamal
* Drop patches already merged into net-next
* Add patch 5/5

Patches are cleanup's for the structures of tc actions, except patch 4
which is an improvement.

See each patch for details.
====================

Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7282ec8c 03701d6e
Loading
Loading
Loading
Loading
+10 −12
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ struct tc_action_ops {
	struct module		*owner;
	struct module		*owner;
	int     (*act)(struct sk_buff *, const struct tc_action *, struct tcf_result *);
	int     (*act)(struct sk_buff *, const struct tc_action *, struct tcf_result *);
	int     (*dump)(struct sk_buff *, struct tc_action *, int, int);
	int     (*dump)(struct sk_buff *, struct tc_action *, int, int);
	int     (*cleanup)(struct tc_action *, int bind);
	void	(*cleanup)(struct tc_action *, int bind);
	int     (*lookup)(struct tc_action *, u32);
	int     (*lookup)(struct tc_action *, u32);
	int     (*init)(struct net *net, struct nlattr *nla,
	int     (*init)(struct net *net, struct nlattr *nla,
			struct nlattr *est, struct tc_action *act, int ovr,
			struct nlattr *est, struct tc_action *act, int ovr,
@@ -98,20 +98,18 @@ struct tc_action_ops {
};
};


int tcf_hash_search(struct tc_action *a, u32 index);
int tcf_hash_search(struct tc_action *a, u32 index);
void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo);
void tcf_hash_destroy(struct tc_action *a);
int tcf_hash_release(struct tcf_common *p, int bind,
int tcf_hash_release(struct tc_action *a, int bind);
		     struct tcf_hashinfo *hinfo);
u32 tcf_hash_new_index(struct tcf_hashinfo *hinfo);
u32 tcf_hash_new_index(struct tcf_hashinfo *hinfo);
struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a,
int tcf_hash_check(u32 index, struct tc_action *a, int bind);
				  int bind);
int tcf_hash_create(u32 index, struct nlattr *est, struct tc_action *a,
struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est,
		    int size, int bind);
				   struct tc_action *a, int size,
void tcf_hash_cleanup(struct tc_action *a, struct nlattr *est);
				   int bind);
void tcf_hash_insert(struct tc_action *a);
void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo);


int tcf_register_action(struct tc_action_ops *a);
int tcf_register_action(struct tc_action_ops *a, unsigned int mask);
int tcf_unregister_action(struct tc_action_ops *a);
int tcf_unregister_action(struct tc_action_ops *a);
void tcf_action_destroy(struct list_head *actions, int bind);
int tcf_action_destroy(struct list_head *actions, int bind);
int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions,
int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions,
		    struct tcf_result *res);
		    struct tcf_result *res);
int tcf_action_init(struct net *net, struct nlattr *nla,
int tcf_action_init(struct net *net, struct nlattr *nla,
+2 −2
Original line number Original line Diff line number Diff line
@@ -9,7 +9,7 @@ struct tcf_csum {


	u32 update_flags;
	u32 update_flags;
};
};
#define to_tcf_csum(pc) \
#define to_tcf_csum(a) \
	container_of(pc,struct tcf_csum,common)
	container_of(a->priv,struct tcf_csum,common)


#endif /* __NET_TC_CSUM_H */
#endif /* __NET_TC_CSUM_H */
+2 −2
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ struct tcf_defact {
	u32     		tcfd_datalen;
	u32     		tcfd_datalen;
	void    		*tcfd_defdata;
	void    		*tcfd_defdata;
};
};
#define to_defact(pc) \
#define to_defact(a) \
	container_of(pc, struct tcf_defact, common)
	container_of(a->priv, struct tcf_defact, common)


#endif /* __NET_TC_DEF_H */
#endif /* __NET_TC_DEF_H */
+2 −2
Original line number Original line Diff line number Diff line
@@ -11,7 +11,7 @@ struct tcf_gact {
        int			tcfg_paction;
        int			tcfg_paction;
#endif
#endif
};
};
#define to_gact(pc) \
#define to_gact(a) \
	container_of(pc, struct tcf_gact, common)
	container_of(a->priv, struct tcf_gact, common)


#endif /* __NET_TC_GACT_H */
#endif /* __NET_TC_GACT_H */
+2 −2
Original line number Original line Diff line number Diff line
@@ -11,7 +11,7 @@ struct tcf_ipt {
	char			*tcfi_tname;
	char			*tcfi_tname;
	struct xt_entry_target	*tcfi_t;
	struct xt_entry_target	*tcfi_t;
};
};
#define to_ipt(pc) \
#define to_ipt(a) \
	container_of(pc, struct tcf_ipt, common)
	container_of(a->priv, struct tcf_ipt, common)


#endif /* __NET_TC_IPT_H */
#endif /* __NET_TC_IPT_H */
Loading