All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets
@ 2016-09-27  8:09 Hadar Hen Zion
  2016-09-27  9:15 ` Hadar Hen Zion
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hadar Hen Zion @ 2016-09-27  8:09 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Jamal Hadi Salim, Cong Wang, Or Gerlitz, Hadar Hen Zion

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>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets
  2016-09-27  8:09 [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets Hadar Hen Zion
@ 2016-09-27  9:15 ` Hadar Hen Zion
  2016-09-27 16:29 ` Cong Wang
  2016-09-28  9:03 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Hadar Hen Zion @ 2016-09-27  9:15 UTC (permalink / raw)
  To: Hadar Hen Zion
  Cc: David S. Miller, netdev, Jamal Hadi Salim, Cong Wang, Or Gerlitz

On Tue, Sep 27, 2016 at 11:09 AM, Hadar Hen Zion <hadarh@mellanox.com> 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 <hadarh@mellanox.com>
> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>


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


> ---
>  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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets
  2016-09-27  8:09 [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets Hadar Hen Zion
  2016-09-27  9:15 ` Hadar Hen Zion
@ 2016-09-27 16:29 ` Cong Wang
  2016-09-28  9:03 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Cong Wang @ 2016-09-27 16:29 UTC (permalink / raw)
  To: Hadar Hen Zion
  Cc: David S. Miller, Linux Kernel Network Developers,
	Jamal Hadi Salim, Or Gerlitz

On Tue, Sep 27, 2016 at 1:09 AM, Hadar Hen Zion <hadarh@mellanox.com> 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 <hadarh@mellanox.com>
> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Acked-by: Cong Wang <xiyou.wangcong@gmail.com>


Thanks for updating changelog!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets
  2016-09-27  8:09 [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets Hadar Hen Zion
  2016-09-27  9:15 ` Hadar Hen Zion
  2016-09-27 16:29 ` Cong Wang
@ 2016-09-28  9:03 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-09-28  9:03 UTC (permalink / raw)
  To: hadarh; +Cc: netdev, jhs, xiyou.wangcong, ogerlitz

From: Hadar Hen Zion <hadarh@mellanox.com>
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 <hadarh@mellanox.com>
> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-28  9:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-27  8:09 [PATCH net-next V2] net/sched: pkt_cls: change tc actions order to be as the user sets Hadar Hen Zion
2016-09-27  9:15 ` Hadar Hen Zion
2016-09-27 16:29 ` Cong Wang
2016-09-28  9:03 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.