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 55078426E8; Sun, 8 Oct 2023 05:11:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 538424067C; Sun, 8 Oct 2023 05:11:40 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2083.outbound.protection.outlook.com [40.107.237.83]) by mails.dpdk.org (Postfix) with ESMTP id E73184067B for ; Sun, 8 Oct 2023 05:11:38 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ObrNeDHwAB5EAyZwrKOKQ3BpJH+lx8u3IGAXPJFB/5/KNmPcmKv5T/rXOXHtIj2IEI+fEdJDelbkQbZlO+jQgNEJ6cFUfnmTlQuKmKSbeGl3ot7nU42f/1P6q1Lm5Bn+TwzQJIOc6Ahvr8QeT/UkBCYmAjfcqIGhEILwoP9aUbBOzkaoVwfMH5mX9yOEqWzxKKqMy+qUZD06WIYykqZ9IdRjw6ZQuvkNPZ1RvO9gKoD+56dHvIwZwstXQZ31MH72TOgIO73sHIJAF/OqNYcKvYH0yhmCnGeinNx4GVDJmAT9eOSxfipEH08ml3gdce2s7JxPSBgGmppO3g3bEbc8GQ== 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=x/cv8PjbJObqrPZ5w1/LmWL2WaxunLNMNaDG/IyiAn0=; b=Gt6q1f7By0Na8gGB1MBVtLHrGiacJ1+2mf35CHluz1d43SmNsOeDbEu4eB6r63fTJ6/PsCfBYG2GosfIfgmxgbuULZt/0QBUQ5VGvy7puvdA5GK6kZ2q5Z/xbuw0epKOUVSCfX8z36MjKg3Eml9EkUNSEq1yHk+65tvkHZnxyWLNOH4haAS8NvsyfqDYVOjZDwJ05R48X/ggLONY8bS29+dXfaUEqYYFckUOsGDtVQRI7jmu6JqhRHtADUTiYYNeA/h+EsRQ+/P+9GFaBLFlP+OqZO2U1BTUegZZ9NzufD+FE279KgJ828k3jYd7VICOm+eJTwPI0cGI33+RzcEYpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=x/cv8PjbJObqrPZ5w1/LmWL2WaxunLNMNaDG/IyiAn0=; b=bmuQeZv4lFc16x+HygrdVj39LJFpyQ+wdpUsGAbbS1hav8/TAVtOhLSouIl4Sfik+wlx257k/3HH+KHWKwOURG9HGa+ogVpurykt5Nw4uFKG7f05/pX/V4f25bbANxaL9FReuztegROzNYs/TN96UmWlNnNl2uxETmqUIoWFe9I2gvJbFF1VcxJX4FoKzEDlkhzm0xbOoEq9iJJMAWXOJx7Qp+DCXdWozOZJPZlyjWhPu4VqINclIs6g3OQx8l4XYNSpmVV8LCNyGD7BlXc/gaFMrdpyckQUZly0XvyE4R2CZHSMLIZoiU44Vkx6ETgS+DcRM+yri8uCxxUJzBkrOA== Received: from MW4PR04CA0183.namprd04.prod.outlook.com (2603:10b6:303:86::8) by BY5PR12MB4903.namprd12.prod.outlook.com (2603:10b6:a03:1d6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.43; Sun, 8 Oct 2023 03:11:34 +0000 Received: from MWH0EPF000971E3.namprd02.prod.outlook.com (2603:10b6:303:86:cafe::51) by MW4PR04CA0183.outlook.office365.com (2603:10b6:303:86::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36 via Frontend Transport; Sun, 8 Oct 2023 03:11:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by MWH0EPF000971E3.mail.protection.outlook.com (10.167.243.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.14 via Frontend Transport; Sun, 8 Oct 2023 03:11:34 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sat, 7 Oct 2023 20:11:19 -0700 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_GCM_SHA384) id 15.2.986.41; Sat, 7 Oct 2023 20:11:16 -0700 From: Haifei Luo To: CC: , , , , , Dariusz Sosnowski , Suanming Mou , Aman Singh , Yuying Zhang , "Matan Azrad" Subject: [PATCH v4 4/5] app/testpmd: support for NSH flow item Date: Sun, 8 Oct 2023 06:10:28 +0300 Message-ID: <20231008031029.30850-5-haifeil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231008031029.30850-1-haifeil@nvidia.com> References: <20230925080746.16438-1-haifeil@nvidia.com> <20231008031029.30850-1-haifeil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E3:EE_|BY5PR12MB4903:EE_ X-MS-Office365-Filtering-Correlation-Id: f4c9143c-07ff-46e9-4b0c-08dbc7ac4744 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X/bSCWI4hM5cfVGmQh8vx4Koi9by0yrutHMD3YifgfK+Oihkoza1krSt3rIeW+s0YhCOAW5GkgrQi6WQfOI1Ki3WsOEYaepovD2NoVJJRe4da8dRvnUr4rx5xiFWqYw1e/kRfihOUmDIFRVmCv1ZOCODzpfHLuJ4u37MYpZfJAkOedN5PwPzHGsSVXaBuY6PQjDUScqMzPbYBq58uUjVKWjnLLA2KINtXw0573yeZ4nK6NQSx8RfDpu3JufyPIeQzV9OhWswxwCAvihV3kgxefvfsEXx7IlhgCqUyL3Ao58iy9ff5iAwVysuoN8HpdzkS4uWasAiDplict4ie+Gn+W+NqWDqqydIMgcGOKJyxDuRZPwXF8FvxcmquhalwKVwv7m/IV92Y9pyK92wocQWGatRoBdzB80v60c/dWWVfIvrZ6QhUHVq40Bpzvay9osXB/tBL8AJZFTHwub92W5G7cXkK4PY45r7+Q6pz7Fy6MHeQ0HPt3oey9xx83cUPnunTJWV52O5kcLCU9z4qiQOu+MDjoAU31HBd6xNNHQwEGg4d2w5mFkTBhmUwhLPqKutENh0ckudpks8UWaqkDmtuixnMuKHCJU9VyBgrsXepMBR6LvyGqqyO50THLrF38E36UJDn00CEGhTMnAL+ycGYryD/2pnYiBBaOEJEwcKrkQYRxgwy93i05ZGvpaFoLknUa1N0LD/ZwYiRgLOZ2QXWw== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(376002)(396003)(346002)(39850400004)(136003)(230922051799003)(186009)(1800799009)(82310400011)(64100799003)(451199024)(46966006)(36840700001)(40480700001)(55016003)(83380400001)(107886003)(1076003)(2616005)(336012)(426003)(26005)(6286002)(16526019)(47076005)(36860700001)(70206006)(70586007)(54906003)(316002)(6916009)(8936002)(8676002)(4326008)(5660300002)(41300700001)(7696005)(6666004)(2906002)(82740400003)(478600001)(36756003)(356005)(7636003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2023 03:11:34.5611 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f4c9143c-07ff-46e9-4b0c-08dbc7ac4744 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E3.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4903 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 Add support for item NSH. The CLI is: nsh Example: flow create 0 transfer group 1 pattern eth / ipv6 / udp dst is 4790 / vxlan-gpe / nsh / eth / ipv4 / tcp / end actions port_id id 1 / end Signed-off-by: Haifei Luo Acked-by: Dariusz Sosnowski Acked-by: Suanming Mou --- app/test-pmd/cmdline_flow.c | 16 ++++++++++++++++ doc/guides/nics/features/mlx5.ini | 1 + 2 files changed, 17 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 8a4e06c50a..84de3a2506 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -526,6 +526,7 @@ enum index { ITEM_IB_BTH_PSN, ITEM_IPV6_PUSH_REMOVE_EXT, ITEM_IPV6_PUSH_REMOVE_EXT_TYPE, + ITEM_NSH, /* Validate/create actions. */ ACTIONS, @@ -1563,6 +1564,7 @@ static const enum index next_item[] = { ITEM_AGGR_AFFINITY, ITEM_TX_QUEUE, ITEM_IB_BTH, + ITEM_NSH, END_SET, ZERO, }; @@ -2083,6 +2085,11 @@ static const enum index item_ib_bth[] = { ZERO, }; +static const enum index item_nsh[] = { + ITEM_NEXT, + ZERO, +}; + static const enum index next_action[] = { ACTION_END, ACTION_VOID, @@ -5846,6 +5853,15 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ib_bth, hdr.psn)), }, + [ITEM_NSH] = { + .name = "nsh", + .help = "match NSH header", + .priv = PRIV_ITEM(NSH, + sizeof(struct rte_flow_item_nsh)), + .next = NEXT(item_nsh), + .call = parse_vc, + }, + /* Validate/create actions. */ [ACTIONS] = { .name = "actions", diff --git a/doc/guides/nics/features/mlx5.ini b/doc/guides/nics/features/mlx5.ini index c0e0b779cf..fc67415c6c 100644 --- a/doc/guides/nics/features/mlx5.ini +++ b/doc/guides/nics/features/mlx5.ini @@ -82,6 +82,7 @@ mark = Y meta = Y meter_color = Y mpls = Y +nsh = Y nvgre = Y port_id = Y port_representor = Y -- 2.27.0