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 BDEBCA0548; Thu, 11 Nov 2021 15:24:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC83541159; Thu, 11 Nov 2021 15:24:01 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2064.outbound.protection.outlook.com [40.107.220.64]) by mails.dpdk.org (Postfix) with ESMTP id DDFB141158 for ; Thu, 11 Nov 2021 15:24:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i0QgzOrRsWXxZpq50G6Vs0TBU0vy9BlkG9Ermd5e6OOb+tzhh7rc9/t3esDMDJaoU9bJH90hceIzjgxi9xtnN574ChZdZ/YeSvA4E8ZaVsT1/UezMnR6eG9h3nAp6CrH7+zfDffcopWB0eK+o2Ap6Z0HurotPK3aCvPaTLXjiPPsy4QuQYXROZhfN9+N8dsEWnh+8tuOZHVaUTF4Rdqa4X98VdoXJmrC/mdEZwpZis+oLEvJEsiDSRqpT2Wbjvm5Ik64x64KGCzb1nsRDmTr6lQ1miAvFle7y24N7UPrKvFse9JuJGTtq6kmBKce1qjAb2KY07ncY+SOGR9y6LbOzA== 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=Uo2Ny4MJUcORz8sdiu7BoUkR+rsAxwMzaZNQzX/OlE0=; b=n+KB7mgh/PiP1xmb/5izty1uBw9Q1cH9ScYXBXcEwwd7uKMmwX0VPkTihHvSuF/MV+JIOBPaFSkNa75hwVbifAOHIaMzi8O+RAkgNkzS2EJhDPiGs8Z671uUG5OvvSKvhX6OlJ/FjLLpxx61TzKYhY8npwPBt2SBKPtwobJGb+CX8n3LW0PnqaUbcu6Xh3o0fPrI6mhYAcLJ4M4O5wxbFS9BqkY954I5LbeTAiumYllccdGdO9cmNAnPAMt4oyc0semDRp7V3Gf1nI9327n9aWU5UbjPC2J+bnwV7rwvhZ8uUTXgIpLDJO4ma54ahjmKYont6qftJ56/KneoD60ylw== 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=quarantine sp=quarantine 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=Uo2Ny4MJUcORz8sdiu7BoUkR+rsAxwMzaZNQzX/OlE0=; b=esH+m6OQtd6z5WUmBdXAaJVltd1VE8f9c2AAv61QePm10kGSmBHAgaGPPc+Ey8nxpk0Use4WXVJDqXHAfZWm4+1CU6bXmD0nV6wMPp36sXdDbXRs8p0JbN3WtJiaX6vsCQQbWug6AdKYoSrWmJviQDZGXrfphOv4lQaINWKIez7KDjdQIUTPX5hJTAkJeKexutwp0auoHHeCZpVCrAe0GfqZIaK8bfj8D+bblTCC9S6N7VpyRfCzGThEyOEoYVo/rRE6kblbuf36r3oW9/GfrwwRQrSIOa6tEL+QgOZAXdaUY22nZnwvFchajKiHnTqoMBhxvA4qyZUjgYBS1nASUA== Received: from DM5PR07CA0081.namprd07.prod.outlook.com (2603:10b6:4:ad::46) by BY5PR12MB4211.namprd12.prod.outlook.com (2603:10b6:a03:20f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.16; Thu, 11 Nov 2021 14:23:58 +0000 Received: from DM6NAM11FT065.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ad:cafe::2f) by DM5PR07CA0081.outlook.office365.com (2603:10b6:4:ad::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Thu, 11 Nov 2021 14:23:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.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 DM6NAM11FT065.mail.protection.outlook.com (10.13.172.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Thu, 11 Nov 2021 14:23:57 +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.18; Thu, 11 Nov 2021 14:23:55 +0000 From: Rongwei Liu To: , , , , Wisam Jaddo CC: , Subject: [PATCH v9 1/5] app/flow-perf: define flow-options as global Date: Thu, 11 Nov 2021 16:23:36 +0200 Message-ID: <20211111142340.2209292-2-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211111142340.2209292-1-rongweil@nvidia.com> References: <6177033.fEpqbVaury@thomas> <20211111142340.2209292-1-rongweil@nvidia.com> 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: 45ca67fd-01f1-475f-6bfc-08d9a51ee63f X-MS-TrafficTypeDiagnostic: BY5PR12MB4211: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:350; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rTRkgAhvymLYMU6LIJ+hvWqDWJtfbaS1YBYJI/i1JZpD8djc9X4RUi0Bu7G6vYBf7Oi6rjdNA7CwrQFYvMM3JlVn4iKeQxgezXOT3rn6/i/KteZvSzIA4KhH4oXVTN9Dq4sAuxa2FLvbL3ix26uugCfQCVP8P94EdRYBphwDvmp3ff0BiRr2oT5bbqEWo6IEbVM8tROHREmP4bAakMnK69zV3cRhrvmUauKgpaBpB+rcoe2URpYWVcsfjncUhIqV7ok3pXq+J3VoKwbtub4yIfd9xjJY7zv8P3+MnVrMMujxlzwgDDY/Bb3wlFV33+G+gWyW1nRN3hDcfm43WogSQbt7jenUdmHOn0RQznsjbXOIWNx/LVOfXjWgFYNdk6bBLWJ2i0Kj3ZvGPs44Dvc8GFBvMmwEaHcUPlaWvpogEmyMRvx6fdUY/ubCY3IMpcswrj+PgIlpivcfX/f2bgEQnmAFXdRPKyc7iL/cWWX6N6HjFILPSJHYePaOvJFaDiJ7LtOZuo7KM8ZjSoUEBmw23iGLc8mMz2sZ+RLC+KKIcbQE1/Mq1af2sNIkWCaDwAH2cG0q6MReehbpCGGgCRMjs5DsHw7V1/f84WM2pfmSF7+v73l7G9rOarabxuFk5C/R5twF3epgu72EZHlj2+EumTMzQtii+8HmRLLGh4zULasT8hlRooQN+up8fQguphKb2phrz7YKDkhPzRg+Io9+sw== 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)(36840700001)(46966006)(6286002)(36906005)(26005)(82310400003)(70586007)(2616005)(316002)(6636002)(1076003)(70206006)(508600001)(6666004)(55016002)(186003)(8676002)(336012)(86362001)(426003)(83380400001)(16526019)(107886003)(2906002)(7696005)(4326008)(36860700001)(5660300002)(36756003)(7636003)(30864003)(8936002)(47076005)(54906003)(110136005)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2021 14:23:57.9144 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 45ca67fd-01f1-475f-6bfc-08d9a51ee63f 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: DM6NAM11FT065.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4211 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 With flow-options defined as global struct, it's possible to use sub-functions to handle run-time options. It's helpful to avoid too many tabs warnings. Signed-off-by: Rongwei Liu --- app/test-flow-perf/main.c | 662 +++++++++++++++++++------------------- 1 file changed, 331 insertions(+), 331 deletions(-) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index c1477b14a1..42d13ec495 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -126,6 +126,337 @@ static struct multi_cores_pool mc_pool = { .cores_count = 1, }; +static const struct option_dict { + const char *str; + const uint64_t mask; + uint64_t *map; + uint8_t *map_idx; + +} flow_options[] = { + { + .str = "ether", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_ETH), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "ipv4", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_IPV4), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "ipv6", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_IPV6), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "vlan", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_VLAN), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "tcp", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_TCP), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "udp", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_UDP), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "vxlan", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_VXLAN), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "vxlan-gpe", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_VXLAN_GPE), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "gre", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_GRE), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "geneve", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_GENEVE), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "gtp", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_GTP), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "meta", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_META), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "tag", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_TAG), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "icmpv4", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_ICMP), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "icmpv6", + .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_ICMP6), + .map = &flow_items[0], + .map_idx = &items_idx + }, + { + .str = "ingress", + .mask = INGRESS, + .map = &flow_attrs[0], + .map_idx = &attrs_idx + }, + { + .str = "egress", + .mask = EGRESS, + .map = &flow_attrs[0], + .map_idx = &attrs_idx + }, + { + .str = "transfer", + .mask = TRANSFER, + .map = &flow_attrs[0], + .map_idx = &attrs_idx + }, + { + .str = "port-id", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_PORT_ID), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "rss", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_RSS), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "queue", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_QUEUE), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "jump", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_JUMP), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "mark", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_MARK), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "count", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_COUNT), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-meta", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_SET_META), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-tag", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_SET_TAG), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "drop", + .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_DROP), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-src-mac", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_MAC_SRC + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-dst-mac", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_MAC_DST + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-src-ipv4", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-dst-ipv4", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_IPV4_DST + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-src-ipv6", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-dst-ipv6", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_IPV6_DST + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-src-tp", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_TP_SRC + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-dst-tp", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_TP_DST + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "inc-tcp-ack", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_INC_TCP_ACK + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "dec-tcp-ack", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "inc-tcp-seq", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "dec-tcp-seq", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-ttl", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_TTL + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "dec-ttl", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_DEC_TTL + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-ipv4-dscp", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "set-ipv6-dscp", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "flag", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_FLAG + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "meter", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_METER + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "vxlan-encap", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, + { + .str = "vxlan-decap", + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_VXLAN_DECAP + ), + .map = &flow_actions[0], + .map_idx = &actions_idx + }, +}; + static void usage(char *progname) { @@ -253,337 +584,6 @@ args_parse(int argc, char **argv) int opt_idx; size_t i; - static const struct option_dict { - const char *str; - const uint64_t mask; - uint64_t *map; - uint8_t *map_idx; - - } flow_options[] = { - { - .str = "ether", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_ETH), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "ipv4", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_IPV4), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "ipv6", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_IPV6), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "vlan", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_VLAN), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "tcp", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_TCP), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "udp", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_UDP), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "vxlan", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_VXLAN), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "vxlan-gpe", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_VXLAN_GPE), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "gre", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_GRE), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "geneve", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_GENEVE), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "gtp", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_GTP), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "meta", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_META), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "tag", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_TAG), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "icmpv4", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_ICMP), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "icmpv6", - .mask = FLOW_ITEM_MASK(RTE_FLOW_ITEM_TYPE_ICMP6), - .map = &flow_items[0], - .map_idx = &items_idx - }, - { - .str = "ingress", - .mask = INGRESS, - .map = &flow_attrs[0], - .map_idx = &attrs_idx - }, - { - .str = "egress", - .mask = EGRESS, - .map = &flow_attrs[0], - .map_idx = &attrs_idx - }, - { - .str = "transfer", - .mask = TRANSFER, - .map = &flow_attrs[0], - .map_idx = &attrs_idx - }, - { - .str = "port-id", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_PORT_ID), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "rss", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_RSS), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "queue", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_QUEUE), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "jump", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_JUMP), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "mark", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_MARK), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "count", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_COUNT), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-meta", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_SET_META), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-tag", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_SET_TAG), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "drop", - .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_DROP), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-src-mac", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_MAC_SRC - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-dst-mac", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_MAC_DST - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-src-ipv4", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-dst-ipv4", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_IPV4_DST - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-src-ipv6", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-dst-ipv6", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_IPV6_DST - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-src-tp", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_TP_SRC - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-dst-tp", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_TP_DST - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "inc-tcp-ack", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_INC_TCP_ACK - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "dec-tcp-ack", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "inc-tcp-seq", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "dec-tcp-seq", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-ttl", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_TTL - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "dec-ttl", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_DEC_TTL - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-ipv4-dscp", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_IPV4_DSCP - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "set-ipv6-dscp", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_SET_IPV6_DSCP - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "flag", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_FLAG - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "meter", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_METER - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "vxlan-encap", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - { - .str = "vxlan-decap", - .mask = FLOW_ACTION_MASK( - RTE_FLOW_ACTION_TYPE_VXLAN_DECAP - ), - .map = &flow_actions[0], - .map_idx = &actions_idx - }, - }; - static const struct option lgopts[] = { /* Control */ { "help", 0, 0, 0 }, -- 2.27.0