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 68E9345A2C; Wed, 25 Sep 2024 20:07:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDC0740669; Wed, 25 Sep 2024 20:06:30 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2081.outbound.protection.outlook.com [40.107.223.81]) by mails.dpdk.org (Postfix) with ESMTP id 6338540647 for ; Wed, 25 Sep 2024 20:06:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ys9tmLRftfvrPs9fuspY10jIbqvaG1GUd3TcvsDqJEt14WSOCzoFhqwnS0UizIIknn08DZ8JMvzXI1rn/WKdulyMcgvCp751LFwVr3/h4wZOcdig3Nsw+DInPZH9sDtBbVctewI9ydorcRT1GkHcviQUxlVDbvInm33bCoZwYt4k7kOkn2OpvWvcr2KPApjAHflJvWY5pqy4H2cjpvTbVRgCEBTMAfUrB3E21LQ39AKLyg03zqiuj8MBMtheo+76LBm9wdrPd1gFEZ66Ll9qbFCuPdNUL18vlsGRPo6Zv1fByJHnhquD6JDoC/2EHceXU7pILHZDDeiAlFwjKJYFVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=wUuMvU/1RLbkVRZP4ht+sXLs/I5jWOIWsLmxcaI63YI=; b=rCsbnal/4e0d3E7fGTfzOsWA8ZTbg7zYwl8tF7I95yrnQNqrSPH0OP6ZEZgDSu+IU4SKHZO0ft5krbeuuGzJnH4Oto/dYdNewCV7OY5Gq9Ohj2WNWaBYviOmqQ9jH3PpkF9FOcvTc5bttJdQwGvlDCM1ivVpKJ+n9yAE9MMqo6Jk0uTFbDCKw5J1n3hId+DnnM6z1cZbAySSxYWZ2W8tpbPUtGwlWsN0nwF+rk0A2+0BpNABnzQ4XuER7Gwd3eBG+ArkUGI1o/k0mA8IQxiUWJLSYRVXF3TP/VsnM558dv04or/LgBu6aTM0NKge7KUSgdZLWDMqw8PEZWD++8/v7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (0) 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=wUuMvU/1RLbkVRZP4ht+sXLs/I5jWOIWsLmxcaI63YI=; b=dg+ZfDIB+qAITtsR4/1LFCdrd0E8BkCok/eM48U0HBky2iHc1PfRGbQ8zwhQfBMt4tDi5aCLI6snUzkxUyBXeT+Wu8QjBQ1mh58/RRHYOSfv2obVnGFFwawYmyhq7tFfMhlaym/lUr4YZdKH7wBXJyHuH8FkA0qAN5yfFVgs3dfu5NCAP02BTQrZYWg1pU7zOeOZdxbYmTuPjpwML5GPJMyGvda80DTcgs79tv7J6ISzHs3IEq4Eqfo2Ggl1Z+WLxgisfUU44daWJffwQpubW8O79TRcojjKfaoxPS7wcoPt2ldelxzGury0OejmV/m62oV8ipd8xzLY5qLY+QQgoQ== Received: from BYAPR02CA0043.namprd02.prod.outlook.com (2603:10b6:a03:54::20) by SN7PR12MB7299.namprd12.prod.outlook.com (2603:10b6:806:2af::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Wed, 25 Sep 2024 18:06:21 +0000 Received: from CO1PEPF000075F2.namprd03.prod.outlook.com (2603:10b6:a03:54:cafe::14) by BYAPR02CA0043.outlook.office365.com (2603:10b6:a03:54::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.17 via Frontend Transport; Wed, 25 Sep 2024 18:06:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000075F2.mail.protection.outlook.com (10.167.249.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:21 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 25 Sep 2024 11:06:05 -0700 Received: from pegasus01.mtr.labs.mlnx (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.1544.4; Wed, 25 Sep 2024 11:06:03 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 6/7] app/testpmd: add jump to table index action Date: Wed, 25 Sep 2024 21:05:31 +0300 Message-ID: <20240925180532.3958656-7-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 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: CO1PEPF000075F2:EE_|SN7PR12MB7299:EE_ X-MS-Office365-Filtering-Correlation-Id: 7466f566-da1f-4fd2-2bd0-08dcdd8cc2de X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?bpGfrmB6DeTqKVDXGkkVEnCCzqDvhRVfo+0WdI3aKMrwX8GeEXGIgI27/XEU?= =?us-ascii?Q?AYayK9XDl0clrowAxKz+sNq1MIO/PSMgUI1ibDCbLJObOWsnyoGKktTDZdfJ?= =?us-ascii?Q?0YiDes3m28SnKtGbpWiaujEdf7D/1Kt1cxvAWZ6BnZ42fFXKR+hBDRGMcSuC?= =?us-ascii?Q?l9Uwk9RtO+qyof8vfGYjuStR5tO/aDIuNvvjzRu9btjl1Yde09O4onGD1Bp9?= =?us-ascii?Q?xPs3M0rsa6Pvxk5WyDzuLmtO2Wj8MIYMltl4wRL+kLT+1lwG7BXbZuy6TtDZ?= =?us-ascii?Q?On/mav/ApvOVR5OUxOweAe11y0cNHBJEvi642PXcGFlM/Ywp5rClYuaVZt6x?= =?us-ascii?Q?3qZm9vw2pSvWxNfVmYjzRvyT5NmikAdA1+6AwqfncBRE4KW6yV9N+raKot3y?= =?us-ascii?Q?QSBGGjliJeP9PvoL2uQO4ikqM735/QHzPL3MND6D+uGZPgjciVGHgmOfgd7z?= =?us-ascii?Q?8hS5meLPFHdKMrCO7N3AAAXEsyI31VPGny9s2kR3DesB6HnECMSk+S5g7IiA?= =?us-ascii?Q?O1T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QXkREcUNpf6c?= =?us-ascii?Q?l396QeYxfzVsJiWUCgQaHgcAFFKqReEO?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:21.3330 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7466f566-da1f-4fd2-2bd0-08dcdd8cc2de 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000075F2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7299 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 a new command line options to create the RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action from the testpmd command line. flow queue 0 create 0 template_table 0 pattern_template 0 actions_template 0 postpone no pattern eth / end actions jump_to_table_index table 0x166f9ce00 index 5 / end Signed-off-by: Alexander Kozyrev --- app/test-pmd/cmdline_flow.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 65030936d2..d150f6cca8 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -784,6 +784,9 @@ enum index { ACTION_IPV6_EXT_PUSH_INDEX_VALUE, ACTION_NAT64, ACTION_NAT64_MODE, + ACTION_JUMP_TO_TABLE_INDEX, + ACTION_JUMP_TO_TABLE_INDEX_TABLE, + ACTION_JUMP_TO_TABLE_INDEX_INDEX, }; /** Maximum size for pattern in struct rte_flow_item_raw. */ @@ -2326,6 +2329,7 @@ static const enum index next_action[] = { ACTION_IPV6_EXT_REMOVE, ACTION_IPV6_EXT_PUSH, ACTION_NAT64, + ACTION_JUMP_TO_TABLE_INDEX, ZERO, }; @@ -2686,6 +2690,13 @@ static const enum index next_hash_encap_dest_subcmd[] = { ZERO, }; +static const enum index action_jump_to_table_index[] = { + ACTION_JUMP_TO_TABLE_INDEX_TABLE, + ACTION_JUMP_TO_TABLE_INDEX_INDEX, + ACTION_NEXT, + ZERO, +}; + static int parse_set_raw_encap_decap(struct context *, const struct token *, const char *, unsigned int, void *, unsigned int); @@ -7597,6 +7608,29 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct rte_flow_action_nat64, type)), .call = parse_vc_conf, }, + [ACTION_JUMP_TO_TABLE_INDEX] = { + .name = "jump_to_table_index", + .help = "Jump to table index", + .priv = PRIV_ACTION(JUMP_TO_TABLE_INDEX, + sizeof(struct rte_flow_action_jump_to_table_index)), + .next = NEXT(action_jump_to_table_index), + .call = parse_vc, + }, + [ACTION_JUMP_TO_TABLE_INDEX_TABLE] = { + .name = "table", + .help = "table to redirect traffic to", + .next = NEXT(action_jump_to_table_index, NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump_to_table_index, table)), + .call = parse_vc_conf, + }, + [ACTION_JUMP_TO_TABLE_INDEX_INDEX] = { + .name = "index", + .help = "rule index to redirect traffic to", + .next = NEXT(action_jump_to_table_index, NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump_to_table_index, index)), + .call = parse_vc_conf, + }, + /* Top level command. */ [SET] = { .name = "set", -- 2.18.2