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 2912943238; Sun, 29 Oct 2023 17:36:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21FC940E13; Sun, 29 Oct 2023 17:34:07 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2041.outbound.protection.outlook.com [40.107.244.41]) by mails.dpdk.org (Postfix) with ESMTP id EC9CB42DD5 for ; Sun, 29 Oct 2023 17:33:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aom5T2lwP/bvNS5z4e73ZOSKw1ElsGev11ZkYbSKecqXlIKYDpZlr3wjr01cyc3ycXUdR6HeKbxh+Cm79IOihP1rIlOvBYte+L0J+bTeXT4vTeXvVapOMhQycIKslgVHs+T15d63iZnVOn+XPkS1dBbT25AWyrV/saOBMsqJlDItZJEDCk/hvsrSwZ4XdmQxDUlyr0pUUoiNmVkIXZQIJ4UTbS5CBY3K3Eo6ggADwD7ypoNKpxUYSZbGGpHJ+XaTuKXmnlHzxOkifG/kqKm4uGH81uWbF6BjDiMPxReOLEql+r9fDWCZIhjIOsaSXnJ5daBbkYh5pLPzYuhyn/BXXQ== 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=QcbZ5JxFFeyVqs6bEmy6Zjg6CGnOryz9E5yy4XkuPuI=; b=TbVhuTNVhQ+koVKdB1dFKnRoaOfE9RAozRU+GcOh4i8lITAl1+SdDMGMPEv0Ek+Yl6Pl0MlwnTYUJJOvdFRvwsOg7fp43bG7u/P636uu9mr9+JbeQj8hWcAH4RRUJIsSPI290BPu/fRz2s1YAxhLGBpVYyYd+YAil5MNwNvi6wtwD25Ez2q1tMIDzyEtg9kLp2iMID80r0+5QyQ3DSCGZRlErxBDS/7YhuR1xTHrblUNv3FzlYwNybp9OwSKDT54gqNSnEEH+Hkc+tzq39XF0xjNm6Goh9+p1lTs+G6dBHdiEZ9SFpovfqFUJiJoOAdBcGXJIMbkKabpY9cXzFAEyA== 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=QcbZ5JxFFeyVqs6bEmy6Zjg6CGnOryz9E5yy4XkuPuI=; b=BIf9uMjGVEmjGsp3jqqk55FZ7Qj8Ph76L4OfCvrTpo4q8012KRkJ7P5T+kh4AySfDrpP1zJFplsQQ/ZSyOr77yxAFYuj0J5jK8OCxpxeVCC5XzE+C880B0VfSuzELLPZq6991TOBHDdzKMT7jKKgI6QHvxUTdBh6QFkSbufQLD0fJIEyvGKzlblGdDWg4ebCYqEhK/OX6K7x/d2H9xHAV5v0eR0gw0vBvIJE206ez8IeYOu3/znnoVomTG3s8zDE51am6DWlw/jlSWLbj7A6BsLIsXMaDv/pPCW8wYqX9Rjp3DVVQtms3JWtH3I2nnGCjHZOJOKQ+KuXje1eDevIzg== Received: from CH2PR10CA0013.namprd10.prod.outlook.com (2603:10b6:610:4c::23) by BY5PR12MB4902.namprd12.prod.outlook.com (2603:10b6:a03:1dd::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.27; Sun, 29 Oct 2023 16:33:50 +0000 Received: from DS2PEPF00003442.namprd04.prod.outlook.com (2603:10b6:610:4c:cafe::60) by CH2PR10CA0013.outlook.office365.com (2603:10b6:610:4c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.27 via Frontend Transport; Sun, 29 Oct 2023 16:33:50 +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 DS2PEPF00003442.mail.protection.outlook.com (10.167.17.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.18 via Frontend Transport; Sun, 29 Oct 2023 16:33:50 +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; Sun, 29 Oct 2023 09:33:41 -0700 Received: from nvidia.com (10.126.231.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; Sun, 29 Oct 2023 09:33:38 -0700 From: Gregory Etelson To: CC: , , , Rongwei Liu , , Alex Vesker , Ori Kam , Matan Azrad , Viacheslav Ovsiienko , "Suanming Mou" Subject: [PATCH 26/30] net/mlx5/hws: fix potential wrong errno value Date: Sun, 29 Oct 2023 18:31:58 +0200 Message-ID: <20231029163202.216450-26-getelson@nvidia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231029163202.216450-1-getelson@nvidia.com> References: <20231029163202.216450-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003442:EE_|BY5PR12MB4902:EE_ X-MS-Office365-Filtering-Correlation-Id: 0311eb61-bef0-4938-5241-08dbd89cd534 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k4zorqVPUJpSK3gEN++EM47S7E3HgusgebCaPxZ/5iTtZ4TCOT4xBEA5FsNa9bFotuf6vXyVhapsho4Z2ujNTUGH3HY54dgCWcjZMvxYe+VkRM/dAIjvdRNph92FOrtLnbY1x2OX+yOJyglPPuCFJoZp4z4QUipwr7OWVmljFnE1CtNgSRyqQCtdkBcXFSILN9YGy2RaXi12ZCRIHNHCI43z77yvKwdAJF+IyLS5xo0jaQ+yrH8OKs2PD4LyMZt+5reCVXjsTpQ8xLzY3VKe85pGF2Wp6nLhrH+eZUCYLqJT4dzsVbZ5RIfz9jPfx3GwW5qpC/5UU/s7SVAC722aF4tgBYuYRD0vxZpZ3TXAN1IBVU7pBdF5iXB5IH23JM4/NU7WRurr1yG+TK5kcFkkzXFt/F+CXqd0kwzgwN7BxmEa1LtV45Blwl5sbf8KSeVbTdvrEhTbrkmuRX/BPAdSLCOUxSxEnSuvh+/74Al/Cv1YisWSkQjqk+Q1dhx9ANSdH8k47plIArcKpBOZJfZUXWzXLrqT9a9vSbP9rpNr7PjNVjW2SRH/rj2H09tzH90dnKOJbiee0nQjJS1nXw7lbzMqMj6RtKPm1hoIxWg5K3SLMLbxJ6x1/oR3j3+VU+TNS7IGH5LD/itjkWC3DSpBTZ9JLTzuH0yD3Xoc84wz2OE7zQbJlJb9+b4LaRAmuTWliX8taQJMr+YhNaw6QOau5A== 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)(39850400004)(376002)(346002)(136003)(396003)(230922051799003)(64100799003)(1800799009)(82310400011)(186009)(451199024)(46966006)(36840700001)(478600001)(7696005)(6666004)(70206006)(70586007)(336012)(426003)(26005)(6286002)(16526019)(107886003)(1076003)(2616005)(41300700001)(2906002)(4326008)(8676002)(8936002)(316002)(6916009)(54906003)(5660300002)(86362001)(36756003)(36860700001)(83380400001)(47076005)(82740400003)(356005)(7636003)(55016003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2023 16:33:50.4968 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0311eb61-bef0-4938-5241-08dbd89cd534 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: DS2PEPF00003442.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4902 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 From: Rongwei Liu 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: df61fcd5f3ca ("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.39.2