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 E414DA00C3; Tue, 18 Jan 2022 12:39:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 818A84270C; Tue, 18 Jan 2022 12:39:13 +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: 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 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