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 D6065A0C43 for ; Wed, 12 May 2021 08:42:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6CBA410E3; Wed, 12 May 2021 08:42:51 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2068.outbound.protection.outlook.com [40.107.93.68]) by mails.dpdk.org (Postfix) with ESMTP id DDB064003E; Wed, 12 May 2021 08:42:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YvRxr5ecDBWL5Ueh1ZNHNzFuLxO4ENaOE0ZYuxl3hf1tz7eXtnNnnRs26YkV6Fy7fLYF0m4RaiqPcDe6kOB6nm2ARikun1VbQL3+/aAgiGMM3pO/ViUQYqKzcTsRSroTeyk1WlG3Ky5lpsDZV2GOwdAfFl3Y+Hj4DckWVklVwC5wD0fELcBo1AJBSd/a2/w+0WjQ6owQ7jY8HXP0c0mELV709xm3kPtkOtLO0SsqfnTFtPVNdvSjTCitnsFTkPRMvLJLUU7Ah6G/tJDgX1QJcV6jPBP+8mohB5mI6TQQ4ac0slDaue3BEoeFZheHpiYROS/9dXYitiKM1gL5qW+N2g== 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=qEjNWvgLhPMgmkHEyJLUNadupxJaXraT7Qwaq+APr9E=; b=kB9fFDQEwvbKcyB1HJK+koVMtUSM876F5jnUSnPrW5aOOM1D2cM1+V8Y3+hjSRj6ywHIjPPbuLvmyV3B/i7JV+eZtxnq0fkE5oztTRerSGrGgsn7BUQY9rRsoq2rIErkeCnNQekbXjY0tQYVYmleZUskgSrdzCqHrl2VFTECpRBKk7XAh6w2npm7CSkA3c9gPSGcQiVkfuVvCO8Kn5SLpi8Sb6soFpBEEZ1SFtzBP9yKFVXdzmSdziylUz0P5ij1Zh9crO8A7atv7Fvw4CBbbt7CFMc5GpiXyFHFACkUvgT0fQlMviPLLh1WF2XFGVTUEmpdz9xgeP0Py1+mZE2NWg== 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=qEjNWvgLhPMgmkHEyJLUNadupxJaXraT7Qwaq+APr9E=; b=L8vUHZ0+QXZTYLJ5l8JJkv3+8GNLov1U6/NG1+Hidtmz9lsC+Et68Hjf8B+USQ53lZDqRJNXAg4l8hyAXzYQViOt/6QsmB6FIN1iA/1/y9OlBi83JQnAvPfmOIXnbAQhu6p9rIWNSp7lCYX1uJkCgWyKbrBHWoQPqHNKihglHtKgO6Z6l6Z32xNVR11EgQCpW5JIBoWtA4N2uDzQeJgtO0lPIxdXL0erOKs0lrp9gHVf4OB6BQnWb71+pNS8AtqkG4jmyGsFaCT0ygZ3v1rOrU3HIBXODz0YxMwk1T7WEDMjB1eqXXIjlejfPrpd7aEh3DrNRxLauJcCNirvPQxzWQ== Received: from MW4PR04CA0383.namprd04.prod.outlook.com (2603:10b6:303:81::28) by BN8PR12MB2961.namprd12.prod.outlook.com (2603:10b6:408:65::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Wed, 12 May 2021 06:42:48 +0000 Received: from CO1NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:303:81:cafe::51) by MW4PR04CA0383.outlook.office365.com (2603:10b6:303:81::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Wed, 12 May 2021 06:42:48 +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 CO1NAM11FT014.mail.protection.outlook.com (10.13.175.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4129.25 via Frontend Transport; Wed, 12 May 2021 06:42:47 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 12 May 2021 06:42:45 +0000 From: Jiawei Wang To: , , , , CC: , , Date: Wed, 12 May 2021 09:42:31 +0300 Message-ID: <20210512064231.16648-1-jiaweiw@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 74fc6de7-a5a6-408a-1213-08d9151127f7 X-MS-TrafficTypeDiagnostic: BN8PR12MB2961: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1227; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FRzeqUpFoqWov4eJIm9tIl/ezkSLBv4IOKryE+W53IUYu+f9LstiNRj1y8Fr465xLCVQpsrDtfmn2vNJD6ycLVr4s04lATzrT/tKAasCb7XTnhmG0Vekc+/Yf+w6UNBtxodPOPtGzndAo8zgT1lhTcNF3SijukaIf/dgCDIyC3M5VYDIyoO3+jgr8LC6tDfuXI6qdkajO2vRwtxCE1HdXEh/SzgUfeoO1JuGgMSp7S5QPyVefhRBwQ/9+lnmk/nyjT7bNfm0iM95NyLqRWxCml4lj4tRZ+JU07FeeRh8JyuluAnaDnVqkuLiI0l2iRp9HQIwlBKrUpoaR9deeESDX/Q7cDHUjzKi0ZpmM1/ELQdGIG0MLQmf0pwxG734+GQpxXR4AbwC9fXxDCh+cCPJ3FmcoGhDd57KOPGxVrMaoEZverwKA7FqqspwRmiA4yf0BTxMevFZeTADbtAIcTR3vLILJ19vY1rWOVPGnDU8AML1VNZJwuubE6CylslBPNpupnnG3zWMYvq+EN/cre8kFeH9AkMn9J2KUQDaKlXE/kNWBmrFc9dLDAV6pBFFkYqnkEXgI547NaOUSnixMliH/A5MJyznHICXAwl4uC6PpXSeEnKDfVrUpwdVvHQeybMSMImISSRcogQgYncQUj5oahSYSsFsIo25W74Lbfz/m8g= 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)(136003)(376002)(39860400002)(396003)(346002)(46966006)(36840700001)(86362001)(2906002)(47076005)(336012)(7636003)(83380400001)(36756003)(6286002)(70586007)(70206006)(36906005)(8676002)(55016002)(36860700001)(356005)(82740400003)(82310400003)(426003)(4326008)(110136005)(1076003)(478600001)(5660300002)(16526019)(7696005)(316002)(186003)(6666004)(26005)(2616005)(54906003)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2021 06:42:47.7667 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 74fc6de7-a5a6-408a-1213-08d9151127f7 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: CO1NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB2961 Subject: [dpdk-stable] [PATCH] net/mlx5: support RSS expansion for NVGRE 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 Sender: "stable" Currently RSS expansion only support GRE and GRE KEY. This patch add RSS expansion for NVGRE item so PMD can expand flow item correctly. Fixes: f4b901a46aec ("net/mlx5: add flow GRE item") Cc: stable@dpdk.org Signed-off-by: Jiawei Wang Acked-by: Xiaoyu Min --- drivers/net/mlx5/mlx5_flow.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 32634c9af7..73cc9acbd7 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -407,6 +407,7 @@ enum mlx5_expansion { MLX5_EXPANSION_VXLAN, MLX5_EXPANSION_VXLAN_GPE, MLX5_EXPANSION_GRE, + MLX5_EXPANSION_NVGRE, MLX5_EXPANSION_GRE_KEY, MLX5_EXPANSION_MPLS, MLX5_EXPANSION_ETH, @@ -465,6 +466,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { (MLX5_EXPANSION_OUTER_IPV4_UDP, MLX5_EXPANSION_OUTER_IPV4_TCP, MLX5_EXPANSION_GRE, + MLX5_EXPANSION_NVGRE, MLX5_EXPANSION_IPV4, MLX5_EXPANSION_IPV6), .type = RTE_FLOW_ITEM_TYPE_IPV4, @@ -487,7 +489,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { MLX5_EXPANSION_OUTER_IPV6_TCP, MLX5_EXPANSION_IPV4, MLX5_EXPANSION_IPV6, - MLX5_EXPANSION_GRE), + MLX5_EXPANSION_GRE, + MLX5_EXPANSION_NVGRE), .type = RTE_FLOW_ITEM_TYPE_IPV6, .rss_types = ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 | ETH_RSS_NONFRAG_IPV6_OTHER, @@ -526,6 +529,10 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = { .type = RTE_FLOW_ITEM_TYPE_GRE_KEY, .optional = 1, }, + [MLX5_EXPANSION_NVGRE] = { + .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH), + .type = RTE_FLOW_ITEM_TYPE_NVGRE, + }, [MLX5_EXPANSION_MPLS] = { .next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4, MLX5_EXPANSION_IPV6), -- 2.18.1