From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC345A00C5 for ; Wed, 3 Aug 2022 08:23:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A0AD40A7E; Wed, 3 Aug 2022 08:23:09 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 5BFFC40141 for ; Wed, 3 Aug 2022 08:23:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659507788; x=1691043788; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LHoV1bxpvmvE0yN42EwAcZagbwKr99IK8ajnA5xwM0Q=; b=ayFbhVYQNPidhpQyjuVfX2nVMFVhRhqtojLzo0b31d9q2H9N7wIRslh4 qiEyWFjBhrmUHLjve+XXpeyVoQkMIDeUQs9I9RspUjL+ziZCc8/s4t4bJ AUqpQBmVZSQetmf6dx0tT23h1fQUlOj5eZjIBz+cr9bN2yINuHQcetDf9 Mctc8cCq9AXPFWhtPSplXca6G1B/nMCHfZ4xXPRrQwGyyIav+4dPFdLur glk15nCMdNFm4HDOI+W6M+9UDulJXeiUZEdHfCjFjHShgSYzPQnp/UxOf jbmjY8dAQDzk4fx9OhyxcsDDlaBqLpeWALqJ3vpGkL9VdK01gPnSyqx2w g==; X-IronPort-AV: E=McAfee;i="6400,9594,10427"; a="353598868" X-IronPort-AV: E=Sophos;i="5.93,213,1654585200"; d="scan'208";a="353598868" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2022 23:22:52 -0700 X-IronPort-AV: E=Sophos;i="5.93,213,1654585200"; d="scan'208";a="930263660" Received: from intel-cd-odc-steve.cd.intel.com ([10.240.178.135]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2022 23:22:51 -0700 From: Steve Yang To: stable@dpdk.org Cc: qiming.yang@intel.com, qi.z.zhang@intel.com, Steve Yang Subject: [PATCH 19.11] net/ice: fix meson build error with gcc11.2 Date: Wed, 3 Aug 2022 06:12:45 +0000 Message-Id: <20220803061245.158114-1-stevex.yang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org When user built latest DPDK 19.11 with gcc11.2, got error message as below: ../drivers/net/ice/ice_rxtx.c:1365:18: error: array subscript ‘volatile struct ice_32b_rx_flex_desc_comms[0]’ is partly outside array bounds of ‘union ice_16b_rx_flex_desc[1]’ [-Werror=array-bounds] 1365 | stat_err = rte_le_to_cpu_16(desc->status_error0); ../drivers/net/ice/ice_rxtx.c:2090:32: note: while referencing ‘rxd’ 2090 | union ice_rx_flex_desc rxd; | ^~~ In file included from ../lib/librte_mbuf/rte_mbuf.h:43, from ../lib/librte_net/rte_ether.h:23, from ../lib/librte_ethdev/rte_ethdev.h:159, from ../lib/librte_ethdev/rte_ethdev_driver.h:18, from ../drivers/net/ice/ice_rxtx.c:5: cc1: all warnings being treated as errors Because the 'desc->status_error0' belongs to 'ice_16b_rx_flex_desc[0]', it cannot be outside array bounds, so, this warning should be skipped with gcc option '-Wno-array-bounds' for gcc11.2. Bugzilla ID: 1055 Fixes: dbf3c0e77a22 ("net/ice: handle Rx flex descriptor") Signed-off-by: Steve Yang --- drivers/net/ice/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build index f9e897bbc2..3c62ed7306 100644 --- a/drivers/net/ice/meson.build +++ b/drivers/net/ice/meson.build @@ -18,6 +18,10 @@ sources = files( deps += ['hash'] includes += include_directories('base') +if (toolchain == 'gcc' and cc.version().version_compare('>=11.0.0')) + cflags += '-Wno-array-bounds' +endif + if arch_subdir == 'x86' sources += files('ice_rxtx_vec_sse.c') -- 2.25.1