[PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets

Subsystems: networking [general], tc subsystem, the rest

STALE3666d REVIEWED: 2 (2M)

1 review trailer (1 from subsystem maintainers).

4 messages, 4 authors, 2016-09-28 · open the first message on its own page

[PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets

From: Hadar Hen Zion <hidden>
Date: 2016-09-27 08:10:12

Currently the created tc actions list is reversed against the order
set by the user.
Change the actions list order to be the same as was set by the user.

This patch doesn't affect dump actions behavior.
For dumping, action->order parameter is used so the list order doesn't
matter.

Signed-off-by: Hadar Hen Zion <redacted>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
 include/net/pkt_cls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 5ccaa4b..767b03a 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -123,7 +123,7 @@ static inline void tcf_exts_to_list(const struct tcf_exts *exts,
 	for (i = 0; i < exts->nr_actions; i++) {
 		struct tc_action *a = exts->actions[i];
 
-		list_add(&a->list, actions);
+		list_add_tail(&a->list, actions);
 	}
 #endif
 }
-- 
1.8.3.1

Re: [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets

From: Hadar Hen Zion <hidden>
Date: 2016-09-27 09:15:24

On Tue, Sep 27, 2016 at 11:09 AM, Hadar Hen Zion [off-list ref] wrote:
Currently the created tc actions list is reversed against the order
set by the user.
Change the actions list order to be the same as was set by the user.

This patch doesn't affect dump actions behavior.
For dumping, action->order parameter is used so the list order doesn't
matter.

Signed-off-by: Hadar Hen Zion <redacted>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Changes from V1:
- Add a comment to the change log

quoted hunk
---
 include/net/pkt_cls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 5ccaa4b..767b03a 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -123,7 +123,7 @@ static inline void tcf_exts_to_list(const struct tcf_exts *exts,
        for (i = 0; i < exts->nr_actions; i++) {
                struct tc_action *a = exts->actions[i];

-               list_add(&a->list, actions);
+               list_add_tail(&a->list, actions);
        }
 #endif
 }
--
1.8.3.1

Re: [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets

From: Cong Wang <hidden>
Date: 2016-09-27 16:29:45

On Tue, Sep 27, 2016 at 1:09 AM, Hadar Hen Zion [off-list ref] wrote:
Currently the created tc actions list is reversed against the order
set by the user.
Change the actions list order to be the same as was set by the user.

This patch doesn't affect dump actions behavior.
For dumping, action->order parameter is used so the list order doesn't
matter.

Signed-off-by: Hadar Hen Zion <redacted>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Cong Wang <redacted>


Thanks for updating changelog!

Re: [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets

From: David Miller <davem@davemloft.net>
Date: 2016-09-28 09:04:03

From: Hadar Hen Zion <redacted>
Date: Tue, 27 Sep 2016 11:09:51 +0300
Currently the created tc actions list is reversed against the order
set by the user.
Change the actions list order to be the same as was set by the user.

This patch doesn't affect dump actions behavior.
For dumping, action->order parameter is used so the list order doesn't
matter.

Signed-off-by: Hadar Hen Zion <redacted>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help