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 7F6CFA0A0C; Fri, 2 Jul 2021 10:35:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D0024134F; Fri, 2 Jul 2021 10:35:42 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2049.outbound.protection.outlook.com [40.107.223.49]) by mails.dpdk.org (Postfix) with ESMTP id AC1444003E for ; Fri, 2 Jul 2021 10:35:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PTu0UB6d9j+s0mZEdtcVp7vfYT47oNX9pcdC4Kph/fn9x+LXa6W94aWKNI07XP6NaTNZZ9qcSw5xgcyRm2ob3+5J3/QO3WcogZYonhCUJUCXYrjTemvh3YKK4hDT2Ih42V60PX4OBuIvnsIBWfCyt+A4lNl+yCOuOskIZLIQq+AOSqjdQZRmUIXCwgH3geth5k79+/ld1A2TfomSoQ9L7M3O/xolYltWcG8Aw86LAuwlO8tbQBAZBl17Y/doPob8rejOy72E5PXFKnhCVGRmKZ8igNbhvCpeR7KGZpkC9sT6pGeoRODfXfJJmb+jUg7UVxEFo1l9o0TdncFZW3Qa7g== 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-SenderADCheck; bh=aOzLmk75uCVR7QoA6feRUZtaXcVgTkpjIVHELgjgZ+U=; b=Eo9zHSKxLwZrbb58NnF9HfN8C5cRO3km4884WSVaa666rc8O5ECv1y2pHuOlbEAL+k5WUMdMgJugTDlPNax7cyDUvthN3wHc6vWI3StACAfMKic38axGVubtAmBMFKtDscDzBDndT3WGPwwyvMTT78rou1hQAUNIsjA1AK1Pnw+5o1bJZpECNp8wHIjD8hbrBSaHUkt0unQhn2FKKwaDE8QzaUHIQu9NMTGlwkrioM48EhWui6OkRdgZ6Ngi1ZmlA6pTRaletGswyzfwapk6rOfUFpeep+jftossveHRA1rtinqKw5WgXGnjOOAtlb3dAnLZdnPoJgTJfYH2xhGQfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=aOzLmk75uCVR7QoA6feRUZtaXcVgTkpjIVHELgjgZ+U=; b=tj6oF9qRxMXeAZ6gTOX9JfuYn2LXc9DZjtMELHDgM94UsvpJaSULC01YTTs3OGrlgKhNx1+8VzVUEZImX1RRb+9Idq7s32qI1RRbpxJ3FC5hPJNBatQjCU2j+SFSTHFWX1vWnHt6mhmXiFaOJps+HIg0TTlIcMqRwCNniuf57tLifRAlkEZRF9THBDvA68LeT10+noQXm/rbezjP94dreAsKRmQzbXxHbjcj6fLSYr3xBd1E2W3IlW+0cK7LTGAKuND8YL3Puqh/uSa7OyFaSGec7L070+C1nH1+EyvPm3+DAO2p4b3jOe84ASvzOBcaQYRBOpI0ZX+96nYWgw00QA== Received: from MWHPR20CA0018.namprd20.prod.outlook.com (2603:10b6:300:13d::28) by SA0PR12MB4349.namprd12.prod.outlook.com (2603:10b6:806:98::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Fri, 2 Jul 2021 08:35:39 +0000 Received: from CO1NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:300:13d:cafe::23) by MWHPR20CA0018.outlook.office365.com (2603:10b6:300:13d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Fri, 2 Jul 2021 08:35:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT044.mail.protection.outlook.com (10.13.175.188) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4287.22 via Frontend Transport; Fri, 2 Jul 2021 08:35:39 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 2 Jul 2021 08:35:36 +0000 From: Xiaoyu Min To: Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko CC: Date: Fri, 2 Jul 2021 16:34:48 +0800 Message-ID: <047f5aa4a26b27f25ad9f5733106c503ccd32f87.1625213344.git.jackmin@nvidia.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1229561-1988-489b-8089-08d93d345f01 X-MS-TrafficTypeDiagnostic: SA0PR12MB4349: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mKvRLrpkXIp5YSKhpwdIBifh/MWthYdIF4jMUmCzNAegE+pChFx6lbqP+Rz64byXbq5tW+CuV3oDBshuQtg4UK4Sji8NzNILTvuDFaluivYPe+RV8JrJlXVCsrTQav7AK7OCN+Fx4XMSw/QbhuWrEy6k0pI/hAtGi+dFPgwmhQeuQQgRPYPWZyEwNo3LL6rJeplSMsGS+KM0mIl14R3bzc8Xh+7I2L3tif3Z7t9Vz42QOXXmLcHIjQK9oDaMZdsxTOLkjMWgrUb/l4fZu6RdEbWyYjzU3EglFmrWl2wV0nCYvmzoYAIKs/gSqtgO+r8LoM2UoyAHfWxSzhAw7w4HXHqrWyl/fTBXcGf30uIMq9ClmMUnukR0IenImimeDFrfmnR6FppZHUiAKHre1E1vr2yA+XzgdtAuYFEBn4rOQD2cDIfI2m7gKJYmifpBXHpAe9xqIUtOQdkRo70OF6sQ/+YC3+vXvX085mRf1rxn2Rr7t0J8P15152aJ7slhxM+SLU0I5DBYmxCWHHfWptP2Q0mhhDztvb9r9++in0Ew3TapNZKpBHO9gDVm8VB/RFR4kf11PQeAp3gO9nDqwSq5lEaMux+P8hQLSsv/BzK+0tcyzDvB/+srlJ0JRoc0N0540UNoUfqw/ubeEcrOwK1RQTzBB274dLGQPC4mcO0WIcZLknj1i4g2WsAXF6yujcnHKi4FqNPTcWnwHyTemPOdmLwbtuC4SQHHd4Ghj9ghBe0= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(396003)(376002)(39860400002)(346002)(136003)(36840700001)(46966006)(110136005)(16526019)(70586007)(478600001)(356005)(186003)(82740400003)(7636003)(70206006)(6286002)(55016002)(86362001)(82310400003)(6666004)(36860700001)(7696005)(47076005)(6636002)(36756003)(26005)(336012)(5660300002)(8936002)(426003)(4326008)(8676002)(2906002)(83380400001)(2616005)(36906005)(316002)(143363002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2021 08:35:39.0084 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1229561-1988-489b-8089-08d93d345f01 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4349 Subject: [dpdk-dev] [PATCH 3/3] net/mlx5: limit inner RSS expansion for MPLS 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 Sender: "dev" If user wants to do MPLS inner RSS and only provides pattern till MPLS without inner items [1], RSS expansion will expand flows into 13 sub-flows[2] which is too many and it impacts flow insert rate, stack usage becomes large as well. This expansion into 13 sub-flows seems not worthy of and it can be significantly reduced (i.e, 7 sub-flows [3]) by user providing at least one inner L2/L3 item [4]. [1]: pattern eth / ipv4 / udp / mpls / end actions rss type tcp udp ip end level 2 / end [2]: eth / ipv4 / udp / mpls eth / ipv4 / udp / mpls / ipv4 eth / ipv4 / udp / mpls / ipv4 / udp eth / ipv4 / udp / mpls / ipv4 / tcp eth / ipv4 / udp / mpls / ipv6 eth / ipv4 / udp / mpls / ipv6 / udp eth / ipv4 / udp / mpls / ipv6 / tcp eth / ipv4 / udp / mpls / eth / ipv4 eth / ipv4 / udp / mpls / eth / ipv4 / udp eth / ipv4 / udp / mpls / eth / ipv4 / tcp eth / ipv4 / udp / mpls / eth / ipv6 eth / ipv4 / udp / mpls / eth / ipv6 / udp eth / ipv4 / udp / mpls / eth / ipv6 / tcp [3]: eth / ipv4 / udp / mpls / eth eth / ipv4 / udp / mpls / eth / ipv4 / udp eth / ipv4 / udp / mpls / eth / ipv4 / tcp eth / ipv4 / udp / mpls / eth / ipv6 eth / ipv4 / udp / mpls / eth / ipv6 / udp eth / ipv4 / udp / mpls / eth / ipv6 / tcp [4]: pattern eth / ipv4 / udp / mpls / eth / end actions rss type tcp udp ip level 2 / end Signed-off-by: Xiaoyu Min --- drivers/net/mlx5/mlx5_flow.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index a13b89e3a7..673e7d55fc 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1671,6 +1671,13 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action, RTE_FLOW_ERROR_TYPE_ACTION_CONF, NULL, "RSS on eCPRI is not supported now"); } + if ((item_flags & MLX5_FLOW_LAYER_MPLS) && + !(item_flags & + (MLX5_FLOW_LAYER_INNER_L2 | MLX5_FLOW_LAYER_INNER_L3)) && + rss->level > 1) + return rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ITEM, NULL, + "MPLS inner RSS needs to specify inner L2/L3 items after MPLS in pattern"); return 0; } -- 2.32.0