net/sched: pkt_cls: change tc actions order to be as the user sets
authorHadar Hen Zion <[email protected]>
Tue, 27 Sep 2016 08:09:51 +0000 (11:09 +0300)
committerDavid S. Miller <[email protected]>
Wed, 28 Sep 2016 09:02:44 +0000 (05:02 -0400)
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 <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Acked-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
include/net/pkt_cls.h

index 5ccaa4be7d9646765d1ab59803756a3dcbce91fc..767b03a3fe67a5efdd59e7f9f53a0a1f8f588ff0 100644 (file)
@@ -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
 }