* cls patchlet
@ 2004-10-03 19:52 jamal
2004-10-03 20:12 ` Resend WAS(Re: " jamal
0 siblings, 1 reply; 5+ messages in thread
From: jamal @ 2004-10-03 19:52 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 76 bytes --]
Dave,
resets class when tc_classid non-zero.
Please apply.
cheers,
jamal
[-- Attachment #2: classfix_p --]
[-- Type: text/plain, Size: 921 bytes --]
--- a/net/sched/cls_u32.c 2004-08-14 01:36:33.000000000 -0400
+++ b/net/sched/cls_u32.c 2004-10-01 08:29:48.000000000 -0400
@@ -178,6 +178,7 @@
int pol_res = tcf_action_exec(skb, n->action);
if (skb->tc_classid > 0) {
res->classid = skb->tc_classid;
+ res->class = 0;
skb->tc_classid = 0;
}
--- /usr/src/269-rc3-mod/net/sched/cls_fw.c 2004/10/01 12:36:06 1.1
+++ /usr/src/269-rc3-mod/net/sched/cls_fw.c 2004/10/01 14:22:30
@@ -103,6 +103,12 @@
#endif
if (f->action) {
int pol_res = tcf_action_exec(skb, f->action);
+ if (skb->tc_classid > 0) {
+ res->classid = skb->tc_classid;
+ res->class = 0;
+ skb->tc_classid = 0;
+ }
+
if (pol_res >= 0)
return pol_res;
} else
^ permalink raw reply [flat|nested] 5+ messages in thread* Resend WAS(Re: cls patchlet 2004-10-03 19:52 cls patchlet jamal @ 2004-10-03 20:12 ` jamal 2004-10-03 22:12 ` David S. Miller 0 siblings, 1 reply; 5+ messages in thread From: jamal @ 2004-10-03 20:12 UTC (permalink / raw) To: David S. Miller; +Cc: netdev [-- Attachment #1: Type: text/plain, Size: 180 bytes --] Ignore previous. This is better formated ;-> On Sun, 2004-10-03 at 15:52, jamal wrote: > Dave, > > resets class when tc_classid non-zero. > > Please apply. > > cheers, > jamal [-- Attachment #2: classfix_p --] [-- Type: text/plain, Size: 883 bytes --] --- a/net/sched/cls_u32.c 2004-08-14 01:36:33.000000000 -0400 +++ b/net/sched/cls_u32.c 2004-10-01 08:29:48.000000000 -0400 @@ -178,6 +178,7 @@ int pol_res = tcf_action_exec(skb, n->action); if (skb->tc_classid > 0) { res->classid = skb->tc_classid; + res->class = 0; skb->tc_classid = 0; } --- a/net/sched/cls_fw.c 2004/10/01 12:36:06 1.1 +++ b/net/sched/cls_fw.c 2004/10/01 14:22:30 @@ -103,6 +103,12 @@ #endif if (f->action) { int pol_res = tcf_action_exec(skb, f->action); + if (skb->tc_classid > 0) { + res->classid = skb->tc_classid; + res->class = 0; + skb->tc_classid = 0; + } + if (pol_res >= 0) return pol_res; } else ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Resend WAS(Re: cls patchlet 2004-10-03 20:12 ` Resend WAS(Re: " jamal @ 2004-10-03 22:12 ` David S. Miller 2004-10-03 22:22 ` jamal 0 siblings, 1 reply; 5+ messages in thread From: David S. Miller @ 2004-10-03 22:12 UTC (permalink / raw) To: hadi; +Cc: netdev On 03 Oct 2004 16:12:32 -0400 jamal <hadi@cyberus.ca> wrote: > Ignore previous. This is better formated ;-> Any particular reason not to remove this work into the common code in tcf_action_exec()? Like so: ===== include/net/pkt_sched.h 1.23 vs edited ===== --- 1.23/include/net/pkt_sched.h 2004-09-28 13:58:51 -07:00 +++ edited/include/net/pkt_sched.h 2004-10-03 14:50:35 -07:00 @@ -376,7 +376,7 @@ struct tc_action_ops extern int tcf_register_action(struct tc_action_ops *a); extern int tcf_unregister_action(struct tc_action_ops *a); extern void tcf_action_destroy(struct tc_action *a, int bind); -extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a); +extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res); extern int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind); extern int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind); extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); ===== net/sched/act_api.c 1.4 vs edited ===== --- 1.4/net/sched/act_api.c 2004-06-29 14:20:44 -07:00 +++ edited/net/sched/act_api.c 2004-10-03 14:51:41 -07:00 @@ -155,7 +155,7 @@ struct tc_action_ops *tc_lookup_action_i return a; } -int tcf_action_exec(struct sk_buff *skb,struct tc_action *act) +int tcf_action_exec(struct sk_buff *skb,struct tc_action *act, struct tcf_result *res) { struct tc_action *a; @@ -164,7 +164,8 @@ int tcf_action_exec(struct sk_buff *skb, if (skb->tc_verd & TC_NCLS) { skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); D2PRINTK("(%p)tcf_action_exec: cleared TC_NCLS in %s out %s\n",skb,skb->input_dev?skb->input_dev->name:"xxx",skb->dev->name); - return TC_ACT_OK; + ret = TC_ACT_OK; + goto exec_done; } while ((a = act) != NULL) { repeat: @@ -186,6 +187,11 @@ repeat: } exec_done: + if (skb->tc_classid > 0) { + res->classid = skb->tc_classid; + res->class = 0; + skb->tc_classid = 0; + } return ret; } ===== net/sched/cls_fw.c 1.8 vs edited ===== --- 1.8/net/sched/cls_fw.c 2004-07-06 14:26:23 -07:00 +++ edited/net/sched/cls_fw.c 2004-10-03 14:52:05 -07:00 @@ -102,7 +102,7 @@ static int fw_classify(struct sk_buff *s } #endif if (f->action) { - int pol_res = tcf_action_exec(skb, f->action); + int pol_res = tcf_action_exec(skb, f->action, res); if (pol_res >= 0) return pol_res; } else ===== net/sched/cls_u32.c 1.16 vs edited ===== --- 1.16/net/sched/cls_u32.c 2004-07-29 15:44:49 -07:00 +++ edited/net/sched/cls_u32.c 2004-10-03 14:52:00 -07:00 @@ -175,12 +175,7 @@ check_terminal: #endif #ifdef CONFIG_NET_CLS_ACT if (n->action) { - int pol_res = tcf_action_exec(skb, n->action); - if (skb->tc_classid > 0) { - res->classid = skb->tc_classid; - skb->tc_classid = 0; - } - + int pol_res = tcf_action_exec(skb, n->action, res); if (pol_res >= 0) return pol_res; } else ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Resend WAS(Re: cls patchlet 2004-10-03 22:12 ` David S. Miller @ 2004-10-03 22:22 ` jamal 2004-10-03 22:22 ` David S. Miller 0 siblings, 1 reply; 5+ messages in thread From: jamal @ 2004-10-03 22:22 UTC (permalink / raw) To: David S. Miller; +Cc: netdev On Sun, 2004-10-03 at 18:12, David S. Miller wrote: > On 03 Oct 2004 16:12:32 -0400 > jamal <hadi@cyberus.ca> wrote: > > > Ignore previous. This is better formated ;-> > > Any particular reason not to remove this work into the > common code in tcf_action_exec()? Like so: Looks good ;-> Go ahead and push that instead and i will run my regression tests on your changes. cheers, jamal ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Resend WAS(Re: cls patchlet 2004-10-03 22:22 ` jamal @ 2004-10-03 22:22 ` David S. Miller 0 siblings, 0 replies; 5+ messages in thread From: David S. Miller @ 2004-10-03 22:22 UTC (permalink / raw) To: hadi; +Cc: netdev On 03 Oct 2004 18:22:37 -0400 jamal <hadi@cyberus.ca> wrote: > > On Sun, 2004-10-03 at 18:12, David S. Miller wrote: > > On 03 Oct 2004 16:12:32 -0400 > > jamal <hadi@cyberus.ca> wrote: > > > > > Ignore previous. This is better formated ;-> > > > > Any particular reason not to remove this work into the > > common code in tcf_action_exec()? Like so: > > Looks good ;-> Go ahead and push that instead and i will run my > regression tests on your changes. Great, thanks for the quick feedback. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-03 22:22 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-10-03 19:52 cls patchlet jamal 2004-10-03 20:12 ` Resend WAS(Re: " jamal 2004-10-03 22:12 ` David S. Miller 2004-10-03 22:22 ` jamal 2004-10-03 22:22 ` David S. Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).