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 6D3CB42825; Thu, 23 Mar 2023 13:34:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D70A4021E; Thu, 23 Mar 2023 13:34:53 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2046.outbound.protection.outlook.com [40.107.244.46]) by mails.dpdk.org (Postfix) with ESMTP id 178D04021D; Thu, 23 Mar 2023 13:34:51 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YKx5POC+wNpBx7Yy1XqY0Wi5XUtfh4pGTfyYwQLdmRcDzxWqe1mk11FyD1ZthhQKkfTiLbS/RupZz5nT07Kl2g0pMHR4Vv5OX8Gt32uS+HzAaDRBe5q4cW8yjV/+UrR299FyNE6OjF+0kx4gk6e8IAl3JZLM0FYulhruHE2jylRZHno6uXnwobMStkHi17Tz6GUTEtfr1uu4wk4wDuz8wQT7hoW22YbGesghLA3eJcqVQVAaVVUO41+srLxS5l50jSNb0DljuYl5O130ac5jzTC5cY5kTkdBUsRF+1xQVJ3wnV/qlX9RPRezszyTKF4rCLl48uDdg+LcltmvZ2ju6A== 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=vG+oVCpAJrzdizD0kcRxTJRSbAVhwyoBGhulpvAkJ/4=; b=U6PZAXrMAps/PebWIQwYDCanjZ+4Xmbef6lL38I5r7LHy6qfkPsWWPbud/nKsDMZx2xYLYazE/AJVjeSmDObKqt0rGzfelzI3MWYLN1yPeJZl0ytVcmqK/id4BVOv+XXrbbOfmMvm/39d+C5Gk7FeZhRJG8ic6gjPJ0oBpg7EipbdutoutJn6Iv0dBEmD20xIcuq4uPya/m4G/nDvBU6K0GaR9wirL6lJOn5FU0a+eae2FLZiIMWzanj64suwvrNC2bkk3Z7XPQoVW8nIZBbauCf2QF+nGgoVQRCphJU01jlHCWZiNpUjeg7AGUdUJ/UTnEhb/HGpsR8n2UnkCEA3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net 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 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=vG+oVCpAJrzdizD0kcRxTJRSbAVhwyoBGhulpvAkJ/4=; b=Vr/34Ng54xKTCQu9JA7I2V5f/LqIcxHzPrazehJXBS+doVBmp9NXbC5w4ioZaDj6VQxda9dXbtoyDmzSfMnuNajrQg4QQBtdfUZgYT8MhR11r3N1KU2qsng6Sof3fz9fxTBaa3vOibUQw7c+1otBgO1Gi6J0zqdMI+CS2y9izGVGW5Lyt3KmkGMVRPrv4dBdw5ju8cNnQMxrHam2OwQ4hhQT75s2P1HX3Bj0+oa0ZBFhK27q4GNWD7Fr7LCoWBD6jHiDTVUvLp2lRuSvKoB62rPF9n23CAV9GHfdtX/XR3y8NQDXUZETiNKC+auV2/jnKrUGzj3r7mSHe/kQTJg8HQ== Received: from MW2PR16CA0046.namprd16.prod.outlook.com (2603:10b6:907:1::23) by CY8PR12MB8194.namprd12.prod.outlook.com (2603:10b6:930:76::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 12:34:49 +0000 Received: from CO1NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:907:1:cafe::b7) by MW2PR16CA0046.outlook.office365.com (2603:10b6:907:1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38 via Frontend Transport; Thu, 23 Mar 2023 12:34:49 +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 CO1NAM11FT021.mail.protection.outlook.com (10.13.175.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.21 via Frontend Transport; Thu, 23 Mar 2023 12:34:48 +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.5; Thu, 23 Mar 2023 05:34:42 -0700 Received: from nvidia.com (10.126.230.37) 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.37; Thu, 23 Mar 2023 05:34:39 -0700 From: Alex Vesker To: , , , , Matan Azrad CC: , , Subject: [PATCH] net/mlx5/hws: fix return value of send queue action Date: Thu, 23 Mar 2023 14:34:14 +0200 Message-ID: <20230323123416.26636-1-valex@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT021:EE_|CY8PR12MB8194:EE_ X-MS-Office365-Filtering-Correlation-Id: 16d8e02b-318a-4084-4b09-08db2b9afe11 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: fhRyGVl8iv8Un+GckjjeL2m6cubQ7+BIaCKVezMgsvZ+e28BY5M0DTmc75tcw1vwsCDzYjPuU6p+QFQvgj4ispERGGxsjwHaIJYo3nzjuMMs4Xo/Bl8E+U0PVbT7juTyTnW1j93T9odGuykFxrJYdf1n5cMT9w7GPAnvFFY/WzFW8K196ayh15IiAPC9Qh8i2KUdT0Ec1q9lBRmNgeArB7+0lwaZPwDewni21irSv22djrBcJH3Bl3mFDXym0qYUtv89eiL7OOVYC9smgIR/mZHbG5TNsVK7jr/RuyWk0Zv/VuOdA6GEAIUknLXN9iG9rCdlsXbpAfL8oV1QzpWFbmQnU6Hu86L3611OsrVyFP5Vla8b2v7iwkiFeLj9T9u3IAp5cvus7jcHbsrFWXZvNhhepPoxdDbY80lD37u9sMhjkjhDv5I9iaw3pJcEzc7zHRsmGf2fgGrdNQJb9cMnEVRYOYOi+ZLNBai2iyh1vIBeAwLQ8DiWRXi9tshYlVveloybgbswFr/J6oHXbCogZGc9hEtr0BfHFVolFR1LjsepW0czbE6X6t1p162Gpm1zeckrp4NLggWS4GpG2RN+dW9ILmzsI2l2cU8aV+r+JzSfHXJzDArc0inkOxxlKvx6UilshgvzmFlH2Z+5IrdTnC3268mj8Yk4L5vbjCCed0fTHxN9oNRM4OM6Kv7h7GzxNaQAV5WnXu0HT7TjhI3Sww/dPr9GQ1TXBVjKx9yakGIDgvVXuwRMrGEX1b8ocH33 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:(13230025)(4636009)(396003)(376002)(39860400002)(346002)(136003)(451199018)(36840700001)(40470700004)(46966006)(70206006)(8936002)(70586007)(41300700001)(86362001)(4326008)(8676002)(40460700003)(36756003)(7636003)(1076003)(356005)(36860700001)(26005)(55016003)(40480700001)(336012)(2616005)(83380400001)(6286002)(47076005)(426003)(186003)(6666004)(16526019)(82310400005)(316002)(7696005)(478600001)(54906003)(110136005)(6636002)(82740400003)(2906002)(5660300002)(4744005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 12:34:48.9623 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 16d8e02b-318a-4084-4b09-08db2b9afe11 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: CO1NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8194 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 The rte_errno should be set to a positive error value while the ret of the function should return a negative value this aligns code to other mlx5dr API functions. Fixes: 3eb748869d2d ("net/mlx5/hws: add send layer") Cc: stable@dpdk.org Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Acked-by: Matan Azrad matan@nvidia.com --- drivers/net/mlx5/hws/mlx5dr_send.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c index 51aaf5c8e2..d650c55124 100644 --- a/drivers/net/mlx5/hws/mlx5dr_send.c +++ b/drivers/net/mlx5/hws/mlx5dr_send.c @@ -1007,8 +1007,8 @@ int mlx5dr_send_queue_action(struct mlx5dr_context *ctx, break; default: - rte_errno = -EINVAL; - return rte_errno; + rte_errno = EINVAL; + return -rte_errno; } return 0; -- 2.18.1