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 C482442554; Sat, 9 Sep 2023 14:19:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B0A44029E; Sat, 9 Sep 2023 14:19:30 +0200 (CEST) Received: from DM6FTOPR00CU001.outbound.protection.outlook.com (mail-centralusazon11020021.outbound.protection.outlook.com [52.101.61.21]) by mails.dpdk.org (Postfix) with ESMTP id C2B1A40295; Sat, 9 Sep 2023 14:19:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MgvHs8yEFL7QvSM6th0nS8+xXEJUT2K1rCuYJ0eMJ0fYAmobPS96YE6SALZ4qWQgoweVd1/li8VIbrcQaBbtvsPPYTzFtrd2Oq1zv8QAvrWp5NC3Fy6OyksvHc1nkmMMFIMm1HQ+P1BjipDgHneOrUHQF6nUfKgTNCuOUUqNMAn+poDfP56jCeqSZoFK1Rt1AK/5LO23dNXWYIUlx+jbh6KbhavLFx4bo/07ZD5W+8csiWGYFBLWsoKfmM5UcRjpDAavuJIfycW3YIPIFlQNv/uHupVL0OiG4oZNFyehIHykdbTf/QpQrojewIPirIdwOQRUGuwwg5M01I5mfJQaLQ== 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=XhT+/FRwYIxmZp3xFxL2at17tt/nB6Pqa61rgVwPAuQ=; b=OZ7jr4OVJ9Xcd9bhaeS7QW5KHmwKMYl8Alxjtg3ZCOMW8D/NRa/bp2uTAJytFrtbzprGGYYFyWKTdfqroOFkptKr1KZJapq0SyaXGU8GmK1V64llLfRr6Re0l9U2H/b4V2J3nw3Jwbesm1FDK0KPX5ETx2y4S+ACFv8++9QW3D/gIie/ljCEqmMT0hZQupFIrhDmk+jmZfaWF53xfwGOqTNkM5FoXCUjCafp3aYxUcQsOOIyYPhrKJ9ZCABOX6g4xgWzoBVgGFgsMb3/s1aq7LyFkuRzpBfWZFXEQz6WuNrhSNhAueX9aLBVHaU4PijDOZRiBwZWpgEJeeBBhGlU/Q== 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=XhT+/FRwYIxmZp3xFxL2at17tt/nB6Pqa61rgVwPAuQ=; b=ZG99s9D8Q9SzDwxzwaYQOQ/YTDG8ebjSMoCt7YfyyPa2bXSfHvKK6r1OBpdxllArxiVZ+GZYlViQBMq6JBgQqidwlmtyrvevUuwwwY97CTyIh+1lz019d9LYTVYPaA1GbI3lSEB6IzonPRstuY3OMXs/u28BPv/USSDO27ssCf0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; Received: from MN2PR21MB1454.namprd21.prod.outlook.com (2603:10b6:208:208::11) by DM4PR21MB3731.namprd21.prod.outlook.com (2603:10b6:8:a0::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.10; Sat, 9 Sep 2023 12:19:26 +0000 Received: from MN2PR21MB1454.namprd21.prod.outlook.com ([fe80::cbd6:26c1:4d57:b9fc]) by MN2PR21MB1454.namprd21.prod.outlook.com ([fe80::cbd6:26c1:4d57:b9fc%5]) with mapi id 15.20.6792.009; Sat, 9 Sep 2023 12:19:25 +0000 From: Wei Hu To: dev@dpdk.org, Long Li Cc: stable@dpdk.org, Wei Hu Subject: [PATCH 1/1] net/mana: enable 32 bit build for mana driver Date: Sat, 9 Sep 2023 12:18:30 +0000 Message-Id: <20230909121830.2043779-1-weh@microsoft.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: PH0PR07CA0015.namprd07.prod.outlook.com (2603:10b6:510:5::20) To MN2PR21MB1454.namprd21.prod.outlook.com (2603:10b6:208:208::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR21MB1454:EE_|DM4PR21MB3731:EE_ X-MS-Office365-Filtering-Correlation-Id: b02f4bde-b424-4e49-7604-08dbb12f015e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sMWXxctmn7XSJ85qprVI3SB05Bppfe/E0ngyojCalhxVzyRp1MhQ5XEPn2g3tXD/6hPKY13lA+YLXXLsjmrgmqXtnBzCIunzJohqE/8ZQjbYEvJ4OzDgeKM+dCkVecmC1ApobHP6ibiEzl8eAHjqV2aBgZhkCSN+94hLmRR6PpAur4nd6uhvZ3LKinnpHOpPh2v38jpWpEoEJTjwmNMyGYbDZgaNi37A7kApiC3yohiWpxGSbWkC6ZJTDWRH5yU3iKrp9p2lDBZXACKKz95pfgd0xJgyfAQ/624kB2Ccgkd/D0u0i9qQKTV3NTRRc8gXwmVCX6khGeT5FjzcphBW64w4YHGicrGi6/Z8fWSQSzr6z9wS/7d5jHTWvF/1oqTC0xiEIiVRHYu8zNkOoHaXin4OQnofqM6BC7reG8VViuL1MhDBZhMpVn0WpKDtjw0HX5S/LXTWnDZ449jDXwEkfZUTnVPthZTDzvCOmsamJI1facz45RDPwJo9lUE1PlbBHs3VmVTEEyk9wsYGUGTIq00kqIXE6gBRqpL+XsZi6TRpbzFgU4McCNa737e+6NEloLcj4gV05uLoDYa+rjCIcCUVv82XoCh5/nQNfe6yNxJNsg5oIPiZIMKSpSiHsK2iFS4jtjKH47FJRPLtBVGXnQ8YCix4cxT82eTL7aonFew= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR21MB1454.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(396003)(376002)(346002)(136003)(366004)(1800799009)(451199024)(186009)(2906002)(38100700002)(38350700002)(36756003)(86362001)(82960400001)(82950400001)(41300700001)(8676002)(8936002)(6512007)(450100002)(2616005)(6486002)(66946007)(4326008)(52116002)(66556008)(66476007)(6636002)(37006003)(6506007)(107886003)(316002)(6862004)(478600001)(10290500003)(26005)(6666004)(5660300002)(1076003)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?rlBeLVu/+2nJlBHj/rLpSySmlNJ4aoTi/g69Pcm5LS8OjwCKengQ8CzamNEi?= =?us-ascii?Q?QFq4gWMbDlisp4YKfIQmPpS9icXK5eft9KqpyktI1a3TZ2H5hmjVyFmE67wC?= =?us-ascii?Q?1vU3Ubo6kxmnFpx/0fRxhaZzcP2YlJpbimHRFi8jf9725yXRn5H9pSyMiUMq?= =?us-ascii?Q?UAFs5I+74UOVFo9DGh0vU8BWDfvwuR4WKgc6LCcOSV4H8v7sXF0mkEgn7IqL?= =?us-ascii?Q?RFTKCP8wmjA/fo9SHL2yoEZyO98I1vBPRZ6NFEZPVup6Mbh8dHtObi+eEOb1?= =?us-ascii?Q?t7YKDbR0j6xt4k7CRI0UvBuRVYeiTujRk5HS/R3zKq58gtXFG8+m93mkUUIU?= =?us-ascii?Q?/xX+0kSOu4hMGJK1othWKI7nxuRzfnKx2oXaZ8cTeH3ho6eZqxcRiCFDPO4n?= =?us-ascii?Q?Uh2F1ZJpNX5rQo4skQSUOJSItQdF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q?WKpmIR5QX2fgSZwU2oSjTvpwN+DZXJnPeWyvUI/AOASWEmYWR/4bVVBKq9FC?= =?us-ascii?Q?lVxiWm5eREEr46HzMstt8WENfdp0wrqAVU5yZysATcZIr7JBJxsKF6wE/iuo?= =?us-ascii?Q?MQfa//rV0imPsJBIuOb5lI69aEs/59fKzzUmP6h6rFjgj7qLqK9Dr1zipL92?= =?us-ascii?Q?hzoT+Lx8MAzpnL2d8sdx0eipD855V73pWO4knOEqcDRFyZG1fFOxyzoMQ6N6?= =?us-ascii?Q?STUfrNDd+ZTWfVi2GMOjxsvFvU+95vfiXE5zzfFL?= X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: b02f4bde-b424-4e49-7604-08dbb12f015e X-MS-Exchange-CrossTenant-AuthSource: MN2PR21MB1454.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2023 12:19:25.3265 (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: mW+a7snKAzOgFm77Bv655QdqE/1JyESa7uoFYmu/1lCKIY83suYCZcT+3eufAFrxBxNzXW/iKBgHojjUxlKR/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR21MB3731 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Enable 32 bit build on x86 Linux. Fixed build warnings and errors when building in 32 bit. Cc: stable@dpdk.org Signed-off-by: Wei Hu --- 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(-) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 7630118d4f..a20ca1a988 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 = priv->ib_pd; attr.comp_mask = IBV_PARENT_DOMAIN_INIT_ATTR_PD_CONTEXT; - attr.pd_context = (void *)(uint64_t)port; + attr.pd_context = (void *)(size_t)port; priv->ib_parent_pd = 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 -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 = false - reason = 'only supported on x86_64 Linux' + reason = 'only supported on x86 Linux' subdir_done() endif 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, } 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); if (rte_eal_process_type() == 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 = 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); mr = 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 = 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, } 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]; 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); return NULL; @@ -316,7 +316,7 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry) uint16_t shift; 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++; 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); return 0; -- 2.34.1