From: Zhiyong Yang <zhiyong.yang@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, pascal.mazon@6wind.com, ferruh.yigit@intel.com,
thomas@monjalon.net, ophirmu@mellanox.com,
Zhiyong Yang <zhiyong.yang@intel.com>
Subject: [dpdk-dev] [PATCH] net/tap: fix ICC compilation fails
Date: Thu, 1 Feb 2018 12:43:00 +0800 [thread overview]
Message-ID: <20180201044300.12332-1-zhiyong.yang@intel.com> (raw)
The following error is reported when compiling 18.02-rc2 usng ICC,
"transfer of control bypasses initialization of".
The patch fixes the issue.
Fixes: 1911c5edc6cd ("net/tap: fix eBPF RSS map key handling")
Cc: stable@dpdk.org
Cc: pascal.mazon@6wind.com
Cc: ferruh.yigit@intel.com
Cc: thomas@monjalon.net
Cc: ophirmu@mellanox.com
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
drivers/net/tap/tap_flow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 212992e49..65657f0a0 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1930,6 +1930,7 @@ static int bpf_rss_key(enum bpf_rss_key_e cmd, __u32 *key_idx)
static __u32 num_used_keys;
static __u32 rss_keys[MAX_RSS_KEYS] = {KEY_STAT_UNSPEC};
static __u32 rss_keys_initialized;
+ __u32 key;
switch (cmd) {
case KEY_CMD_GET:
@@ -1975,7 +1976,7 @@ static int bpf_rss_key(enum bpf_rss_key_e cmd, __u32 *key_idx)
* map index as an out-of-range value and the release operation
* will be silently ignored.
*/
- __u32 key = *key_idx - KEY_IDX_OFFSET;
+ key = *key_idx - KEY_IDX_OFFSET;
if (key >= RTE_DIM(rss_keys))
break;
--
2.13.3
next reply other threads:[~2018-02-01 4:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 4:43 Zhiyong Yang [this message]
2018-02-01 10:02 ` Thomas Monjalon
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=20180201044300.12332-1-zhiyong.yang@intel.com \
--to=zhiyong.yang@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=ophirmu@mellanox.com \
--cc=pascal.mazon@6wind.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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;
as well as URLs for NNTP newsgroup(s).