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 C533243E57 for ; Sat, 13 Apr 2024 14:52:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0F604069F; Sat, 13 Apr 2024 14:52:10 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2060.outbound.protection.outlook.com [40.107.92.60]) by mails.dpdk.org (Postfix) with ESMTP id B3AD040294 for ; Sat, 13 Apr 2024 14:52:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B8GGOxuq4oLkj0CPP7qCXRBPfKdxKlPKwh6EA9j6Y1mYni+20J15XW0gqMQ2/Gtb4sqi57ys9SyMVNeRtMlcU3QA8cf+kIbqHbAy0lUBoZNfLV0Mq/m2YJuKH61DF8jqgEpaWv5iy2N/4ejshf1gA++I9jDwfSu8JTpz0hGfg1q986hI3kSLq1QXNkeGkT1n8aTIzeHxdYNNvA+G1+2OeomJG0gat0BE7rq1nodyHipRTxaq9Lsi22xBCvJv9VJzZ6xm6ezM1MtarbfK0wLhKPPKGzkbD0qiWC8SNIYEs/NE28u92aWWyYGO/yWn0amGyM70Vz3qOkJ7bQhF2QJrjg== 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=AhcG6dLpk48kmS7n1AikaE48rzQAWK1EV99giWmPiWE=; b=aFxWpq+LaXwscYkIHMTMKHgi34f/zu3TfWt/IAi9aIHhXPR2NWahNgix+m5ItW4/gGhDHFZN3FEd7l+6tkQLIeOVGao6ONtbf300tVVNyDV0R9yEr9aQq1u/ZWxbZCkYg6/X50tsQ2PR9h3dRwB+WRiEwraZnFeE0WO7hDtnuCbLZoBFmJgeMIgsvo8orlqJ3ZIloUbhpu9nV4LwFMBan3oc260LzBy+D0AZxATuOVo3k0s8fE1W1mNSKl4YU0xzHpEg4/wNePpT8HuqHjrIEPUVyKHVTjJNw+dSPdFSZkHHBscTvKeNAc6zchhSRTiN8qd6uvAfWVNqw84q+Ot4kw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=networkplumber.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=AhcG6dLpk48kmS7n1AikaE48rzQAWK1EV99giWmPiWE=; b=Y7dziBfJ6mifwnOMgWbXBce02qW91e+MEkUHTZi7eo7dqEaR3TixqWnu/v2KPiyyxIJgVxtBxBH0ZualOHPdzGU+v5CGr9GlSXaAJStyfMlHiZNLJxcbiH3A6HJ53pcSe/seMU1JOfG1P49jimN2T6CmN4WIsN+zHD07yBO4tG9Gz1dRtvHoQW6zYPr+G3inyJj/+IHUkE+GIp7Es3EiHi3PFf1dc6CJC7Ja8RKHI5uIIdbZja9DommdbiRdmspNmv9iPcDNWv7BnNlcErkHjNBkgRZKZJAOQ96BiaWcLoaRex2qUAyBHL/3RrlsM9NBRCbYRmozNEtndTka0WWBDg== Received: from SJ0PR03CA0035.namprd03.prod.outlook.com (2603:10b6:a03:33e::10) by MN2PR12MB4406.namprd12.prod.outlook.com (2603:10b6:208:268::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Sat, 13 Apr 2024 12:52:04 +0000 Received: from SJ1PEPF00001CE0.namprd05.prod.outlook.com (2603:10b6:a03:33e:cafe::dc) by SJ0PR03CA0035.outlook.office365.com (2603:10b6:a03:33e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.19 via Frontend Transport; Sat, 13 Apr 2024 12:52:03 +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 SJ1PEPF00001CE0.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:52:03 +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; Sat, 13 Apr 2024 05:51:53 -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.1258.12; Sat, 13 Apr 2024 05:51:52 -0700 From: Xueming Li To: Stephen Hemminger CC: dpdk stable Subject: patch 'net/tap: do not overwrite flow API errors' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:48:19 +0800 Message-ID: <20240413125005.725659-19-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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: SJ1PEPF00001CE0:EE_|MN2PR12MB4406:EE_ X-MS-Office365-Filtering-Correlation-Id: eab98bef-0749-4bee-1132-08dc5bb884be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zu4Mqnbk4x4vtVolNevHlP4bPQ2x5af74dyasMuVOKo8Ju29MSse58u9KGKeFb+rypxwLDfnYvmVIYH7km3+7DAQyVjVA4xvTHNhhGggKDTBZRPv5PiKQpqjtBiVMaiPKkuiP0eSOOxl0OnfCIkwJBN8NnNMl4v8HTsJql6QAQWJ5DGWBtRVZUAixLXgPaaLg5JKn9tqGjPPpk4vjOOBWv+0Il+5F2S155etwz+pB0q0YE+m9c+GiBY6y3uM+F1trgWifBw5vrjmd8pvy5BTI14v9RZjHKwiOaQ/3/q5oM8v2kyiiocsELexG36J9kUDwlR76vwN3cDY91EuUkXZtZNuTuXkohDdBp5jrPO1kzQ/tJwmdcI7SGxeEP3us+SxiQJ5JE8NW1jRVaCxzSanSH/cEvlk5yIZZpeodiE3m79aN/IpyqrA3urD6R/pTszeNPb/eAhZSvbybMhWNXab5DD4VdlRs6AhQxHd6GrDWWf2MrzchRFY0s6jgFX8Ihs8CGZeuhJfpbdqn8hDIeOWM6exvQih91hqHpd8ZhM5UdGYQfN6RxLd3/gfCNDKTzosoBBihJfboWjyovAs2F/Hk6uAg8vlGLQoJVvrAKg2/lpJhzHJ4rNNWEL55+uwivdxp3X7pXXmKYMDLPleYHlUxpQGfDDoKcx3TQSSu+bW7LhEP0FspFv0HwFC6uTer8k9RS4sH71Wc4suoIrwo8Ahf87r03RMGYM5D1wQkPlz9jdiFELFxkkYMTtD14WNiWAF 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)(1800799015)(36860700004)(82310400014)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:52:03.8614 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eab98bef-0749-4bee-1132-08dc5bb884be 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: SJ1PEPF00001CE0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4406 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=e9462a5690b6e3d09930960bfd1ea6906d848263 Thanks. Xueming Li --- >From e9462a5690b6e3d09930960bfd1ea6906d848263 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 29 Feb 2024 09:31:07 -0800 Subject: [PATCH] net/tap: do not overwrite flow API errors Cc: Xueming Li [ upstream commit 11b90b53c6716ca9bc713bab6cfba039fe8e38cb ] All flow errors were ending up being reported as not supported, even when the error path was previously setting a valid and better error message. Example, asking for a non-existent queue in flow. Before: testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:01 \ / end actions queue index 12 / end port_flow_complain(): Caught PMD error type 16 (specific action): cause: 0x7fffc46c1e18, action not supported: Operation not supported After: testpmd> flow create 0 ingress pattern eth src is 06:05:04:03:02:01 \ / end actions queue index 12 / end port_flow_complain(): Caught PMD error type 16 (specific action): cause: 0x7fffa54e1d88, queue index out of range: Numerical result out of range Fixes: f46900d03823 ("net/tap: fix flow and port commands") Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions") Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_flow.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c index ed4d42f92f..5b0fee9064 100644 --- a/drivers/net/tap/tap_flow.c +++ b/drivers/net/tap/tap_flow.c @@ -1082,8 +1082,11 @@ priv_flow_process(struct pmd_internals *pmd, } /* use flower filter type */ tap_nlattr_add(&flow->msg.nh, TCA_KIND, sizeof("flower"), "flower"); - if (tap_nlattr_nested_start(&flow->msg, TCA_OPTIONS) < 0) - goto exit_item_not_supported; + if (tap_nlattr_nested_start(&flow->msg, TCA_OPTIONS) < 0) { + rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_ACTION, + actions, "could not allocated netlink msg"); + goto exit_return_error; + } } for (; items->type != RTE_FLOW_ITEM_TYPE_END; ++items) { const struct tap_flow_items *token = NULL; @@ -1199,9 +1202,12 @@ actions: if (action) goto exit_action_not_supported; action = 1; - if (!queue || - (queue->index > pmd->dev->data->nb_rx_queues - 1)) - goto exit_action_not_supported; + if (queue->index >= pmd->dev->data->nb_rx_queues) { + rte_flow_error_set(error, ERANGE, + RTE_FLOW_ERROR_TYPE_ACTION, actions, + "queue index out of range"); + goto exit_return_error; + } if (flow) { struct action_data adata = { .id = "skbedit", @@ -1227,7 +1233,7 @@ actions: if (!pmd->rss_enabled) { err = rss_enable(pmd, attr, error); if (err) - goto exit_action_not_supported; + goto exit_return_error; } if (flow) err = rss_add_actions(flow, pmd, rss, error); @@ -1235,7 +1241,7 @@ actions: goto exit_action_not_supported; } if (err) - goto exit_action_not_supported; + goto exit_return_error; } /* When fate is unknown, drop traffic. */ if (!action) { @@ -1258,6 +1264,7 @@ exit_item_not_supported: exit_action_not_supported: rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, actions, "action not supported"); +exit_return_error: return -rte_errno; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:05.752023346 +0800 +++ 0019-net-tap-do-not-overwrite-flow-API-errors.patch 2024-04-13 20:43:04.937754010 +0800 @@ -1 +1 @@ -From 11b90b53c6716ca9bc713bab6cfba039fe8e38cb Mon Sep 17 00:00:00 2001 +From e9462a5690b6e3d09930960bfd1ea6906d848263 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 11b90b53c6716ca9bc713bab6cfba039fe8e38cb ] @@ -27 +29,0 @@ -Cc: stable@dpdk.org