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 A861042607 for ; Thu, 21 Sep 2023 10:35:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9660140A7A; Thu, 21 Sep 2023 10:35:37 +0200 (CEST) Received: from BN3PR00CU001.outbound.protection.outlook.com (mail-eastus2azon11020016.outbound.protection.outlook.com [52.101.56.16]) by mails.dpdk.org (Postfix) with ESMTP id 7EEF14014F; Thu, 21 Sep 2023 10:35:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ALsRcLjxSmQmhZnwzNyuaJ5hl91UFkKWvkWdAmzLHkBfJRZetC1FvG9ZSNVn85IQ0Lj2d+otN5sTw5RuThUPhD1qvFc9NEQRQ12xRp6EaU7YsV8CZZ/NkJxkSk/J5F29YtQBqvi216z6l/nJGfgRIOX0t7t+8IEgfFyzYT03NM8L8SEInEfOS+8uuPRbHVBXjgN2x0i9oyNEe7+87DeDdRGdNoOOcJLBX09n/LNcK+2ghKlb2IcpJe8uNr8w1AQovpEkyKfMolbufDr7HGSuzAg9M9uUguiUtktPBm5Cd61D4lxctIPbAIDvnvyYflQ1n9FmzO/wJ0KdF4VMhSWaFw== 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=7SUbOK+U9W7fEH5UmIfFvY8OKNtiQLwnBEMAETcVVDQ=; b=XcyewNkm/Q0agLVWNnue93Q8Z80BHRsC89Dl07nKm1eGi2k1pJql0qIlODbXT5OWEyl0Rn2zLrcRHVqirerMOR8xa4ngcrcIgRqn9BB+qyoE76CxwgifuzNXrtxNKN5f5kUXQF/GH8Zda8vx77Ld+mOlpAaleHeJYLAETTxifaa7DTNyCVGGQ2XkJouB3oQNbD8cjLPREPNzRnsScrKu56u1vouiRRLzOr5qPIB3QZcYQTM39RjffcfH0ktKsJ1GxUsIIKEtPfKOyc+mZyEOmPY8qldBkkGBpC9M+83dV34XZCUdWAt99xH9ko+MAoYubJnSltv6MKLF3nPzM8M8tg== 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=7SUbOK+U9W7fEH5UmIfFvY8OKNtiQLwnBEMAETcVVDQ=; b=PvnpBRerTrW+6xxYD8g50KqD1Ow2w+J7WZxwVuUZis4M9kbdVlP9UP7fZ2MuZaxMUMGiPWkzKgk2/IDaQ+XmPmVdQA26Q7kwofGiTtjLw83SBipGCS/Ydo1Ovn6uOxBGn7bUsS+A5MDIW46NlXhSfoHHLsrmztgtWxyiA+ZEIVU= 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 LV2PR21MB3086.namprd21.prod.outlook.com (2603:10b6:408:17c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.4; Thu, 21 Sep 2023 08:35:32 +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.6838.010; Thu, 21 Sep 2023 08:35:32 +0000 From: Wei Hu To: dev@dpdk.org, ferruh.yigit@amd.com, ktraynor@redhat.com, xuemingl@nvidia.com, bluca@debian.org, Long Li Cc: Wei Hu , stable@dpdk.org Subject: [PATCH 1/2] net/mana: enable 32 bit build for mana driver Date: Thu, 21 Sep 2023 08:34:41 +0000 Message-Id: <20230921083442.2104530-2-weh@microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230921083442.2104530-1-weh@microsoft.com> References: <20230921083442.2104530-1-weh@microsoft.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: PH0P220CA0020.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:d3::34) 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_|LV2PR21MB3086:EE_ X-MS-Office365-Filtering-Correlation-Id: aed9b59a-4df6-4d8b-1cd7-08dbba7db7cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p65Y2EefYYNx1Qh3CneCPFCbcrY/SYbRy8p1KNRRIZS0nf4PPdXeaLvpyQU/iXLVj8js0BIGy4f3UBqv5DisgM9HdULX+7T562SQFAMbvLZ5wAB++IiQEv8NerI7V57eBccOVIxjLsaUFS/nD/FadcM1HoOVILGGvNK7OwfHMWzNM866CTGdrOQ9X4t2MVV6XH/xZ9r+2dGStlwrMFa3P4BNfghcuY/xB27N9aRAj3BAUT5PQXgNqF2ZKAuU4EroZgtzgJUWbZEfN3N5nXpQfzy/HqmyiuZ/kjNz3GwKZqDMWqvlPfOh98ngHs0OVokfkVb07DtEJWJ7j70pRiST1KH+G8I75aCXbB8PiCQ7K3J4Yb3Hz/RvVNJjqRqMf8Olu/EXam14MIedWwHOSiTXblE66xReWi6U0vJCs84QzLbVAHeAzXypff297ZGU7n/B34vviUa3e9XttR5HLJXmrbbo8ESGjUlV4EagpBiNYl3L1V0p/gSEHx0eEezE2nUo1qfl29SRtSXZ56Q7jqMYPBfUGPv3QJjD+6ES0Zm1Ez53oB9mgrYj7MpbyrsqjMFvckW1Xd+sCcmc7bMrcn6Z6fmKAMwNVIMb6HvkBaiBusltq76lNPnEj6EXlO4ZHzvMwJQAUXrV0Br6DE5sXvUQvGua+VGX7Y2XuiuvMZUmWOA= 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)(136003)(396003)(366004)(39860400002)(376002)(346002)(186009)(451199024)(1800799009)(36756003)(86362001)(8676002)(26005)(66946007)(82950400001)(37006003)(38350700002)(478600001)(82960400001)(10290500003)(38100700002)(8936002)(41300700001)(6636002)(316002)(6506007)(2616005)(6512007)(52116002)(6666004)(66556008)(1076003)(4326008)(66476007)(2906002)(6862004)(6486002)(83380400001)(5660300002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?gu5qFiPfmmv1+bSac7vPDf+rX8UsszTho3ED4bmjBL0LE25xSqoDh8lv/ISv?= =?us-ascii?Q?H+CziXyeWqbI7JrGudf2Z9GIDU2LGvpjFZmfAcQIOj2kOBZUWteCkWXbUbHL?= =?us-ascii?Q?c+PLYc8A6WxsWBmg+m9P/hAaGNsxZw7YsI30zPBoi8YWZ6qs8J1FgLZZP1jp?= =?us-ascii?Q?ICAd3KhM911gSac+P9ItwkFAQ8HI3vea2tmd2PkEPclbCMFrRtn/2Otj/076?= =?us-ascii?Q?v7PugibO5a/yjJHNl3frfaEY8t6ZFIVFdlCxcm1miMJwK2TRglVTy7+6G5f0?= =?us-ascii?Q?ZWOzT1kJTNkcjZaNj9LXbsnDEYYgfnlWXCn9xAjqOFZ+SQE7M2faKYMs1R3F?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drpEIzOF5HqZ/6EZvm3d70sSwqa?= =?us-ascii?Q?z5qytXJ/s6mq4N+fKcHDfFAFRcgiQSYdaRRWc7rbQ+0GbmGMlgBJ43qgvEJA?= =?us-ascii?Q?AvLK/PIt1+zqw309qJVji8gvdSJLP1RxHXgKMBufjOkUGQAgsnAAXxIyp30q?= =?us-ascii?Q?sdhp51qjlAvj8mR6vtnyuU85npOXfjTFfezmxzgISk4EYQnE3+Wfu4kvYZP0?= =?us-ascii?Q?FUEcygosbuQdYG8k5km3uE+c5s9vp5l+qUVrw8Ogjof8KB7zYgZ8ucoKm1pb?= =?us-ascii?Q?ut52nG3ACx7+c+2f6oaIHYu+vtPDy/v0hsnk3rHmxtUG+tio7ux1himkDlrS?= =?us-ascii?Q?BZRSlSL0We2DMot9FBdU7c/Pibr//Kx4eWlULroq?= X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: aed9b59a-4df6-4d8b-1cd7-08dbba7db7cd X-MS-Exchange-CrossTenant-AuthSource: MN2PR21MB1454.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2023 08:35:32.1697 (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: pxCdOFzqAC0+utHsJ72xoK1QJ1Zws4dTVo+cJv77bVOApfNJ7FqtXTZW6BjYjblgpiSrgcuUoCCjTcT1/39KiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR21MB3086 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. 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 32 bit applicatons. 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..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