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 E77294260E for ; Thu, 21 Sep 2023 22:53:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDBDB402E1; Thu, 21 Sep 2023 22:53:05 +0200 (CEST) Received: from DM5PR00CU002.outbound.protection.outlook.com (mail-centralusazon11021023.outbound.protection.outlook.com [52.101.62.23]) by mails.dpdk.org (Postfix) with ESMTP id 79E9E402C9; Thu, 21 Sep 2023 22:53:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lSpRB2RV1UzihcxwI2P32lbNvilsfcIvsxybPDj+4jpzWWiB+WrMoI6qFuBmkoam/8mVDLgVKAzLHKXVR2tZCVX7IoVms6PNJUvUMsvnYtArtAsN4PhgCqFIG/U6rpCF84rRlK8FP9QQPadwWCqPNrbNoAG7KF5ETd7EmHc+Ioaw1DFOnsnTu3A1fVhJ93sU1IaN22Cvl8hzGL7x0tCyqB8EC2tKGHCnjfJeqHWJCUioftSyeWcnWfdSoRS+sxggwi48VdJMIjx2K/eQPCFtQJHJR7SBEkK2HJmn32C8PDDBzI9kygvyYWhCOnJ3ocwOuyeRY7CnaE0O8+7Vb6TCQA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TzLeF3UW6SZioVvUQ2fihuP+wfau4C6t3KfVhnnIC+o=; b=QnmOdZChuqquMHHiLmxJwxVirRHZhP204gwHDA8U0iIxN7up8iNLoUEd+aUbyv/xAajQEAGPZve3MjGScxz9Y5+zYXd+QjR/8DwZHymkU9nqDiU8XZ5dZ/MKDf72Bq4rEhOY5YEnDjXkf5KEHX1c8IF3hcDZAMfpNMSKdkfbVw366xDDyrPRgvSR0sE1nrUome8WOqsY51ufp4Dd/li6ojc49T4WBNxqKQuup/DM+8dLuyi+FShyXBemiPMzphe+IXlOyRc+KNxRBGZeHzEnG3x6u9FMOPI5Ftsje14PdT5aVjFgx3+4+XC9H4BhdXrVyn/oCcCbVcNGaB9/9UnUUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TzLeF3UW6SZioVvUQ2fihuP+wfau4C6t3KfVhnnIC+o=; b=ah+VnLa9XAv9Q4nZV4Y1z5mZ582g9XcXXuMfih6rLl8ohu7l+FohvQluS4hX8nSQuGBZ29raO4qsAgUOjqqxO0eXJz02NvtEMPitYpjHt+0K1kaqh/WxWZeRFq8JP8VoFr62Ktx4BBNxcX6savnTFd1t2LhVT0LQLUdI1PhVrtc= Received: from MN0PR21MB3264.namprd21.prod.outlook.com (2603:10b6:208:37c::19) by BL0PR2101MB1314.namprd21.prod.outlook.com (2603:10b6:208:92::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.11; Thu, 21 Sep 2023 20:53:00 +0000 Received: from MN0PR21MB3264.namprd21.prod.outlook.com ([fe80::b927:dad1:4c63:42f2]) by MN0PR21MB3264.namprd21.prod.outlook.com ([fe80::b927:dad1:4c63:42f2%2]) with mapi id 15.20.6838.010; Thu, 21 Sep 2023 20:53:00 +0000 From: Long Li To: Wei Hu , "dev@dpdk.org" , "ferruh.yigit@amd.com" , "ktraynor@redhat.com" , "xuemingl@nvidia.com" , "bluca@debian.org" CC: "stable@dpdk.org" Subject: RE: [PATCH 1/2] net/mana: enable 32 bit build for mana driver Thread-Topic: [PATCH 1/2] net/mana: enable 32 bit build for mana driver Thread-Index: AQHZ7GaWaCwoVWECvkG39yON+HvEybAlwlJg Date: Thu, 21 Sep 2023 20:53:00 +0000 Message-ID: References: <20230921083442.2104530-1-weh@microsoft.com> <20230921083442.2104530-2-weh@microsoft.com> In-Reply-To: <20230921083442.2104530-2-weh@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=e9fb5198-bd6a-4cd2-b5aa-1a53375af539; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2023-09-21T20:52:40Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR21MB3264:EE_|BL0PR2101MB1314:EE_ x-ms-office365-filtering-correlation-id: e6c896f0-3b2f-4820-e361-08dbbae4bdf8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CPwLcWj6FeYDphSsUjb/3wfZ1md67xeUIhdJNGWYYf8MEnXd7abc63h9BsaGvmSm/kTf6A6MTPFMMsKXgKd4lk9DPhCf/b/WFKs6b4b1vgBbrIC8V8qgAGNk3OwmrG/qNOh5LExS8YVKnKCZpb95SAsaWPADNFCVq65n+khESIuK9vFzr41vwxzm+HqL4rF2/yoDRFJVxTkbY1I/JI27OtdFkoNi0+MDwKj8oik+qeCnNYD0vvyES5o8GSqsF6zGnpogSwGVJQqAd2jaNSlp39UMCTqdWUaGmEnQ9uM/Kv3kQy3lQT2ebM+B8DDOYKRKGSnSJ3/ll4zop/N7TvUFJppLFUaBxo5+U1iFd8ZRgt2dxReOD1WtloR2UL0WLg25ten4kHwDtTEXnh659YiVBFQbTmcRuosNTI9CeEUPubRhzhBW9DxLQN31ypNqQ1oF6DePhu0IGgaM2Q+JEHaqgQwQVUo85H+9n10RngPMxS1qqINZ/GLVc4zG6Vi6d//pxCvb9AeaQcIzvJzqA+qMIF6cAAdOSb9YZkv/dhOp/Hr3dkt+mrUK1UnKcp+ku8pL/2eHFWH2Y0xBKOYtbjCv0l6NJqTCFsmIWs6g1mqNRVAKKYuj6nc0cm61iSPNfkS9SHRRszwTbSbLX+xX+e6sjEV1+/yEz/fXeJ/pxXecDkQ= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN0PR21MB3264.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(366004)(396003)(346002)(39860400002)(376002)(451199024)(1800799009)(186009)(52536014)(110136005)(8676002)(8936002)(4326008)(5660300002)(41300700001)(7696005)(316002)(9686003)(83380400001)(55016003)(66476007)(66556008)(76116006)(66946007)(66446008)(64756008)(38100700002)(82950400001)(122000001)(71200400001)(38070700005)(26005)(6506007)(86362001)(82960400001)(8990500004)(33656002)(10290500003)(478600001)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?eBYhRR9NPSuHljIOfPAMQ8AMguncG8l8Q6VwAnqzpjaxvLv/oikgkvede6HX?= =?us-ascii?Q?hQiybcnDrrzdxzHzPGyABFcfVrpo5qTFwqJWVshY9M3Fh7HhkxCJXbdx8KUl?= =?us-ascii?Q?dH7cu5MXz6dzuNvCpndP2OX2sb2MFWinsvKNPnAyVlL6S1cbat67D4tUNkYC?= =?us-ascii?Q?vragRbuvOM/BiYoX84W2va7ypj++5rO3JnALRvkHTZ3/7f8O5pml8zLayrBW?= =?us-ascii?Q?rIqzTndHUMSYBKv0E7b0675R9IZBSpFaq4VCUkywT7XQsft9HUxjCDVc3vep?= =?us-ascii?Q?rt2pE3i0xJtpP3SSUI+Atp9Yh6giZ0M32+92hJb6Rj+P6+4ROP8IRwD8SaZm?= =?us-ascii?Q?FOcJ5mh4UtybA4f5eSqywyPx/BTMeUvVIsBYdnK+0Lxp+Ye8ZaH5a412+nYB?= =?us-ascii?Q?bwdPnvqddWpPLa5rFnNdD6stNdjA6pxD8GWIPUG7cGB2YrNokHUMSjsI6MSJ?= =?us-ascii?Q?WV0uFcjZhWm9kAVROiCoCIZJBqLFokGexHinh29wUM3BB7tyijn8/95/yKC/?= =?us-ascii?Q?xAbIrcrpbqDmKtFiLcfnLTouMJi5BZIygvsvHRQWZRK2YVokMSHclepCrVrw?= =?us-ascii?Q?0u6hy3k/0wrEaxzWi/i546Hxnef/5CigmlU/7DsZfvQdzXVS3PAMiEZT+/eu?= =?us-ascii?Q?MMew+00TduRNH5X+Xvl9lVPeWsFytwoxjfjEHEjJDrcy73OI8MZUJC5PE5Jk?= =?us-ascii?Q?nF/dhOjB8N/HWpQJggIOQY66KzBFmaAKYYI6/nixtghzFwTygcNo51H1u/e6?= =?us-ascii?Q?/CvcSb3gJfVFFw1CHfWJjZqRrdm/skSsCOQeMmk/+WUIxKTtSh2yezY68G85?= =?us-ascii?Q?RMfiXuhKYITRvWcTkf/uKeThJi3yAqSmkagiksXA/hwRpbBEefRmj2M/glHQ?= =?us-ascii?Q?cIdy3//Jf599G3kKn31MrMdfJTJU/dxAwArubsPkPa7FrtauvfojAH8bG0hr?= =?us-ascii?Q?8DVeWcipC7HtY82efevHfL7UgdfHxkVY6UynaWgeYe91W5o9a8Bt2mCeC8pu?= =?us-ascii?Q?oi982NIhHO6ZsqtjGwSJV30wmeFEWN7Hymru6/uiU0o5sqjrwaSF3OUC+A6s?= =?us-ascii?Q?y0kpSge2wAiQoaJM1cyHr8d2AqgMIBKm059geUG3atXhQOll2RrLvjk5niSP?= =?us-ascii?Q?4N2kxRZi0LNHYlK4eorffyv04hN+NmINW1/dz/c7ACfTfhHl6ajT8zfIJjRC?= =?us-ascii?Q?Kl/amTW/W+sUJ24rMegg9mxVWSf9D/o2w6/GQm8BbKE8/F5z621+lXjZEDru?= =?us-ascii?Q?qW+09GjxO01fsCswJltllOCPuqo6kPB07eAHwg8UzyFVTzbeL5vCm4B+dOOl?= =?us-ascii?Q?LXMndpv2+6inlRVca5/osXNIzX7uvvO1miHYft3U36LLiCa3rZqvj793p6x5?= =?us-ascii?Q?5hmIQFRTQSwtpOZT9bzZsmbOkkYOS0fQdJqLv+ehG/ikdRaAhpxs90GKvL0G?= =?us-ascii?Q?eQGtQ4bc4/vti7AqYH942G9Hnh1XFrNBfOJNeLeycE2e4Wb+mWbWP3ZYgxfY?= =?us-ascii?Q?wO37NJP8K8G/rL9i1nMqgywbCCWibbi7A5l9FqdqMHvHdfHIWQfdNcDHhxb9?= =?us-ascii?Q?3d0HEK4NgPye1k9RnB5UV1wuqqvCnNKkAaQ7AuPo?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR21MB3264.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6c896f0-3b2f-4820-e361-08dbbae4bdf8 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2023 20:53:00.5323 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2V02R61C2jzMrHQVQkw9TCGB23pXfwMMR3wyD1LczZm3wGOt4tzl3K7wgMPMGS4WSA+EeqMvXr6BcA8yb8iz7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB1314 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 > Subject: [PATCH 1/2] net/mana: enable 32 bit build for mana driver >=20 > Enable 32 bit build on x86 Linux. Fixed build warnings and errors when bu= ilding in > 32 bit. >=20 > With this patch, mana will be able to build into 32 bit. However, another= patch for > mana short doorbell support is needed to make mana fully functional for 3= 2 bit > applicatons. >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: Wei Hu Acked-by: Long Li > --- > drivers/net/mana/mana.c | 2 +- > drivers/net/mana/meson.build | 4 ++-- > drivers/net/mana/mr.c | 18 +++++++++--------- > 3 files changed, 12 insertions(+), 12 deletions(-) >=20 > diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index > 7630118d4f..896b53ed35 100644 > --- a/drivers/net/mana/mana.c > +++ b/drivers/net/mana/mana.c > @@ -1260,7 +1260,7 @@ mana_probe_port(struct ibv_device *ibdev, struct > ibv_device_attr_ex *dev_attr, > /* Create a parent domain with the port number */ > attr.pd =3D priv->ib_pd; > attr.comp_mask =3D IBV_PARENT_DOMAIN_INIT_ATTR_PD_CONTEXT; > - attr.pd_context =3D (void *)(uint64_t)port; > + attr.pd_context =3D (void *)(uintptr_t)port; > priv->ib_parent_pd =3D ibv_alloc_parent_domain(ctx, &attr); > if (!priv->ib_parent_pd) { > DRV_LOG(ERR, "ibv_alloc_parent_domain failed port %d", port); > diff --git a/drivers/net/mana/meson.build b/drivers/net/mana/meson.build = index > 493f0d26d4..2d72eca5a8 100644 > --- a/drivers/net/mana/meson.build > +++ b/drivers/net/mana/meson.build > @@ -1,9 +1,9 @@ > # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2022 Microsoft > Corporation >=20 > -if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64') > +if not is_linux or not dpdk_conf.has('RTE_ARCH_X86') > build =3D false > - reason =3D 'only supported on x86_64 Linux' > + reason =3D 'only supported on x86 Linux' > subdir_done() > endif >=20 > diff --git a/drivers/net/mana/mr.c b/drivers/net/mana/mr.c index > fec0dc961c..b8e6ea0bbf 100644 > --- a/drivers/net/mana/mr.c > +++ b/drivers/net/mana/mr.c > @@ -53,7 +53,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, > struct mana_priv *priv, > } >=20 > DP_LOG(DEBUG, > - "registering memory chunk start 0x%" PRIx64 " len %u", > + "registering memory chunk start 0x%" PRIxPTR " len %u", > ranges[i].start, ranges[i].len); >=20 > if (rte_eal_process_type() =3D=3D RTE_PROC_SECONDARY) { @@ - > 62,7 +62,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct > mana_priv *priv, > ranges[i].len); > if (ret) { > DP_LOG(ERR, > - "MR failed start 0x%" PRIx64 " len %u", > + "MR failed start 0x%" PRIxPTR " len %u", > ranges[i].start, ranges[i].len); > return ret; > } > @@ -72,7 +72,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, > struct mana_priv *priv, > ibv_mr =3D ibv_reg_mr(priv->ib_pd, (void *)ranges[i].start, > ranges[i].len, IBV_ACCESS_LOCAL_WRITE); > if (ibv_mr) { > - DP_LOG(DEBUG, "MR lkey %u addr %p len %" PRIu64, > + DP_LOG(DEBUG, "MR lkey %u addr %p len %zu", > ibv_mr->lkey, ibv_mr->addr, ibv_mr->length); >=20 > mr =3D rte_calloc("MANA MR", 1, sizeof(*mr), 0); @@ - > 99,7 +99,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct > mana_priv *priv, > return ret; > } > } else { > - DP_LOG(ERR, "MR failed at 0x%" PRIx64 " len %u", > + DP_LOG(ERR, "MR failed at 0x%" PRIxPTR " len %u", > ranges[i].start, ranges[i].len); > return -errno; > } > @@ -141,7 +141,7 @@ mana_find_pmd_mr(struct mana_mr_btree > *local_mr_btree, struct mana_priv *priv, > mr =3D mana_mr_btree_lookup(local_mr_btree, &idx, > (uintptr_t)mbuf->buf_addr, mbuf->buf_len); > if (mr) { > - DP_LOG(DEBUG, "Local mr lkey %u addr 0x%" PRIx64 " len %" > PRIu64, > + DP_LOG(DEBUG, "Local mr lkey %u addr 0x%" PRIxPTR " > len %zu", > mr->lkey, mr->addr, mr->len); > return mr; > } > @@ -162,7 +162,7 @@ mana_find_pmd_mr(struct mana_mr_btree > *local_mr_btree, struct mana_priv *priv, > } >=20 > DP_LOG(DEBUG, > - "Added local MR key %u addr 0x%" PRIx64 " len %" PRIu64, > + "Added local MR key %u addr 0x%" PRIxPTR " len %zu", > mr->lkey, mr->addr, mr->len); > return mr; > } > @@ -266,7 +266,7 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, > uint16_t *idx, > return &table[base]; >=20 > DP_LOG(DEBUG, > - "addr 0x%" PRIx64 " len %zu idx %u sum 0x%" PRIx64 " not found", > + "addr 0x%" PRIxPTR " len %zu idx %u sum 0x%" PRIxPTR " not > +found", > addr, len, *idx, addr + len); >=20 > return NULL; > @@ -316,7 +316,7 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, > struct mana_mr_cache *entry) > uint16_t shift; >=20 > if (mana_mr_btree_lookup(bt, &idx, entry->addr, entry->len)) { > - DP_LOG(DEBUG, "Addr 0x%" PRIx64 " len %zu exists in btree", > + DP_LOG(DEBUG, "Addr 0x%" PRIxPTR " len %zu exists in btree", > entry->addr, entry->len); > return 0; > } > @@ -340,7 +340,7 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, > struct mana_mr_cache *entry) > bt->len++; >=20 > DP_LOG(DEBUG, > - "Inserted MR b-tree table %p idx %d addr 0x%" PRIx64 " len %zu", > + "Inserted MR b-tree table %p idx %d addr 0x%" PRIxPTR " len > +%zu", > table, idx, entry->addr, entry->len); >=20 > return 0; > -- > 2.34.1