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 F0FC0A3160 for ; Fri, 11 Oct 2019 06:37:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 753F51E8FE; Fri, 11 Oct 2019 06:37:53 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30047.outbound.protection.outlook.com [40.107.3.47]) by dpdk.org (Postfix) with ESMTP id 484C41E8F5 for ; Fri, 11 Oct 2019 06:37:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V2APBjSfPvMwRlcJ+s2UtLrkthaN74SF5fkkUvZFeQwG8tIvgaauIWZss2igAx/t8fJhYBf+lPUIG8NBtLjhYBigFQ7hF64dTISc9Isp94C/dSWeSJGKiOf19FpGjAqo+0bOhULqWKXDjdbNPIc9ug9ExzDENMI6rHLIsx6Sby2IP0N2xkYjncv179ozFsbPpemDtDajQimNv4LoaYtaA59F0Sd0z7ZMypDVZyFppx8O0U3Fcg3xenR/TjZI5QZcKfEEd+QmFqGPB+EBxfl7kVahZe/UCayDONmYPGo0rIuo/S9g+lwRyQAFMtNShLMSoyjgSiUIk/p0Fa38nX8BpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aHsEt4TwHMAR8H6If46/0UGw2YqXSLrx+ZO1smMWi2g=; b=dfzGF6l329Tv1f6Ds2PM0d0ja/ffy06ACUBhf788zhcBnb2YiiI0HqLo0nKBLSOwp02Y45n+CnrBxKn6JM0SGAdgOYTuTbCMEuRqMOyMFG0yXssl/4XvQhGwXeC8ER9tZZYJTFL9zC+zCtqDHQWhoy2Bg78Qsee9lWN1k9sWtEQQFo9UzhyZtGNLYarEWxfTJrU3Gd31RVeuc/ZGWB90QN4eBigzAetr/MOYHpVTGLM9YB9r3/WwjFsb2AfL/s+t+X5DN3+R+F2PHZUwaArZVumSsRfyxOeAKQNfLJH8hHkdY5X+wWI6eU8Or9y8PZfssmXdk7ACqTUg8Z5yQ82CiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aHsEt4TwHMAR8H6If46/0UGw2YqXSLrx+ZO1smMWi2g=; b=WqnigDot1D6kicx5VxWyrdBGaeAjeBnJESscgAlJF0QKcz9rRAhM6o1ZZtvos3UZ36aAKthKKynN3frsBXXwRJ/pc8wh1D3iSoWA2DlWFD/nbIWt2UbrC7YNqE2j3/4J7+z9kwopCh+nfmAaAq6SUJcv9unZE1S0jk4pbCUlsHI= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.62.139) by VI1PR0401MB2543.eurprd04.prod.outlook.com (10.168.66.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.23; Fri, 11 Oct 2019 04:37:50 +0000 Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::b0c5:3e17:6ab7:5c26]) by VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::b0c5:3e17:6ab7:5c26%10]) with mapi id 15.20.2327.026; Fri, 11 Oct 2019 04:37:50 +0000 From: Hemant Agrawal To: "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 , Beilei Xing , Qi Zhang , Jingjing Wu , Wenzhuo Lu , Qiming Yang , Alejandro Lucero , Andrew Rybchenko , Jerin Jacob , Maciej Czekaj , Rosen Xu , Tianfei zhang CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/3] drivers: use RTE_DIM instead of ARRAY_SIZE Thread-Index: AQHVf+l3PGnuSqOS5EiqMESPlbM9q6dU2umw Date: Fri, 11 Oct 2019 04:37:49 +0000 Message-ID: References: <20191011040709.8344-1-pbhagavatula@marvell.com> <20191011040709.8344-2-pbhagavatula@marvell.com> In-Reply-To: <20191011040709.8344-2-pbhagavatula@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-originating-ip: [92.120.1.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6b6139db-d30f-4e58-f0c0-08d74e04c5d2 x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: VI1PR0401MB2543:|VI1PR0401MB2543: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 0187F3EA14 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(396003)(376002)(136003)(346002)(39860400002)(199004)(189003)(486006)(52536014)(44832011)(3846002)(6116002)(110136005)(6436002)(7696005)(11346002)(446003)(476003)(76176011)(33656002)(26005)(14454004)(102836004)(71190400001)(71200400001)(9686003)(6506007)(8936002)(81156014)(81166006)(186003)(55016002)(6246003)(8676002)(74316002)(7416002)(25786009)(5660300002)(316002)(76116006)(66476007)(66446008)(66556008)(99286004)(64756008)(4326008)(86362001)(256004)(7736002)(478600001)(229853002)(66066001)(2501003)(2906002)(305945005)(66946007)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2543; H:VI1PR0401MB2541.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZvL+eWrCrFnx2aSZl1cP54TtKVwNZvC6LYfGpnB3XxHpyv57M5lRwXsQjbC62202cRKqCxuvS2zLGJg6fDof5o/w49vHzJDe5tpJ5FyfSHTe5hQ8xT11Xtfa9Wvymiy5dR4WCYZ3HEof6pEpBv/rUkAqpkrEMsRsDifKsOXJh+NuiW4wATOX7Dnmyka4Zz+yp9Omzvlinppx3THesToSjjys7+wM1VPZqaSkI2uy0QHLAMFubj5qFSCu36FWGgTpnbRqyr/y1B0XKDaOr94vSp/rcs+4oxpZnk3SD4989GzVUVRAZKIruwCQV/4FhMhP927e9aM25ND3oQmpFcKY5Trcc3kMo2abFzbTSTdStdebi8mIBDnwRZ2kOwS+y7tgTwtFSPQk6qTatjs+MPBdk9NlwtXJkSDpbkZlE6RXQsU= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6b6139db-d30f-4e58-f0c0-08d74e04c5d2 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2019 04:37:50.0496 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: huR1fpetMzaoLDPRsuuwPcHH3/LJZycJj4KFUQY/OILpdyQQRrnLM+DSTqHB0ixGzr/SwR6K6b37L5hBRIGgEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2543 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 >=20 > Use RTE_DIM instead of re-defining ARRAY_SIZE. >=20 > 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(-) >=20 > 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; >=20 > 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); [Hemant] some of these files are common Flibs and they are shared with ot= her projects (Linux/uboot) etc. It will be more appropriate to map the ARRA= Y_SIZE to RTE_DIM in compat.h instead of changing this code inline.=20 This way we need not to maintain diff from the common HW lib codes.