From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Helin Zhang <helin.zhang@intel.com>, Jingjing Wu <jingjing.wu@intel.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
stable@dpdk.org, Beilei Xing <beilei.xing@intel.com>
Subject: [dpdk-stable] [PATCH 2/5] net/i40e: fix memset size
Date: Tue, 13 Jun 2017 17:42:09 +0100 [thread overview]
Message-ID: <20170613164212.42374-2-ferruh.yigit@intel.com> (raw)
In-Reply-To: <20170613164212.42374-1-ferruh.yigit@intel.com>
This causes build error with gcc 7.1.1 :
...dpdk/drivers/net/i40e/i40e_flow.c:2357:2:
error: ‘memset’ used with length equal to number of elements without
multiplication by element size [-Werror=memset-elt-size]
memset(off_arr, 0, I40E_MAX_FLXPLD_FIED);
^~~~~~
...dpdk/drivers/net/i40e/i40e_flow.c:2358:2:
error: ‘memset’ used with length equal to number of elements without
multiplication by element size [-Werror=memset-elt-size]
memset(len_arr, 0, I40E_MAX_FLXPLD_FIED);
^~~~~~
Fixed by providing correct size to memset.
Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
This code introduced for this release, so fix can be squashed into
relevant patch.
Cc: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/i40e_flow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index c7589ce86..08c0f8e68 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2354,8 +2354,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
uint16_t ether_type;
int ret;
- memset(off_arr, 0, I40E_MAX_FLXPLD_FIED);
- memset(len_arr, 0, I40E_MAX_FLXPLD_FIED);
+ memset(off_arr, 0, sizeof(off_arr));
+ memset(len_arr, 0, sizeof(len_arr));
memset(flex_mask, 0, I40E_FDIR_MAX_FLEX_LEN);
outer_tpid = i40e_get_outer_vlan(dev);
for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
--
2.13.0
next prev parent reply other threads:[~2017-06-13 16:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 16:42 [dpdk-stable] [PATCH 1/5] kni: fix build with gcc 7.1 Ferruh Yigit
2017-06-13 16:42 ` Ferruh Yigit [this message]
2017-06-14 1:15 ` [dpdk-stable] [PATCH 2/5] net/i40e: fix memset size Xing, Beilei
2017-06-13 16:42 ` [dpdk-stable] [PATCH 3/5] net/enic: fix build with gcc 7.1 Ferruh Yigit
2017-06-13 16:42 ` [dpdk-stable] [PATCH 4/5] net/mlx5: " Ferruh Yigit
2017-06-14 13:24 ` Adrien Mazarguil
2017-06-13 16:42 ` [dpdk-stable] [PATCH 5/5] hash: fix icc build Ferruh Yigit
2017-06-14 20:55 ` [dpdk-stable] [dpdk-dev] [PATCH 1/5] kni: fix build with gcc 7.1 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=20170613164212.42374-2-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
/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).