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 52EE1A0548; Thu, 4 Nov 2021 13:35:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C4C24272E; Thu, 4 Nov 2021 13:34:47 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2057.outbound.protection.outlook.com [40.107.244.57]) by mails.dpdk.org (Postfix) with ESMTP id A622F411A4; Thu, 4 Nov 2021 13:34:45 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fejtZTUn1vVb2s5JBCi07NP80WkQAIqejsKuQDOVCZ6dF6jBEjzmw6pa+93JKQl2a56SNerGix+4EKqcPh+lTtJmM1B3bHmfaGBV03gm4efjDSILzw3XIOQDm+0Ik3tgGCJyGKwqi1w0UdwCHcvcQRCBmP92iYW6r0nQ70kZPCUi5mJ5OnQf4ODkWhtmFZEEzolt4I0U9/NIh7d9syefp0g/7YfbohkPs4JhyPVdOZ38mEKprMrpdhhWReUgFMXNcXdTebge0GyQKAkurpHO0TEsGMCZTsWL0TTncmGuyeP8JNDTQEE1+/2nwIIZdFou11BwGZGwmM68k7y/Kb/QzA== 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=D1HXByl8S32k1PvomDLT39P79y96a+lmXjb3D1Dx6Fo=; b=EhnziJ2iLp5CDV7r00iVmYn7OLlrXoIe4UdA0begsTldhtmnu2cvQxqOPJ0rZCKCulECK2eBsTiVGSd6xc+V2WR155IKO3liZIjHyYN4tMMTw089Wqf+ved5+WZd9GQWXlbQO+7vOIqcS9m0SrKwzHmjUseKiQwvpVDFKehy/EKymDoE/ZFbeCOfb78LhPfGJ4qUawyLYFcJ2kkupY5CZu9anZ4EQQLcMCZSGrvNMcexp/1b0NRLhT38AF2OtzgOSO8fMtLkySVrchwhQkXt+5Wnt+Ag+2n9nZScimMQxEaSEdtZIjqUiqHEKrx6bMrzvKDPIGW4BT2QVdtqiHXIjA== 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=quarantine sp=quarantine 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=D1HXByl8S32k1PvomDLT39P79y96a+lmXjb3D1Dx6Fo=; b=f2payI0jzM8i/Mcr/cshN/pryvRbZ81xh0eCHnc1Msf7Vk4DtXXFyqiASUPLOi7K4iO9x7kLTKGSX8WiS3UXYk14HaSMj3wf+uRkXlvyMjkzHwKzP8Sfw+nABnDX3rI14YKGhEyWP9y6mEKxznMREoLQrEcSe2LgvpO+WCg66eQeCURrEATFKa0EXuZyPCuh7u1Z+3sfm0/uTRDaRj+5LgzVo2FBUBjIRpCy1t5pDNbDYcZtwch9R2OdSGk8Hb4K2Vx/W9pfGfyfR+yL3+j7b5FjYScQFjAqIQXnkNDx85KFmOlva1lq+Y8S0qGJR07D1kzepZc/y0E5PSIh9paODQ== Received: from BN0PR04CA0017.namprd04.prod.outlook.com (2603:10b6:408:ee::22) by DM6PR12MB4282.namprd12.prod.outlook.com (2603:10b6:5:223::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Thu, 4 Nov 2021 12:34:42 +0000 Received: from BN8NAM11FT058.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ee:cafe::f2) by BN0PR04CA0017.outlook.office365.com (2603:10b6:408:ee::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.17 via Frontend Transport; Thu, 4 Nov 2021 12:34:42 +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 BN8NAM11FT058.mail.protection.outlook.com (10.13.177.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Thu, 4 Nov 2021 12:34:41 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 4 Nov 2021 12:34:16 +0000 From: Xueming Li To: CC: , Lior Margalit , , , Slava Ovsiienko , Matan Azrad Date: Thu, 4 Nov 2021 20:33:11 +0800 Message-ID: <20211104123320.1638915-6-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211104123320.1638915-1-xuemingl@nvidia.com> References: <20210727034204.20649-1-xuemingl@nvidia.com> <20211104123320.1638915-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2d370ef1-ec10-45cc-d6bb-08d99f8f7989 X-MS-TrafficTypeDiagnostic: DM6PR12MB4282: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OagnPHKDl1Be/Le1lvlJgY8C8yHPTpwkERVCgEvT3av7qb8GQp5GvDbQJjtgQkz99ftDOZ2B2yv6r74yBsrH7AgnAeAGgQPQ3/OjG6ed/t7rX2xAYcu0WGz4LxexC4lKwIE3vg31fMs01g9AF3k1zYqF271PuLwBunvUem/wQy9JWa3iZx5DQSRLB3YqQQi4g8EsE6pntAb8tfZicq287It6SFY+W/8O9JFSJVvPe3gYiyeZarX/SIqWsQjV4Fp67F4ezm3KCUaLB+wiOusFlc8IeCiHN0ez+QpJNq4YlIW9W06DM/Acs2tVIkg13CgY/M/LLtFCDSnX8kBBjCgnDPsI7ACkHWBbtYw/xr7zBS6aJIn9IlO6kaMLcoeb8CMHcS7tb61Cd1sX0YlSvTCxPdKi58F2iBZpkoFaBvbNFLT00EYueiTZp4IdebBQ32w13BFKsEpSeCL20LbwFXcSweDYhVK9fPX3NptjlatDOxbTV7YwIEu2PWmfEktfj4RvqHfBFX1FQ4PkfGYNcjqfGhr4/6VCqfDXitSnVlq1S1JBWehBTAIaITuYZ8LuNq0E2UazR61zBLrHv+jLAXpS/d3FP9ZvV7c+8d/ffwIVPPalyjS1dPJbqsKK32YmzCdH0pU2vrnaRiq/5+AjnRbfzcDfG0OAPSLwxj9SZ1Ox9E6Sy1YhQFmTHOSKg66cuWlU3FDbWrLR4akHVubdBFgW1g== 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)(46966006)(36840700001)(8676002)(356005)(70586007)(508600001)(70206006)(6666004)(54906003)(6916009)(1076003)(450100002)(82310400003)(7696005)(4326008)(107886003)(86362001)(7636003)(55016002)(83380400001)(336012)(36860700001)(5660300002)(26005)(316002)(16526019)(426003)(8936002)(6286002)(47076005)(36756003)(2906002)(186003)(2616005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2021 12:34:41.6033 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d370ef1-ec10-45cc-d6bb-08d99f8f7989 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: BN8NAM11FT058.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4282 Subject: [dpdk-dev] [PATCH v4 05/14] net/mlx5: fix Rx queue memory allocation return value 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" If error happened during Rx queue mbuf allocation, boolean value returned. From description, return value should be error number. This patch returns negative error number. Fixes: 0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst") Cc: akozyrev@nvidia.com Cc: stable@dpdk.org Signed-off-by: Xueming Li Acked-by: Slava Ovsiienko --- drivers/net/mlx5/mlx5_rxq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 9220bb2c15c..4567b43c1b6 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -129,7 +129,7 @@ rxq_alloc_elts_mprq(struct mlx5_rxq_ctrl *rxq_ctrl) * Pointer to RX queue structure. * * @return - * 0 on success, errno value on failure. + * 0 on success, negative errno value on failure. */ static int rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl) @@ -220,7 +220,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl) * Pointer to RX queue structure. * * @return - * 0 on success, errno value on failure. + * 0 on success, negative errno value on failure. */ int rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl) @@ -233,7 +233,9 @@ rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl) */ if (mlx5_rxq_mprq_enabled(&rxq_ctrl->rxq)) ret = rxq_alloc_elts_mprq(rxq_ctrl); - return (ret || rxq_alloc_elts_sprq(rxq_ctrl)); + if (ret == 0) + ret = rxq_alloc_elts_sprq(rxq_ctrl); + return ret; } /** -- 2.33.0