netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure
@ 2019-02-11  7:52 Eli Britstein
  2019-02-11 13:30 ` Jiri Pirko
  2019-02-12  5:31 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Eli Britstein @ 2019-02-11  7:52 UTC (permalink / raw)
  To: netdev
  Cc: Roi Dayan, Pablo Neira Ayuso, Jiri Pirko, Saeed Mahameed, Eli Britstein

Implementation of macro "flow_action_for_each" introduced in
commit e3ab786b42535 ("flow_offload: add flow action infrastructure")
and used in commit 738678817573c ("drivers: net: use flow action
infrastructure") iterated the first item twice and did not reach the
last one. Fix it.

Fixes: e3ab786b42535 ("flow_offload: add flow action infrastructure")
Fixes: 738678817573c ("drivers: net: use flow action infrastructure")
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
---
 include/net/flow_offload.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index 23166caa0da5..a307ccb18015 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -171,7 +171,7 @@ static inline bool flow_action_has_entries(const struct flow_action *action)
 }
 
 #define flow_action_for_each(__i, __act, __actions)			\
-        for (__i = 0, __act = &(__actions)->entries[0]; __i < (__actions)->num_entries; __act = &(__actions)->entries[__i++])
+        for (__i = 0, __act = &(__actions)->entries[0]; __i < (__actions)->num_entries; __act = &(__actions)->entries[++__i])
 
 struct flow_rule {
 	struct flow_match	match;
-- 
2.14.5


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

* Re: [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure
  2019-02-11  7:52 [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure Eli Britstein
@ 2019-02-11 13:30 ` Jiri Pirko
  2019-02-11 14:37   ` Pablo Neira Ayuso
  2019-02-12  5:31 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Pirko @ 2019-02-11 13:30 UTC (permalink / raw)
  To: Eli Britstein
  Cc: netdev, Roi Dayan, Pablo Neira Ayuso, Jiri Pirko, Saeed Mahameed

Mon, Feb 11, 2019 at 08:52:59AM CET, elibr@mellanox.com wrote:
>Implementation of macro "flow_action_for_each" introduced in
>commit e3ab786b42535 ("flow_offload: add flow action infrastructure")
>and used in commit 738678817573c ("drivers: net: use flow action
>infrastructure") iterated the first item twice and did not reach the
>last one. Fix it.
>
>Fixes: e3ab786b42535 ("flow_offload: add flow action infrastructure")
>Fixes: 738678817573c ("drivers: net: use flow action infrastructure")
>Signed-off-by: Eli Britstein <elibr@mellanox.com>
>Reviewed-by: Roi Dayan <roid@mellanox.com>

Acked-by: Jiri Pirko <jiri@mellanox.com>

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

* Re: [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure
  2019-02-11 13:30 ` Jiri Pirko
@ 2019-02-11 14:37   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2019-02-11 14:37 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: Eli Britstein, netdev, Roi Dayan, Jiri Pirko, Saeed Mahameed

On Mon, Feb 11, 2019 at 02:30:38PM +0100, Jiri Pirko wrote:
> Mon, Feb 11, 2019 at 08:52:59AM CET, elibr@mellanox.com wrote:
> >Implementation of macro "flow_action_for_each" introduced in
> >commit e3ab786b42535 ("flow_offload: add flow action infrastructure")
> >and used in commit 738678817573c ("drivers: net: use flow action
> >infrastructure") iterated the first item twice and did not reach the
> >last one. Fix it.
> >
> >Fixes: e3ab786b42535 ("flow_offload: add flow action infrastructure")
> >Fixes: 738678817573c ("drivers: net: use flow action infrastructure")
> >Signed-off-by: Eli Britstein <elibr@mellanox.com>
> >Reviewed-by: Roi Dayan <roid@mellanox.com>
> 
> Acked-by: Jiri Pirko <jiri@mellanox.com>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

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

* Re: [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure
  2019-02-11  7:52 [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure Eli Britstein
  2019-02-11 13:30 ` Jiri Pirko
@ 2019-02-12  5:31 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2019-02-12  5:31 UTC (permalink / raw)
  To: elibr; +Cc: netdev, roid, pablo, jiri, saeedm

From: Eli Britstein <elibr@mellanox.com>
Date: Mon, 11 Feb 2019 09:52:59 +0200

> Implementation of macro "flow_action_for_each" introduced in
> commit e3ab786b42535 ("flow_offload: add flow action infrastructure")
> and used in commit 738678817573c ("drivers: net: use flow action
> infrastructure") iterated the first item twice and did not reach the
> last one. Fix it.
> 
> Fixes: e3ab786b42535 ("flow_offload: add flow action infrastructure")
> Fixes: 738678817573c ("drivers: net: use flow action infrastructure")
> Signed-off-by: Eli Britstein <elibr@mellanox.com>
> Reviewed-by: Roi Dayan <roid@mellanox.com>

Applied, thanks.

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

end of thread, other threads:[~2019-02-12  5:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11  7:52 [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure Eli Britstein
2019-02-11 13:30 ` Jiri Pirko
2019-02-11 14:37   ` Pablo Neira Ayuso
2019-02-12  5:31 ` David 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).