patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Xing, Beilei" <beilei.xing@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"Zhang, Helin" <helin.zhang@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH 2/5] net/i40e: fix memset size
Date: Wed, 14 Jun 2017 01:15:19 +0000	[thread overview]
Message-ID: <94479800C636CB44BD422CB454846E0131FC9574@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20170613164212.42374-2-ferruh.yigit@intel.com>

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, June 14, 2017 12:42 AM
> To: Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; stable@dpdk.org;
> Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH 2/5] net/i40e: fix memset size
> 
> 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

Acked-by: Beilei Xing <beilei.xing@intel.com> , thanks.

  reply	other threads:[~2017-06-14  1:15 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 ` [dpdk-stable] [PATCH 2/5] net/i40e: fix memset size Ferruh Yigit
2017-06-14  1:15   ` Xing, Beilei [this message]
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=94479800C636CB44BD422CB454846E0131FC9574@SHSMSX101.ccr.corp.intel.com \
    --to=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --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).