Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NET]: Kill skb->tc_classid

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Patrick McHardy and committed by
David S. Miller
abc3bc58 8728b834

+9 -18
-3
include/linux/skbuff.h
··· 196 196 * @private: Data which is private to the HIPPI implementation 197 197 * @tc_index: Traffic control index 198 198 * @tc_verd: traffic control verdict 199 - * @tc_classid: traffic control classid 200 199 */ 201 200 202 201 struct sk_buff { ··· 274 275 __u32 tc_index; /* traffic control index */ 275 276 #ifdef CONFIG_NET_CLS_ACT 276 277 __u32 tc_verd; /* traffic control verdict */ 277 - __u32 tc_classid; /* traffic control classid */ 278 278 #endif 279 - 280 279 #endif 281 280 282 281
+1 -1
include/net/act_api.h
··· 63 63 __u32 type; /* TBD to match kind */ 64 64 __u32 capab; /* capabilities includes 4 bit version */ 65 65 struct module *owner; 66 - int (*act)(struct sk_buff **, struct tc_action *); 66 + int (*act)(struct sk_buff **, struct tc_action *, struct tcf_result *); 67 67 int (*get_stats)(struct sk_buff *, struct tc_action *); 68 68 int (*dump)(struct sk_buff *, struct tc_action *,int , int); 69 69 int (*cleanup)(struct tc_action *, int bind);
-2
net/core/skbuff.c
··· 300 300 skb->tc_index = 0; 301 301 #ifdef CONFIG_NET_CLS_ACT 302 302 skb->tc_verd = 0; 303 - skb->tc_classid = 0; 304 303 #endif 305 304 #endif 306 305 ··· 375 376 n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd); 376 377 n->tc_verd = CLR_TC_MUNGED(n->tc_verd); 377 378 C(input_dev); 378 - C(tc_classid); 379 379 #endif 380 380 381 381 #endif
+1 -6
net/sched/act_api.c
··· 165 165 while ((a = act) != NULL) { 166 166 repeat: 167 167 if (a->ops && a->ops->act) { 168 - ret = a->ops->act(&skb, a); 168 + ret = a->ops->act(&skb, a, res); 169 169 if (TC_MUNGED & skb->tc_verd) { 170 170 /* copied already, allow trampling */ 171 171 skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); ··· 179 179 act = a->next; 180 180 } 181 181 exec_done: 182 - if (skb->tc_classid > 0) { 183 - res->classid = skb->tc_classid; 184 - res->class = 0; 185 - skb->tc_classid = 0; 186 - } 187 182 return ret; 188 183 } 189 184
+1 -1
net/sched/gact.c
··· 135 135 } 136 136 137 137 static int 138 - tcf_gact(struct sk_buff **pskb, struct tc_action *a) 138 + tcf_gact(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 139 139 { 140 140 struct tcf_gact *p = PRIV(a, gact); 141 141 struct sk_buff *skb = *pskb;
+1 -1
net/sched/ipt.c
··· 201 201 } 202 202 203 203 static int 204 - tcf_ipt(struct sk_buff **pskb, struct tc_action *a) 204 + tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 205 205 { 206 206 int ret = 0, result = 0; 207 207 struct tcf_ipt *p = PRIV(a, ipt);
+1 -1
net/sched/mirred.c
··· 158 158 } 159 159 160 160 static int 161 - tcf_mirred(struct sk_buff **pskb, struct tc_action *a) 161 + tcf_mirred(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 162 162 { 163 163 struct tcf_mirred *p = PRIV(a, mirred); 164 164 struct net_device *dev;
+1 -1
net/sched/pedit.c
··· 130 130 } 131 131 132 132 static int 133 - tcf_pedit(struct sk_buff **pskb, struct tc_action *a) 133 + tcf_pedit(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 134 134 { 135 135 struct tcf_pedit *p = PRIV(a, pedit); 136 136 struct sk_buff *skb = *pskb;
+2 -1
net/sched/police.c
··· 284 284 return 0; 285 285 } 286 286 287 - static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a) 287 + static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a, 288 + struct tcf_result *res) 288 289 { 289 290 psched_time_t now; 290 291 struct sk_buff *skb = *pskb;
+1 -1
net/sched/simple.c
··· 44 44 #include <net/pkt_act.h> 45 45 #include <net/act_generic.h> 46 46 47 - static int tcf_simp(struct sk_buff **pskb, struct tc_action *a) 47 + static int tcf_simp(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 48 48 { 49 49 struct sk_buff *skb = *pskb; 50 50 struct tcf_defact *p = PRIV(a, defact);