From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E3C3E567C; Tue, 13 Jun 2017 18:42:27 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 13 Jun 2017 09:42:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,338,1493708400"; d="scan'208";a="1140846262" Received: from silpixa00372839.ir.intel.com (HELO silpixa00372839.ger.corp.intel.com) ([10.237.222.154]) by orsmga001.jf.intel.com with ESMTP; 13 Jun 2017 09:42:15 -0700 From: Ferruh Yigit To: Helin Zhang , Jingjing Wu Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org, Beilei Xing Date: Tue, 13 Jun 2017 17:42:09 +0100 Message-Id: <20170613164212.42374-2-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170613164212.42374-1-ferruh.yigit@intel.com> References: <20170613164212.42374-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 2/5] net/i40e: fix memset size X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2017 16:42:28 -0000 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 --- This code introduced for this release, so fix can be squashed into relevant patch. Cc: Beilei Xing --- 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