From: Eli Britstein <elibr@mellanox.com>
To: netdev@vger.kernel.org
Cc: Roi Dayan <roid@mellanox.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jiri Pirko <jiri@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Eli Britstein <elibr@mellanox.com>
Subject: [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure
Date: Mon, 11 Feb 2019 09:52:59 +0200 [thread overview]
Message-ID: <20190211075259.39058-1-elibr@mellanox.com> (raw)
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
next reply other threads:[~2019-02-11 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 7:52 Eli Britstein [this message]
2019-02-11 13:30 ` [PATCH net-next 1/1] flow_offload: Fix flow action infrastructure Jiri Pirko
2019-02-11 14:37 ` Pablo Neira Ayuso
2019-02-12 5:31 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190211075259.39058-1-elibr@mellanox.com \
--to=elibr@mellanox.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=roid@mellanox.com \
--cc=saeedm@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox