From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AED9FA057B; Wed, 18 Mar 2020 13:52:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02BC01AFF; Wed, 18 Mar 2020 13:52:43 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id EE929E07 for ; Wed, 18 Mar 2020 13:52:40 +0100 (CET) IronPort-SDR: 5f9/oWFqEHQ832WAjDErFIM4DpYFOfQZSltiw+a67JuOyje2ASd5jJ/ChaV+duQq5AHalOxEvd vCyzAXGBrF2w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2020 05:52:39 -0700 IronPort-SDR: 6mhmB4RdghF76LOGYxBa3mIg/ykProeyQS/x6Glgg5Aa7aPZXErnrz39M/rfdyTd8ecQaVwy9+ slGYsoie05Pg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,567,1574150400"; d="scan'208";a="244813664" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga003.jf.intel.com with ESMTP; 18 Mar 2020 05:52:38 -0700 From: Ferruh Yigit To: Rahul Lakkireddy , Karra Satwik Cc: dev@dpdk.org, Ferruh Yigit , Raslan Darawsheh , Xueming Zhang Date: Wed, 18 Mar 2020 12:52:36 +0000 Message-Id: <20200318125236.652514-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/cxgbe: fix build with clang 3.4.2 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Build error: .../drivers/net/cxgbe/cxgbe_flow.c:315:2: error: implicit truncation from 'int' to bitfield changes value from -1 to 7 [-Werror,-Wbitfield-constant-conversion] CXGBE_FILL_FS(adap->pf, ~0, pf); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .../drivers/net/cxgbe/cxgbe_flow.c:25:2: note: expanded from macro 'CXGBE_FILL_FS' __CXGBE_FILL_FS(v, m, fs, elem, e) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .../drivers/net/cxgbe/cxgbe_flow.c:15:18: note: expanded from macro '__CXGBE_FILL_FS' (fs)->mask.elem = (__m); \ ^ ~~~~~ Commit in fixes line changes 'PF_BITWIDTH' to '3', which makes 'fs->pf' bitfield size '3', changing '~0' to '0x7' to prevent truncation in assignment. Fixes: dcd456abe46f ("net/cxgbe: support flow API for matching all packets on PF") Reported-by: Raslan Darawsheh Reported-by: Xueming Zhang Signed-off-by: Ferruh Yigit --- Cc: kaara.satwik@chelsio.com --- drivers/net/cxgbe/cxgbe_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c index 13fd78aaf..a46515d3b 100644 --- a/drivers/net/cxgbe/cxgbe_flow.c +++ b/drivers/net/cxgbe/cxgbe_flow.c @@ -312,7 +312,7 @@ ch_rte_parsetype_pf(const void *dmask __rte_unused, CXGBE_FILL_FS(1, 1, pfvf_vld); - CXGBE_FILL_FS(adap->pf, ~0, pf); + CXGBE_FILL_FS(adap->pf, 0x7, pf); return 0; } -- 2.25.1