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 B8261A3160 for ; Fri, 11 Oct 2019 11:32:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 36B9D1EAA2; Fri, 11 Oct 2019 11:32:14 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id C57A11EA85 for ; Fri, 11 Oct 2019 11:32:12 +0200 (CEST) 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/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2019 02:32:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,283,1566889200"; d="scan'208";a="197531156" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga003.jf.intel.com with ESMTP; 11 Oct 2019 02:32:06 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.164]) by IRSMSX104.ger.corp.intel.com ([169.254.5.103]) with mapi id 14.03.0439.000; Fri, 11 Oct 2019 10:32:05 +0100 From: "Ananyev, Konstantin" To: Hemant Agrawal , "pbhagavatula@marvell.com" , Sachin Saxena , "Akhil Goyal" , Igor Russkikh , Pavel Belous , Ravi Kumar , Rasesh Mody , Shahed Shaikh , "Rahul Lakkireddy" , Marcin Wojtas , Michal Krawczyk , Guy Tzalik , "Evgeny Schemeilin" , Igor Chauskin , "John Daley" , Hyong Youb Kim , "Wei Hu (Xavier)" , "Min Hu (Connor)" , Yisen Zhuang , "Xing, Beilei" , "Zhang, Qi Z" , "Wu, Jingjing" , "Lu, Wenzhuo" , "Yang, Qiming" , Alejandro Lucero , Andrew Rybchenko , Jerin Jacob , Maciej Czekaj , "Xu, Rosen" , "Zhang, Tianfei" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/3] drivers: use RTE_DIM instead of ARRAY_SIZE Thread-Index: AQHVf+2wlyqZ796fXUqr/0Kkiv9a76dVLXFw Date: Fri, 11 Oct 2019 09:32:04 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725801919757C3@irsmsx105.ger.corp.intel.com> References: <20191011040709.8344-1-pbhagavatula@marvell.com> <20191011040709.8344-2-pbhagavatula@marvell.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjUyNzk2ZWMtNmQ2Ny00ZDIxLTk1OTEtMjFkZTgwMmU0ODI1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNXpnY3lPYkZHTjdSU1BVRG1Qam11RkZjak9Fd2FNaEZPNkRsb2NcL3BPVUp4NEs2Q0dPanJGRENkbjM2cXlkazEifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/3] drivers: use RTE_DIM instead of ARRAY_SIZE 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" > Hi Pavan, >=20 > > > > From: Pavan Nikhilesh > > > > Use RTE_DIM instead of re-defining ARRAY_SIZE. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > drivers/bus/dpaa/base/qbman/qman.c | 6 ++-- > > drivers/bus/dpaa/include/compat.h | 5 ---- > > drivers/crypto/dpaa2_sec/hw/compat.h | 8 ----- > > drivers/crypto/dpaa2_sec/hw/rta/jump_cmd.h | 6 ++-- > > drivers/crypto/dpaa2_sec/hw/rta/nfifo_cmd.h | 2 +- > > drivers/net/atlantic/atl_hw_regs.h | 1 - > > drivers/net/atlantic/hw_atl/hw_atl_utils.c | 4 +-- > > .../net/atlantic/hw_atl/hw_atl_utils_fw2x.c | 2 +- > > drivers/net/axgbe/axgbe_common.h | 3 -- > > drivers/net/axgbe/axgbe_dev.c | 2 +- > > drivers/net/bnx2x/bnx2x.c | 6 ++-- > > drivers/net/bnx2x/bnx2x.h | 6 ---- > > drivers/net/bnx2x/ecore_init.h | 8 ++--- > > drivers/net/bnx2x/ecore_sp.c | 2 +- > > drivers/net/bnx2x/elink.c | 14 ++++----- > > drivers/net/bnx2x/elink.h | 1 - > > drivers/net/cxgbe/base/t4_hw.c | 16 +++++----- > > drivers/net/cxgbe/base/t4vf_hw.c | 4 +-- > > drivers/net/cxgbe/cxgbe_compat.h | 2 -- > > drivers/net/cxgbe/cxgbe_flow.c | 4 +-- > > drivers/net/cxgbe/cxgbe_main.c | 10 +++---- > > drivers/net/cxgbe/sge.c | 2 +- > > drivers/net/ena/ena_ethdev.c | 8 ++--- > > drivers/net/enic/base/vnic_dev.c | 4 +-- > > drivers/net/enic/base/vnic_devcmd.h | 2 -- > > drivers/net/hns3/hns3_cmd.c | 2 +- > > drivers/net/hns3/hns3_ethdev.h | 2 -- > > drivers/net/hns3/hns3_flow.c | 18 +++++------ > > drivers/net/i40e/base/i40e_diag.c | 2 +- > > drivers/net/i40e/base/i40e_osdep.h | 2 -- > > drivers/net/iavf/base/iavf_osdep.h | 2 -- > > drivers/net/ice/base/ice_fdir.c | 2 +- > > drivers/net/ice/base/ice_flex_pipe.c | 2 +- > > drivers/net/ice/base/ice_flow.c | 2 +- > > drivers/net/ice/base/ice_osdep.h | 1 - > > drivers/net/ice/base/ice_switch.c | 2 +- > > .../net/nfp/nfpcore/nfp-common/nfp_platform.h | 4 --- > > drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +- > > drivers/net/nfp/nfpcore/nfp_nsp.c | 2 +- > > drivers/net/nfp/nfpcore/nfp_nsp_eth.c | 4 +-- > > drivers/net/sfc/base/ef10_ev.c | 4 +-- > > drivers/net/sfc/base/ef10_filter.c | 12 ++++---- > > drivers/net/sfc/base/ef10_mac.c | 18 +++++------ > > drivers/net/sfc/base/ef10_nic.c | 4 +-- > > drivers/net/sfc/base/ef10_nvram.c | 6 ++-- > > drivers/net/sfc/base/efx.h | 3 -- > > drivers/net/sfc/base/efx_port.c | 2 +- > > drivers/net/sfc/base/efx_rx.c | 2 +- > > drivers/net/sfc/base/siena_mac.c | 2 +- > > drivers/net/sfc/base/siena_nic.c | 20 ++++++------- > > drivers/net/sfc/base/siena_nvram.c | 6 ++-- > > drivers/net/thunderx/base/nicvf_hw.c | 30 +++++++++---------- > > drivers/net/thunderx/base/nicvf_hw.h | 2 -- > > .../raw/ifpga/base/osdep_rte/osdep_generic.h | 2 -- > > 54 files changed, 120 insertions(+), 170 deletions(-) > > > > diff --git a/drivers/bus/dpaa/base/qbman/qman.c > > b/drivers/bus/dpaa/base/qbman/qman.c > > index e43fc65ef..019be95e2 100644 > > --- a/drivers/bus/dpaa/base/qbman/qman.c > > +++ b/drivers/bus/dpaa/base/qbman/qman.c > > @@ -1956,7 +1956,7 @@ int qman_query_wq(u8 query_dedicated, struct > > qm_mcr_querywq *wq) > > int i, array_len; > > > > wq->channel.id =3D be16_to_cpu(mcr->querywq.channel.id); > > - array_len =3D ARRAY_SIZE(mcr->querywq.wq_len); > > + array_len =3D RTE_DIM(mcr->querywq.wq_len); >=20 > [Hemant] some of these files are common Flibs and they are shared with = other projects (Linux/uboot) etc. It will be more appropriate to > map the ARRAY_SIZE to RTE_DIM in compat.h instead of changing this code i= nline. > This way we need not to maintain diff from the common HW lib codes. +1 to this suggestion