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 3751D43251; Tue, 31 Oct 2023 11:52:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B239540DF8; Tue, 31 Oct 2023 11:52:09 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2081.outbound.protection.outlook.com [40.107.93.81]) by mails.dpdk.org (Postfix) with ESMTP id 99532406B6 for ; Tue, 31 Oct 2023 11:52:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I0Ny0jhq0F10ljkjL/JBAuS/9DhvNhnD6W0YSsf64l0KZaDDg8dt3dOKy0jmGumzw0+1om09FcYKaRSWkaeQBM+GIKPh2UsX1t3x4GhW5fp5D7beYAwQc5LC1ITlG0yDGuMd9u1a8a7uOB9vPsfCjQRNtAY65Cj2mw2OJYUzPK1Ua+HpSIY/bcivy3Y0JUT8KR9gAWd7AFFhNezGYiZ84cAQYWmjzsUFba5TcBKOVO/Qb9/Pr0zwuct0NobW1u3Bc5SYmbV5AG2kuX8UxdCf6aytZJ1hTldnuVS+qaQ6KB2L6Zzgy4IY2j68hDWu9JxQ8r8xDD9qVLy0KYDQ0lua5g== 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=dOEIE6kbH1A0gub8li03omSG1jaUyKWlzYKnhhEFevk=; b=m0ZDemE3Z8MWLUmrlZ+lZa9VFNnNvYn1/1gKmBDyitXKJ2aGkO1miasbBAk0CGnse58f1Yeis9SBJQ5rxt46piZf/VjvPM3ZfYQ+ITMHbv/++ZdNAj2PR6px8fHoae7BSRXuoRgC+guhOUuI9txDugp5dTe4pi+CyrAExVq6DrZMRiMpsi8h8o+rXbicDq56QzWin3cfrpeSGIvqltmOFjpOuccUeaIvq1kA0qNxLYlngI87PetyNpkyLhkwIqMtYlPcn76nAIGAu9J5aawhAavnHr74abcjXITOfT80HZDpmZCG4UkPHs1PrrukePKeHAg4kw8YXFfZQclwUbNpyA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) 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=dOEIE6kbH1A0gub8li03omSG1jaUyKWlzYKnhhEFevk=; b=FGKFKy6w/Tw0Jf0qJ4MExUehHdyLCjdR1TSBNcX6lR4gOCOG0Za7jaaWt92/dTE93lDyJiIl0ktrxJTAkyxwabfMKJNMWxMFFvIUuGDT0FJZsMvebdDFJU5SBCcLzG2yfFbgBXAZ0WiIPUIs2tEU8kt6UFVPBQTWHGPBpQ8a/LFyGvmTQbLTd3zCg2sAYPsi6zM4woqIob5zkIZO+WzJfhR/LFnsa6ZzwOcsSfp9shpChUUGYxyclN/txdsQsp1CTChSBTMgApVe5jH12m/tgC3Y07aNt880qiH3pOGlGFx8yF9o0UJqZORJJavz52maeiEtYPPKUab/xosrL5Hskw== Received: from MW4PR03CA0149.namprd03.prod.outlook.com (2603:10b6:303:8c::34) by PH0PR12MB8149.namprd12.prod.outlook.com (2603:10b6:510:297::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.28; Tue, 31 Oct 2023 10:52:04 +0000 Received: from CO1PEPF000042AD.namprd03.prod.outlook.com (2603:10b6:303:8c:cafe::71) by MW4PR03CA0149.outlook.office365.com (2603:10b6:303:8c::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.28 via Frontend Transport; Tue, 31 Oct 2023 10:52:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000042AD.mail.protection.outlook.com (10.167.243.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19 via Frontend Transport; Tue, 31 Oct 2023 10:52:04 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 31 Oct 2023 03:51:50 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 31 Oct 2023 03:51:47 -0700 From: Rongwei Liu To: , , , , , CC: , Alex Vesker Subject: [PATCH v3 2/6] net/mlx5/hws: fix potential wrong errno value Date: Tue, 31 Oct 2023 12:51:27 +0200 Message-ID: <20231031105131.441078-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231031105131.441078-1-rongweil@nvidia.com> References: <20231031094244.381557-1-rongweil@nvidia.com> <20231031105131.441078-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AD:EE_|PH0PR12MB8149:EE_ X-MS-Office365-Filtering-Correlation-Id: 97292313-87c6-4fa5-c44f-08dbd9ff6b45 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fTHhjc+T4oiFOePGDYPDkySiWrylUon08PCVPuzUYE0LjjfcCdvbF97crpJ6MePXrduxWF2DhGio1xn9+2aBDZEbPw51pb9MSP6knSAoWhegPbc2z9J/MehZypR10hG39Piz+HLH2CZ7mGUuuPsnsjINY7us4iT/sLxA4iL/aEhKwcq0r6p9mDL00kII8lbGMuhKiAkiS6kIiEPbU9+EGxGAudFxJEq4ZiwFrTJL+nf+7v6bwvuowSj9dNas+UeGVElFlOdlO4FV4U498tT3U7E21dN0uVxEAFdU46NWRekxIK655J15i6K7Lh6TpJP/12v7UxXOVpvT5maVVCEjA7K5ZJmwgJYeKGha2iQJJ++xhfB4Fsvwq3DCT82kInefoyzlFc7k+mZB5Y+/9/gzgxr53HAPHtyokrcaxOB0puAZ2tpDK6I1xvZX6jImsmQrKso6j+qsd05yV4J4UZXp/tj1vjQLx/fWNZ0PV6LxHFqshrhDsjItqVzIS8kCclPDe2YTD2Q1qzl9oFleVaXg5pTS3EDHSBf45ix73ZbRcLxlileg9zK38qCNjptqcMCk0MIOsvXhwmtxqjwrhwpmyA+49G3ceJaCWybmqM4ZKh/DE/4erilw3jx5rcg+lsAcjiqUn58PCcG9egRqNPUj0friZf+RhLBKLXQlP+Jrejb3Q8kGxEoWebhpVtludd8zi5Ed6sEae3f/12tInkIE8jt2Tp1LTSHz6xlUPzhqU3RGhSkDc9mr6j+qccN+NTNW X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(376002)(346002)(136003)(39860400002)(396003)(230922051799003)(82310400011)(186009)(64100799003)(451199024)(1800799009)(46966006)(40470700004)(36840700001)(40480700001)(86362001)(7636003)(478600001)(356005)(36756003)(40460700003)(82740400003)(47076005)(7696005)(8676002)(6666004)(41300700001)(8936002)(107886003)(4326008)(26005)(5660300002)(83380400001)(336012)(2906002)(16526019)(426003)(6286002)(70586007)(1076003)(2616005)(110136005)(316002)(36860700001)(70206006)(54906003)(55016003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2023 10:52:04.1116 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 97292313-87c6-4fa5-c44f-08dbd9ff6b45 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8149 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 A valid rte_errno is desired when DR layer api returns error and it can't over-write the value set by under-layer. Fixes: a318b3d54772 ("net/mlx5/hws: support insert header action") Cc: hamdani@nvidia.com Signed-off-by: Rongwei Liu Reviewed-by: Alex Vesker Acked-by: Ori Kam --- drivers/net/mlx5/hws/mlx5dr_action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c index 59be8ae2c5..76ca57d302 100644 --- a/drivers/net/mlx5/hws/mlx5dr_action.c +++ b/drivers/net/mlx5/hws/mlx5dr_action.c @@ -2262,6 +2262,7 @@ mlx5dr_action_create_insert_header(struct mlx5dr_context *ctx, if (!num_of_hdrs) { DR_LOG(ERR, "Reformat num_of_hdrs cannot be zero"); + rte_errno = EINVAL; return NULL; } @@ -2309,7 +2310,6 @@ mlx5dr_action_create_insert_header(struct mlx5dr_context *ctx, reformat_hdrs, log_bulk_size); if (ret) { DR_LOG(ERR, "Failed to create HWS reformat action"); - rte_errno = EINVAL; goto free_reformat_hdrs; } -- 2.27.0