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 C5F8FA0561; Sun, 19 Apr 2020 13:12:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B59661D646; Sun, 19 Apr 2020 13:12:46 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2085.outbound.protection.outlook.com [40.107.22.85]) by dpdk.org (Postfix) with ESMTP id 36A5F1D644 for ; Sun, 19 Apr 2020 13:12:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mKNc0vvPAUNssv1aLwYEmJuA6kiiOksRVHKcmjs94qgRBXOoLApZkwKKw6nsZHxC/VmThT4ZTGZ4GxzQoa9eOOS9/PZjNrDwNVZ0vyI4yvgnDPwFPR1rYj3g3GhF4lj0BO+u2WXFIsgfJpKLKrjqSrnmZGXg3rOyLRy/MSblGVYSFnLMWtQunucqzEF2vdCz3i3p/DVdenc1btOxBHUqGNOikyCOc0UJlqUZ5rrtIGFhWmvD6P2+NQddDBSfYR6LmnGNg6JqCBuf07vlO/eeT8Aid2uixzlTg7Cy0akkr2ze7I5N6TuuDUaPo6AY5qK4lof+nCqDPLAYao7w+i9Kjw== 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=WgyX88RQ4M11NibGUW1v5f3khb0X4j0tUIlYFH2dBVk=; b=JT+84ul8RnK2VqAcdKBPVtP+4DAewYShEGVTuO1elXsSMg/8A+68SdeBlbNW8Uv/144fSlOtvDhvab39kOaemka7XdROJ8VlxUKCKZlhzk260SiSIg+oPnIeUPzm1/lkouT/vhDxTOz13tnHfqixueU+9OSHkU0Uo5UVb6j2Vt0+AawNPaqO0WjpbWswPEV75OmYFr9kYBwgHlr0mHUEWi2aN6eiDoTl1l4rb8UpJF/5r28VLJAh78Xhktxb9amauxMtJZ7GAVFqB7JW8I4IWyLNO+fMIMqRDLBDu9E5rkBicXesUrXNvfuI/X9Bf+e1hfcfku/oKbs5kT//g1zrhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WgyX88RQ4M11NibGUW1v5f3khb0X4j0tUIlYFH2dBVk=; b=W4OAqRYRNSWMLp6kBQbSR2hwZo4BcPQ1rE84LLJ4B+ovnNXep3kGlIqkU6govJLknXOXDcTzwlFE1ibyW2FlvcF6JzWPHPmJ8Wn00yhrlifBbgqlTxFyRqpXQbxKgq2nNLXwtolWtMtUeOqMJ3vT9jPt6w9zubAfnHqw02O/F1o= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM0PR05MB4514.eurprd05.prod.outlook.com (2603:10a6:208:af::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Sun, 19 Apr 2020 11:12:44 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e%6]) with mapi id 15.20.2921.027; Sun, 19 Apr 2020 11:12:44 +0000 From: Raslan Darawsheh To: Suanming Mou , Matan Azrad , Slava Ovsiienko CC: "ferruh.yigit@intel.com" , "dev@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix indexed pool 32-bits build error Thread-Index: AQHWFSL8k5xi9N75dkymreUn+/Xb3qiATHsg Date: Sun, 19 Apr 2020 11:12:44 +0000 Message-ID: References: <1587174292-201940-1-git-send-email-suanmingm@mellanox.com> In-Reply-To: <1587174292-201940-1-git-send-email-suanmingm@mellanox.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=rasland@mellanox.com; x-originating-ip: [188.161.229.36] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ceea582f-239b-405d-90af-08d7e452958b x-ms-traffictypediagnostic: AM0PR05MB4514:|AM0PR05MB4514: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:47; x-forefront-prvs: 0378F1E47A x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(8676002)(4326008)(110136005)(316002)(54906003)(9686003)(186003)(2906002)(7696005)(5660300002)(6506007)(53546011)(66946007)(26005)(86362001)(8936002)(81156014)(76116006)(6636002)(64756008)(66446008)(33656002)(52536014)(66556008)(66476007)(71200400001)(55016002)(478600001); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Lmij5Oz4PPdDTWqWxCZnL/xvntk03hL9oQHeK3Ybk/3dT6Cx+HAfVfQPugofbWt9XM7WCOVF9RFZ1D5j3KL6SrTCrRBlioMz6fGBSLprpdwkXKu0ruK0MimyDZ0D63nHrlmkd86kQj5yYwK/nnark2suZ2db1GS6sElLraA0q3dj5eTSCC32MM10idhHVYYDpJUsOn0LqPxhcn9fEbQ5ZiCdrhL2TrLlVNb4V7gpQoxYDqSsOUx85Wk71mMKGEBWv8NmjAfmhR/U4Tq/HZNJ8ueO1+0XLO9pg0HP4PkunPVlt+H0IucE2rSwwgHdFHJxLZds9ybTIY4Inhh3LLVXaGuqDkkN9WdIFxlazg5xy3XCMXWmW0K2OuTV+sXO7N8Nr7pEYbsLmncyeokRe1CYgYPEoy4GLTA7NqbIVsaC1LANKBsgHOP+507BN5zXiXJM x-ms-exchange-antispam-messagedata: 9QxwN3mxC2yNvcvVI+vM1SskjfgxRu3iTI7SXjNMFB8KIJ8jwqE0NJc7g6++7TWtidI5DznBeX7VOnpzkK7yB60RJr9rjbO+BfYzCiOxP8+rMgmbJ/PAyWrzFNnGQ1juJlrAi0fh3oQlLEslT76j1g== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: ceea582f-239b-405d-90af-08d7e452958b X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2020 11:12:44.2173 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zu5JKwgwJB6RvCnFCboZ5DMbiHj21rbps5lBPIeB58mK7SPX0LcsEiyJDMJJyM64dG7tnjE7tBv6vtSF5Zz2vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4514 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix indexed pool 32-bits build error 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, > -----Original Message----- > From: Suanming Mou > Sent: Saturday, April 18, 2020 4:45 AM > To: Matan Azrad ; Slava Ovsiienko > > Cc: ferruh.yigit@intel.com; Raslan Darawsheh ; > dev@dpdk.org > Subject: [PATCH] net/mlx5: fix indexed pool 32-bits build error >=20 > Currently, 32-bits compiler treats int64_t as long long int different > with 64-bits. The indexed pool dump function build will be failed in > 32-bits mode. >=20 > As the maximum supported entries of the indexed pool is UINT32_MAX, use > the 64 bits to record the pool statistics is waste of memory. Align the > statistics value type to uint32_t. >=20 > Fixes: 1702f7848f6a ("net/mlx5: add indexed memory pool") >=20 > Signed-off-by: Suanming Mou > --- > drivers/net/mlx5/mlx5_utils.c | 4 ++-- > drivers/net/mlx5/mlx5_utils.h | 10 +++++----- > 2 files changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.= c > index 7683167..07a6283 100644 > --- a/drivers/net/mlx5/mlx5_utils.c > +++ b/drivers/net/mlx5/mlx5_utils.c > @@ -472,8 +472,8 @@ struct mlx5_indexed_pool * > pool->cfg.type, pool->cfg.size, pool->n_trunk_valid, > pool->cfg.trunk_size, pool->n_trunk_valid); > #ifdef POOL_DEBUG > - printf("Pool %s entry %ld, trunk alloc %ld, empty: %ld, " > - "available %ld free %ld\n", > + printf("Pool %s entry %u, trunk alloc %u, empty: %u, " > + "available %u free %u\n", > pool->cfg.type, pool->n_entry, pool->trunk_new, > pool->trunk_empty, pool->trunk_avail, pool->trunk_free); > #endif > diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.= h > index 1051b12..d81ace3 100644 > --- a/drivers/net/mlx5/mlx5_utils.h > +++ b/drivers/net/mlx5/mlx5_utils.h > @@ -127,11 +127,11 @@ struct mlx5_indexed_pool { > struct mlx5_indexed_trunk **trunks; > uint32_t free_list; /* Index to first free trunk. */ > #ifdef POOL_DEBUG > - int64_t n_entry; > - int64_t trunk_new; > - int64_t trunk_avail; > - int64_t trunk_empty; > - int64_t trunk_free; > + uint32_t n_entry; > + uint32_t trunk_new; > + uint32_t trunk_avail; > + uint32_t trunk_empty; > + uint32_t trunk_free; > #endif > uint32_t grow_tbl[]; /* Save the index offset for the grow trunks. */ > }; > -- > 1.8.3.1 Patch squashed into relevant commit in next-net-mlx, Applied to next-net-mlx, Kindest regards, Raslan Darawsheh