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 0AF0AA0A0A; Tue, 1 Jun 2021 09:31:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A59C5410E3; Tue, 1 Jun 2021 09:12:39 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2055.outbound.protection.outlook.com [40.107.223.55]) by mails.dpdk.org (Postfix) with ESMTP id B668B410E2; Tue, 1 Jun 2021 09:12:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sug3B3qJcx/LdOKw4NDoEDZwAX6ps+18l0ICLaESCrMgDj0nrTfGRvRWHgSqKugn9fQIWJOWTWFhWLwVd4JRhhGpAHWfuXvQNME0x6ks1Du6TkKl0VOQPDjIjXPfvsCBB2EsyRJ+8LgP58lpW8RdqF7/y+En27pqIg39UtYfg1RvaDYWYnw5Y1rRU5UJ5fTGh4Dw4AF8vuQDO7LRX40p3EHwbL1ZORku9QstOrrWbgw+0B0Cye1FuFO56iAkRre+TcMGmE3jdxdN1ec+b2neHKpj2f29Ui2vRg71lL6c+QmX6ubLySG/WmLF7oU5jcGfMcIrroT8Wjl1AnInKyWkKg== 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=KfFTW+DXKwbiCV/lYSpnmsuXuSuNG/mDRfH3Y8LhLHk=; b=nuCg8vHGVeqdAqlVj6Y6vpxRpgcmyRP4r2eYonMLNRdSTAIx1P1er0tVgSadpDEF7QZGjLdZvTudgcdCHUjHRIgPCSehbes4mYJ6vC3Ebxp9D1+nhPMwQAwNubq4tEyA0Y8XEway0g7wDy351N0anNjjCpHmc9ktBARTHKLEpsXyM64m3VWcQPHHnD67Rvhf4TE1WxXOREgqrFFj0ahNcz/9K/ucoJ803s2W9hmhU7HVectIODHLthy/uzAkCB/AXEgXHMMJJGSDuN63bS1uB9mRekxgpduO5r0H30Rl/gi+RhSq/XtLPz59v7NcXMby5fgFreOA6eNOhZHKj3sU7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KfFTW+DXKwbiCV/lYSpnmsuXuSuNG/mDRfH3Y8LhLHk=; b=j9VlLH/XOjKFPa57MyOG8aCH92EBpEeugO4jeNicnEINP7ptL0mM/1YHmQUY0GRoJRt2L9we83wchQRqVm80hmHHt7tDpgg2o8alWQ611/fnjiQaj9okjONdu1UwTsMMKF1XCQcg0pEaHpnm5M+broA0JhXAJW8WEb+8PBhy3nQ/Nlzbfd1rfYOMIH95W47YTcvYHvXLT329v+X/1ioNMO9S7fr8xEvG8gloylYyQ96Du17OyWHa1XZ9aJW9us4EJdAnVlhmAVSngydPfU4A9ZUEDro0yOJqhQpDEHXX3PDr+u+rEkoarB3BLg2goMB4FgJxp+NrkH13HhXYBpEABg== Received: from BN9PR03CA0151.namprd03.prod.outlook.com (2603:10b6:408:f4::6) by MW2PR12MB2460.namprd12.prod.outlook.com (2603:10b6:907:9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.24; Tue, 1 Jun 2021 07:11:55 +0000 Received: from BN8NAM11FT008.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f4:cafe::48) by BN9PR03CA0151.outlook.office365.com (2603:10b6:408:f4::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.22 via Frontend Transport; Tue, 1 Jun 2021 07:11:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT008.mail.protection.outlook.com (10.13.177.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4150.30 via Frontend Transport; Tue, 1 Jun 2021 07:11:54 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 1 Jun 2021 07:11:52 +0000 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko , Date: Tue, 1 Jun 2021 10:11:22 +0300 Message-ID: <20210601071122.1612432-4-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210601071122.1612432-1-michaelba@nvidia.com> References: <20210601071122.1612432-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e88416b-686d-4c9e-3996-08d924cc899c X-MS-TrafficTypeDiagnostic: MW2PR12MB2460: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rmNshEij0XD4s+g950Rf7kXcF014JDD+vJanVlBzCqep+LKpokXkrov8Xl3xrADhqk1c8ReMPHQLQoKYJWQI+8QCZWI/Tpx3B5mWV71qWbh4enLfOOdQwjdxapbGhs6AxYxMo/pS85IJuK9zGGOy2U7h/KKpo8BivWjzlM/kPoOv5LHRmACUKZBlyLf+qfNOmg6Nt+D3B0XJsEyL+STBDhIQ2WMKiKntsH4HL7Gm2cRXOJBFG/ZjFOrP1uylZvZe771AcFD7bviIYnAclf1Ty/TI9IoAKCEQrpajYMOCneu1kqdi8t3hxW1Sq0S4gsoHA4OT1agctr7clAxW884bTRn9wChHiiwfTZRfNXRzjUgq6q9I4Q5m/KZAqg0BkH05bfs1PCzQK0VRvFtPbHJB3Bh/1hMNUQhS4RlHPtZTKe3ITLcOr862lNRiy08eGHPNy3lwoArVGMZ3AXTjQhSVDGIy5o/tpMic+bF+eppbuEEJrAuJi3v8+2ZF8sFY3EJa5VmsdIpT+mUsC/4XcaxsJOSkQw0wuK0R1LbSW2LUtfudWN5lL3mY2ek0gVm7QErZhIf//1FXVAu5OufHF2E/Vx4Dd0JKnaHyqn55MpS4cSom/zYRgR5RKgwRuLk9tgmEC+oEAiDfcpKA2rABWgFtNUnj7D8w2TWO2bRkvM4vGy0= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(39860400002)(376002)(346002)(396003)(136003)(36840700001)(46966006)(36756003)(6916009)(16526019)(186003)(450100002)(6286002)(7636003)(7696005)(82740400003)(2616005)(336012)(55016002)(316002)(47076005)(26005)(356005)(478600001)(4326008)(36906005)(70206006)(70586007)(36860700001)(8936002)(83380400001)(1076003)(6666004)(2906002)(426003)(5660300002)(86362001)(82310400003)(8676002)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2021 07:11:54.8552 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e88416b-686d-4c9e-3996-08d924cc899c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT008.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2460 Subject: [dpdk-dev] [PATCH 4/4] net/mlx5: fix constant type in MP allocation 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 Sender: "dev" The mlx5_mprq_alloc_mp function makes shifting to the numeric constant 1, for sending it as a parameter to rte_mempool_create function. The rte_mempool_create function expects to get void pointer (64 bits, uintptr_t) and instead gets a 32-bit variable, because the numeric constant size is a 32-bit. In case the shift is greater than 32 the variable will lose its value even though the function can get 64-bit argument. Change the size of the numeric constant 1 to 64-bit. Fixes: 3a22f3877c9d ("net/mlx5: replace external mbuf shared memory") Cc: stable@dpdk.org Signed-off-by: Michael Baum --- drivers/net/mlx5/mlx5_rxq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index bb9a908087..950f327f03 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1240,7 +1240,7 @@ mlx5_mprq_alloc_mp(struct rte_eth_dev *dev) snprintf(name, sizeof(name), "port-%u-mprq", dev->data->port_id); mp = rte_mempool_create(name, obj_num, obj_size, MLX5_MPRQ_MP_CACHE_SZ, 0, NULL, NULL, mlx5_mprq_buf_init, - (void *)(uintptr_t)(1 << strd_num_n), + (void *)(uintptr_t)RTE_BIT64(strd_num_n), dev->device->numa_node, 0); if (mp == NULL) { DRV_LOG(ERR, -- 2.25.1