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 E01B842589 for ; Wed, 13 Sep 2023 14:24:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3AFC40689; Wed, 13 Sep 2023 14:24:43 +0200 (CEST) Received: from BN3PR00CU001.outbound.protection.outlook.com (mail-eastus2azon11020015.outbound.protection.outlook.com [52.101.56.15]) by mails.dpdk.org (Postfix) with ESMTP id CBAA040293; Wed, 13 Sep 2023 14:24:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PZyZmOvgf87v9I1a74FaEoSx62WT7A4tY59g74o2Kcy/9ewGqQBwfW55hKq0LuuZD2Kt1YNxf5cZmMS14/hXYuAnLD4DxwtVMuWWSP2im65r/UhvDLldEyikRShzZvqorEPFwM5oQ9c5hnC03aPsTjQ4eMH0sK4FzC5OVEkGs9JV6EKjE+TuPAm55yxS/fSh7xNGbhJ7ITeQBIJCNg4Gj7u5U0UUicW2R1KGI9oVyXWJlK8uG59CvzTN9J2lm0OsF+B4lSaFrU65HI7YkSd0IolQW8fZCkasmN2OpA+9Z2jclR2JFXZQHvFAtaYmBUfeWU67Lkmnfv62fZ/RNGJ7EA== 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=qG+AA7PUuUttRee74CmrHmGZXqwhb9Aaau6TxbXFVDw=; b=exvNzkBi10dZt+bEY8E/Y6yvuE73fA+mWt5mVS7QEuptwBnlQpCki6xaO5T33AiAqrjDHbh9vFTYC2Fq8KCXeBe+uLmWQNSE67jNAtmqBqNkQWJ9GfyESevgazBE2oKXd57uxg+lxJsY1PMdmEynjtmGEe3igDEnQnYt4xE4jM/k6bKcAigw/syqDtQJ75T6r/3vqmif4Ph02WyytlgJLkBoHWrryJyxXVIdTplNVbunFQaXEq2eV0LcnsFKH/i4I7l1fHQanPnIfbf3FYa/i+xyYIppB7yaQ28fYweoPZjC0U3TPnQ+F//sy6/IlWEtcCycV23cD1TjRTdRlU8yZQ== 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=qG+AA7PUuUttRee74CmrHmGZXqwhb9Aaau6TxbXFVDw=; b=gtd9jEl7bppv1RGupwUNpfSXfL9pXqzKI+BuDJJ8pBXOckm2OH2ROHtSe/fIxcF5GFkvExFKwmmaQFtkoR+1/3ms3Yd1QPMp1j5PK6PnKSk2yIEEaHNEE+iIA2Hba8uZUq8hTqaW0WP95xUD2gRaT3P2ctptlN/vKniN1GJcUww= 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 DS7PR21MB3054.namprd21.prod.outlook.com (2603:10b6:8:72::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.6; Wed, 13 Sep 2023 12:24:39 +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.6813.006; Wed, 13 Sep 2023 12:24:39 +0000 From: Wei Hu To: dev@dpdk.org, Long Li Cc: Wei Hu , stable@dpdk.org Subject: [PATCH v2 1/1] net/mana: enable 32 bit build for mana driver Date: Wed, 13 Sep 2023 12:23:38 +0000 Message-Id: <20230913122338.2068475-1-weh@microsoft.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: PH7PR17CA0069.namprd17.prod.outlook.com (2603:10b6:510:325::29) 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_|DS7PR21MB3054:EE_ X-MS-Office365-Filtering-Correlation-Id: 9df925b4-506e-4794-0147-08dbb4546620 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ewLeKo7JAk4bp29s3Ho/0DA8O0BOOU57cuDZtPKDMWffK5AoDMhTA3BaT28hKa4tjT1sCDJQJPxoGuNfaL5//yNirtd0CFoF4uPHWRKKyG8rz2HVb/DgUe0LMZi1tCpPPI2n1LzNFtfLNcijjMJqBMIANZlYsBUrhdTaAESfIUzRYyRwwpQIoFFMMMrDU9QFPSgQkUjiL5iLok+3xfkPU5sBT1SQuKgAcoBA0M0FEwQ1BlT00fUrGfPLBMbco/grw+KsWkVZAQsLzVlmhlmGivgYLYXglW32PfFnUXRHfockyQJ9zu7qs+RenXDEqENdsZHGo+ot3wHuXQ0104oKx+Wmv3u+u/v8umbPiQPJD+G8T70CwL5WODgywc5iWrl8ZFKDKXWo/i1eYch99SXOA0nxkvtCM2Z5z+sUAjDpO38y2izBPP3csRknvYJDAqO/ZnUMhSyXJFUBLQzWzMpgv7vNBntoCVIG5B77QhIlD8xc/v/tLmtIukNWwcVRrgpYDBQl6dO477z3nB0NguGNg/53iH4GvIAbqyvGf3BKM60L2fdCeZRrg/4Qh4mbwDtKwKZAtvfI4nAWnJC614kDy7zpJxcKYwadCwCt59LThpNmuhBtO1a/xpSf0QY1+r1BHPSR9FywOwFvZr7Dv1DO58chJ6PbO4bPxvavwGsiVm8= 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)(136003)(346002)(366004)(376002)(186009)(1800799009)(451199024)(52116002)(6486002)(6506007)(6512007)(478600001)(83380400001)(10290500003)(26005)(1076003)(2616005)(2906002)(37006003)(66476007)(66556008)(66946007)(316002)(6636002)(4326008)(6862004)(5660300002)(8936002)(41300700001)(8676002)(450100002)(86362001)(36756003)(38100700002)(82950400001)(82960400001)(38350700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?yzT/v4W3BVDj8PqRdNEXXrItyMOg3Idc6Yd9bdrss+ZfcXeMRkN85cSlQAD+?= =?us-ascii?Q?euWJcCxiE6qriOqxCQZ8eohvR3Hs7xihac/Dr/doUsD9UWHqVfxSJv0BTeO+?= =?us-ascii?Q?MQSkdGPWnsupljgAi08vSu613p2CqOQ5S3qkOiflpdmXiCGhQUPGJ5SSB9Pk?= =?us-ascii?Q?eCP84ry6/GkqGKAVGFyf2UJIe6wy5swXRXgt/RtqXl0oJtGq7fltpO9RequO?= =?us-ascii?Q?jfb0p8B7i0VOSdUDUGEE4jVydk5d/SVu29/y0mtR4v0kGS8FDPBBE/Y4xBYi?= =?us-ascii?Q?6oNi8L5MJX1MAm5fNK8nHQ8kwnwTW+b6zwyBO5bZmzaGvnx4pQGpj+JnXKy1?= =?us-ascii?Q?4+OGtQiD93KC40J3VED9YA9sum+C3lqe2/LLXldd8zyQXByleLw2tlHEWgxK?= =?us-ascii?Q?+8BU9XrOY/hMsEUqLarUivShV+XeP2YZJiX2z8vfNhBlIAKHWzUchpFPZf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WpB17nB2k3xeprCOn0oY?= =?us-ascii?Q?/MKU7UYWDTcKpV7OVaUyE0S5XKmSH+e1ujs3KpONas+RUEPnazdUsU5aAZ4R?= =?us-ascii?Q?8QscmWeIYuwzQtDy2HyLLNiu9nbO4Af3fF9XzOpndUC9rH4Q1J4XrlqH5v1T?= =?us-ascii?Q?+qUeHktCbMxRKNCSoUe+hSGCMzPp+L4Lr3lWw171NbSlHzs8W0w2DnE97s2f?= =?us-ascii?Q?YqyrTXRMr92ic9k4a5k6nEIltK700RGIZXyRb0Su?= X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9df925b4-506e-4794-0147-08dbb4546620 X-MS-Exchange-CrossTenant-AuthSource: MN2PR21MB1454.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2023 12:24:38.9341 (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: Zl2FyVWdkwFpqaRAtyQ8LGm0AuH30Z/yc4818JsYCgB+JKnApe0CYBrN4Bnpd00BW1PsBrzapVIpLic/+Ylg7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR21MB3054 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 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 --- v2: change port casting from size_t to uintptr_t. --- 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..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 = priv->ib_pd; attr.comp_mask = IBV_PARENT_DOMAIN_INIT_ATTR_PD_CONTEXT; - attr.pd_context = (void *)(uint64_t)port; + attr.pd_context = (void *)(uintptr_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