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 53D94A00C3 for ; Tue, 18 Jan 2022 12:36:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C6054068E; Tue, 18 Jan 2022 12:36:03 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2062.outbound.protection.outlook.com [40.107.94.62]) by mails.dpdk.org (Postfix) with ESMTP id 263764068E for ; Tue, 18 Jan 2022 12:36:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kXnqK5+3bals9o/safF80B7Gh0tyVJ4wxwvnNNaPMBRZCEeKtwrk9mR2NVj+j0m7CRBoS4aWuFCCj9qUSx1kMIEMwhvcnTYjVAfLXgiTR/nEV/jqWqNkRetvADIqsj5xQ1HspIivyNGNrduZRJ4kw9pLLFQvqXw/O1ei8CjHfv2rbym2dXnQF4+zpC1kHc0Lk0Fua6CQB7D8T61T3UzXIibz9EzpRIKaSqKcwpLigYi+rwxaQvRJo2pA30mzOCpaNgQKBpjJSygpL0x1O+dVyDL0SpB8W4ENJEh/xbvihas9fYcWqPX1KNsc7yJqlKxpmi1HvXDWiioNDopujyhF8A== 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=XuSKv08lBm2PX8a9PoVYJPbxb1YfXpnjIjN76qPzTf8=; b=fBUcRtRGSE/3Cd/xenY91sDME8lLiG4VxeuYg/JlfyxI5fZDl/hJv9VruQnWOtatJ6P4Sl+tLeWD4WCvtys3wddbme3I5DHQGrAa3aKTa9e/FYmvYz6yqiqLr3RHXpLD0GDd/7IliB1QdHv3BDoLtJNfr6t2ah977/H1STz1tkNrJNJ0zeJgLupCtk+FxeWndBHBtM7GhNK2x0se2c9gkdstK18r/eld73XvhH4+ux4R/Hl4138Vf6N/z+i0BGhhQ2CfzyzDEt98rp+qxDpCf8lFEJYjJO7wcPDtzzCS4iBh+Zhl/NgX0HVrugtOjZxsHC+mTk1F+e7gRpOH6x4Syg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) 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 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=XuSKv08lBm2PX8a9PoVYJPbxb1YfXpnjIjN76qPzTf8=; b=at5NQRsor7y9flDko3cHXF8PD61JUU2hDfv7yoOuxX83DJPxMjrl3uU9iUE+Jw5Wb6uDOy2EVSCZfHcdETn5xntaYbb6EaYGouRZhntz1PrKL4p1DnwqG1QSofdhOoL8epyPNWmKkrPpt0Tw25KPxV3B1IOzqI/OhTj5ZFrMWP3gxFbbfRW+etXkX4OxpZ4FNOaOp6QwhCBMIyx2URWrN2W7zFUz9KN0OxysebUknrgosjFE563dNqoCheEMeM0FVTWHQygiZKfUkQXShk/l71sGxu388s1aNvs+XhnjRBWKZAMVRHrSvSJZl0mfnR5wPLJHXTdP3G2+MUBHxuj9Ow== Received: from BN6PR16CA0034.namprd16.prod.outlook.com (2603:10b6:405:14::20) by BY5PR12MB4856.namprd12.prod.outlook.com (2603:10b6:a03:1d5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Tue, 18 Jan 2022 11:35:58 +0000 Received: from BN8NAM11FT025.eop-nam11.prod.protection.outlook.com (2603:10b6:405:14:cafe::1b) by BN6PR16CA0034.outlook.office365.com (2603:10b6:405:14::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9 via Frontend Transport; Tue, 18 Jan 2022 11:35:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) 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 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.238) by BN8NAM11FT025.mail.protection.outlook.com (10.13.177.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4888.9 via Frontend Transport; Tue, 18 Jan 2022 11:35:57 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 18 Jan 2022 11:35:57 +0000 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_CBC_SHA384) id 15.2.986.9; Tue, 18 Jan 2022 03:35:54 -0800 From: Xiaoyu Min To: Matan Azrad , Viacheslav Ovsiienko , Dekel Peled CC: Subject: [PATCH] net/mlx5: reject jump to root table Date: Tue, 18 Jan 2022 19:35:37 +0800 Message-ID: <798beef100ce147f20e03f7590c7770e56a246cc.1642505511.git.jackmin@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ef2bea8-af17-454b-8fc4-08d9da76b244 X-MS-TrafficTypeDiagnostic: BY5PR12MB4856:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UK5cj6+BwwMOQ8uGBpYedrgl70UoMS1igP/HJTqMOvjfHRMb75lBKDEjkuvZek3mWkI1KH5a0ux2tXvEfx+DfSuZi3nOwI36vYpHlZxb3hxvJM2mFaHrCTtgmEn5ahkxhmE8I+QCQNu380fEqLDQNkmQCg8v9gjMix8PdY3LFKWDBfs1jl4/1mdzHjb4geX+wgKD4bUylKRPLFPL6M6EZri0dh+84SgLCHFFt6ttZIkOGnEaCm5vREjU2JCmtIIZc+qPIeMvGabvyh9VcQM9oC80g19j9wCTlypJDFpas87qL+mTu7tphfjUbdoPwt0HC0E5D/Qqg5e7mgq0HPACNyxeuNc3vfGSnKRanZ03Tb5W36vlH03mwLMk6VV06ziLlOf6n65VtGc+xL416Rk9pY0C4o4ICUAjz3zqHJU/uxtRTl7zJ8sz6S+JlhAyVeTttUfFWiDmYkduzik/kzbkak/elhEZ2zabIPIauAgOLjwdWEI15dgH+z6SK8A1thdiQTzc8kBCNakguDQDB6CNeUkstf9w7/+QjtvJKJmaKvJyXQ+08xUnkaZLsJIAJC5Yu1rAQSt2eJVBwMvjVFxlWYkr5Tj51MQj5ao0NMvf7Syw+vyv2Yw27RsAk2So0VO+8pyJs5fm5ByCPd6lLL2X3wJb1hI2VhICD4xPAK5mD639Vsmh4Tndah8ww0Bl9IXDafm/Y137hDStL1ajHGJvoabCEH2CmgDcy8u3P0Omwdt+F2mQIjWyEKthbn9DVf4OMAkSJOEQqRzptqrjnfLmdNH3kQ4hke/YQXsRflswIQkL6xezGD39qWI3PkvXl2Lm X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(4636009)(46966006)(40470700002)(36840700001)(70206006)(70586007)(83380400001)(316002)(6286002)(2616005)(8676002)(7696005)(426003)(47076005)(4326008)(36860700001)(356005)(5660300002)(110136005)(86362001)(8936002)(40460700001)(82310400004)(36756003)(2906002)(508600001)(6666004)(26005)(336012)(16526019)(186003)(55016003)(81166007)(36900700001)(309714004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2022 11:35:57.9751 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ef2bea8-af17-454b-8fc4-08d9da76b244 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT025.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4856 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 Currently root table as destination is not supported. The jump action which finally be translated to underlying root table in rdma-core should be rejected. Fixes: f78f747f41d0 ("net/mlx5: allow jump to group lower than current") Cc: stable@dpdk.org Signed-off-by: Xiaoyu Min Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 8022d7d11f..ec5d1816bc 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -4982,7 +4982,7 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev, const struct rte_flow_attr *attributes, bool external, struct rte_flow_error *error) { - uint32_t target_group, table; + uint32_t target_group, table = 0; int ret = 0; struct flow_grp_info grp_info = { .external = !!external, @@ -5013,6 +5013,10 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev, RTE_FLOW_ERROR_TYPE_ACTION, NULL, "target group must be other than" " the current flow group"); + if (table == 0) + return rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION_CONF, + NULL, "root table shouldn't be destination"); return 0; } -- 2.34.1 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 847B1A034C for ; Tue, 18 Jan 2022 12:39:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A4AE42719; Tue, 18 Jan 2022 12:39:14 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2057.outbound.protection.outlook.com [40.107.92.57]) by mails.dpdk.org (Postfix) with ESMTP id 083314068E; Tue, 18 Jan 2022 12:39:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UufOqJiuwIHX8gWgX/i6dqtW8PxCKct0XKB1LecarBpMAmDJCgLVdFvN7sCZL0Je1QaN1XP1LHrdxvHVSvC2LuDGfcLZ3OC4BZJpl9e4/ytLTDu8cJpZICRbYFQzjDC4BcDiccLyeAPm/dpzM73Ne5tIfTdEweIhRWmAVqoRPiJZZcCkhnoXHaQkhoWbo/yu2P0T8qYCfOW2qVnqTERWA13muXc9oDt8sAabnkrTI2nVaAR55Tp6yqb6BD9x6HzjLGu0Jgux4k32Ui3vCKpYib+Rm8MZJiMhF1xPrxz4pHh05lJsga7mvMPwoe272BDBDCN2dCVElJFfN4ewFc/XYQ== 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=XuSKv08lBm2PX8a9PoVYJPbxb1YfXpnjIjN76qPzTf8=; b=icY9PC7Wr6rXF1QqqHZCot3vA7aWZ+UGtymut84cJ3ur2PS66GMmFW+OSdAbAHgcnzjOeao/lmrusv54w4MexV9OlFv3TASUmkCx+mohnyvZoCbo4xLuM3Bc/kE3iQQS6MQyJLzF54eHqRYIlf8OYCHw/Nm+Or8Kw/QY2Y4ONrQudsJUxN1Q55o1YbUDi5qFwb0hsJWL8DzSVq/l3RM62UU5h2nf/Cyzie1j6VCkWtIRYSrlBt4UoRnoEwOT6DDB7z/2sY+xK+QE8WpkKxp/+UIRu3MitzoBzCAGScSVVmS25uLVnmsDGfLxbmKYy+MTyIWIPYZCDz+FwWndpQj4yA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) 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 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=XuSKv08lBm2PX8a9PoVYJPbxb1YfXpnjIjN76qPzTf8=; b=XlbJ/+uZskgHKofXxGQORkHK/rDaaVzuZz3iWAiCRQ5dRORmQL7xcA7P8IwtURW8byUSF15rZ8scUbsAsZxciZw/Y1zLtmpEZlF9HqSEZxVgJxno8MxAyErzJlXnCP93TqjLRllCyNSs0NZJp2jd27gVs/jaS52k2GhZpxbb0cxuupeXiGR366dK2ENfDcXocQBAAETQqMQJpHVg43FHNNJ0r/znZ7AQcFwh3XmH0Qq8H7jo1OZrbV/N8MPmr7ta77Ju3yoJapS7LsOfZiOFeO3lPQXbF8eAnGKTwsCnEDO9EWW0w02rq8zAzAxHX5IG3Mg5befjx+vSLN1MM+uuWg== Received: from MW2PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:302:1::39) by CY4PR1201MB0152.namprd12.prod.outlook.com (2603:10b6:910:1b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Tue, 18 Jan 2022 11:39:10 +0000 Received: from CO1NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:302:1:cafe::d4) by MW2PR2101CA0026.outlook.office365.com (2603:10b6:302:1::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.3 via Frontend Transport; Tue, 18 Jan 2022 11:39:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by CO1NAM11FT050.mail.protection.outlook.com (10.13.174.79) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4888.9 via Frontend Transport; Tue, 18 Jan 2022 11:39:09 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 18 Jan 2022 11:39:07 +0000 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_CBC_SHA384) id 15.2.986.9; Tue, 18 Jan 2022 03:39:05 -0800 From: Xiaoyu Min To: Matan Azrad , Viacheslav Ovsiienko , Dekel Peled CC: , Subject: [PATCH] net/mlx5: reject jump to root table Date: Tue, 18 Jan 2022 19:38:50 +0800 Message-ID: <798beef100ce147f20e03f7590c7770e56a246cc.1642505511.git.jackmin@nvidia.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5923f9f3-f87a-4c40-1f65-08d9da7724ac X-MS-TrafficTypeDiagnostic: CY4PR1201MB0152:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /PYSeuzuHa3Lq3HAXK69EHjkrJlr92jO4irB0o90Vlrzp8IAITAlmkPV/x4dan/3ibIzJ4c42vu8FdZhIXuZp8FroFV9KQrIqGd9hVlya6YZfhEIFYILDwYnQ3rFBfitXZyU3VQz/1A4O3SERlCFxqipIP7AYjo85n3BuskrDOxFA2TYMdRnsmNNP+cdX44HMTTQqhyHPKtagvCXRe9otYuLsMtoZDobhGh0/xLEU31bNQQLTjmJ5DuK0tUMM4g6ljAxeXqchG0OirArm8JDd3iCIV1LM428STGwFqX7djM+tAZ7E40Us0U3q7vqZAObHhTvKmhS1g0/iOvfELSSlIjHeCX/Rj/OB13lX8IcpG2lI5SgUgXnrBN1mofsD2B1cUuE/6GTv8q1C4ni9HMm+/rF53W4SVfQa5/rue+9u0p0HBq87+49teEvq0I8A83yhZvRFDtw7qOMNkcHIeoVZesBpnMgnhAhzMe3+d9ZthRoMBDm2+6Yoy2ItXIY24noto+Ri9GFpr2WgD5QREerPwWgtD7V+ll/DBZK45zp/1NM65iwZYJ/YN+0QGbrMEpZj0gnkz12r/p5LnSkIMDpKAYB9kmzsGLugp6N7PB0CmSSnpCt3cZxG2n/hfrRFcyf1YcuH8p2bkOkpXGQeQcuY8lN9CmlwCcBkFHbt9nmql4O0jbspwLaCF+XHDe0DNJZ7nKeJnsZTpZYnE+HZdhDYLg1wo2WXQQ5BwisJ9VPwm7EGE3eleyZwpD5Y6FbMeOsI/XEvEpYTMP+t5u3+2xm944U2V1LfgXhRk5oRe9BgtZ/eqa6keoH+CZL+KMyEmIV X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(4636009)(36840700001)(40470700002)(46966006)(36756003)(83380400001)(54906003)(47076005)(450100002)(26005)(426003)(186003)(36860700001)(110136005)(336012)(70586007)(2906002)(86362001)(8676002)(316002)(16526019)(7696005)(4326008)(81166007)(8936002)(6286002)(5660300002)(2616005)(40460700001)(6666004)(356005)(82310400004)(70206006)(55016003)(508600001)(36900700001)(309714004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2022 11:39:09.9921 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5923f9f3-f87a-4c40-1f65-08d9da7724ac X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0152 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 Message-ID: <20220118113850.pCkQFggludN_Ul3bl86EInHMBticPWQY5huxnMkMgKM@z> Currently root table as destination is not supported. The jump action which finally be translated to underlying root table in rdma-core should be rejected. Fixes: f78f747f41d0 ("net/mlx5: allow jump to group lower than current") Cc: stable@dpdk.org Signed-off-by: Xiaoyu Min Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_dv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 8022d7d11f..ec5d1816bc 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -4982,7 +4982,7 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev, const struct rte_flow_attr *attributes, bool external, struct rte_flow_error *error) { - uint32_t target_group, table; + uint32_t target_group, table = 0; int ret = 0; struct flow_grp_info grp_info = { .external = !!external, @@ -5013,6 +5013,10 @@ flow_dv_validate_action_jump(struct rte_eth_dev *dev, RTE_FLOW_ERROR_TYPE_ACTION, NULL, "target group must be other than" " the current flow group"); + if (table == 0) + return rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION_CONF, + NULL, "root table shouldn't be destination"); return 0; } -- 2.34.1