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

net/sched: pkt_cls: change tc actions order to be as the user sets

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 <hadarh@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Hadar Hen Zion and committed by
David S. Miller
fa5effe7 c099ff3c

+1 -1
+1 -1
include/net/pkt_cls.h
··· 123 123 for (i = 0; i < exts->nr_actions; i++) { 124 124 struct tc_action *a = exts->actions[i]; 125 125 126 - list_add(&a->list, actions); 126 + list_add_tail(&a->list, actions); 127 127 } 128 128 #endif 129 129 }