From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 956ADA04AB; Sun, 30 Aug 2020 13:20:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A04191C0CD; Sun, 30 Aug 2020 13:16:32 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00075.outbound.protection.outlook.com [40.107.0.75]) by dpdk.org (Postfix) with ESMTP id 27E291C0B3 for ; Sun, 30 Aug 2020 13:16:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cICPl26hLhmt1X2xd94li93UpfXOZRL6CNqOSP8QkYL+k8FDXzzkJfX7qVWp8Ip7XxbZGtFh9Oo1la4n7xzygOnuAVvbOdfs5q+O36jCNf2oIkQF2t3qjsu4g7uL2/6Wao6sdbQavyEdByCrSyO0Rg0L6DabUm5XdCw88U6caYhFilHXfRZ8/jxqG0X2QZFztYcmkcKiW4X7SbmE+3Iigy8eiSDLgj/0Jgx1LThYIl9IG4NVJDTJHcFxvVtdfdMrDl37B14yYBrD4pSI8LBiPJ7hXqxfLvR+Saff14fyqYqdm7hIDp3CBQTWnHk6s3cdU2Ty/Sjd+QjCuMsWaDrM5w== 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=yNWPSh6zN8dH9Uqc5XMhLuiPgBkNNk3pZkF8p2EBYbw=; b=afaAoM7+0nE2dJ7zslqpwTHxBZW0Y9dMsorb6iXT4gQA2+zDnIqbJMTicdPwvVBwONiQD0SOM/nzz1RAj4kJxd6SDSyjM8xKeYfFFB+qv36oaMm+H2l/IAvAQftXc8SH9EZGG9htaAD52R1DD0R2yc42irmyJo/AFCiiCgLoS8mePqvzBa2pH64WBspFnuWh9nfMSpcF5qlxwsvJ6h9b+vzqFx/eAwu8h/wHg9OHxyxnfe11VvR4nEBBFG0dTyADTykT2plFzgtOnBwLIpZO/6/JX5XSy/9rvfXhL+dwgpn1vz1Nd90UaKH518YK2l8dMbxlSXxMhojoqyX4NSnoIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yNWPSh6zN8dH9Uqc5XMhLuiPgBkNNk3pZkF8p2EBYbw=; b=qUt2gLL65dwIvWeC9edJRXhhmPlzPzQ5LP/PPaiymHSJgUimsgAcBdO/ymNRsStOGn9GiR1AbFU5qCVaPrDV6npljIeNXNjv+RH2geTY8oBDHAZ48KhVj9QTDgAwjxDpt70WKeNxjRrtwnf71bCtiH2zdB8xP621IAXVjvI4aGY= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB6610.eurprd05.prod.outlook.com (2603:10a6:208:12f::18) by AM0PR0502MB3762.eurprd05.prod.outlook.com (2603:10a6:208:1b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.21; Sun, 30 Aug 2020 11:16:27 +0000 Received: from AM0PR05MB6610.eurprd05.prod.outlook.com ([fe80::4c8a:9848:2e2a:3598]) by AM0PR05MB6610.eurprd05.prod.outlook.com ([fe80::4c8a:9848:2e2a:3598%6]) with mapi id 15.20.3326.025; Sun, 30 Aug 2020 11:16:27 +0000 From: Wisam Jaddo To: dev@dpdk.org, thomas@monjalon.net, asafp@mellanox.com, akozyrev@nvidia.com, akozyrev@mellanox.com, arybchenko@solarflare.com, jackmin@mellanox.com Date: Sun, 30 Aug 2020 11:15:36 +0000 Message-Id: <20200830111544.4190-6-wisamm@mellanox.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200830111544.4190-1-wisamm@mellanox.com> References: <20200830111544.4190-1-wisamm@mellanox.com> Content-Type: text/plain X-ClientProxiedBy: AM4PR05CA0008.eurprd05.prod.outlook.com (2603:10a6:205::21) To AM0PR05MB6610.eurprd05.prod.outlook.com (2603:10a6:208:12f::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (37.142.13.130) by AM4PR05CA0008.eurprd05.prod.outlook.com (2603:10a6:205::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3326.19 via Frontend Transport; Sun, 30 Aug 2020 11:16:26 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [37.142.13.130] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: febc4efe-3947-4c7c-b201-08d84cd6231c X-MS-TrafficTypeDiagnostic: AM0PR0502MB3762: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:813; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0p+wQQ/Es5eYAEQMlZrxXBdqGcIhn6T85hn0/vVAEq8e7GzLZ89sZeyXb2qxA5StYpjcjdgY8px/RFT+NKELm7uCCb/gRrxg/XbaY1Z8/JbSN+8Dc+nekMDvu8NXpRZfCm45huuDVyVRRoZhYcUBzCyQ1p8Ufgp9YAvbvw0hTIG1UZKjUGN0GJL787IoT/O2Y+QQ7gHAexR7xQj+9QVwCxmLBjXPbJ2u3Tb4PHn2lgCjN5hQieYOdE5K07AoFsZuf9/27yQ3CaHpC4hNCmPojKHNl7rwTJ5dYYcmlF2aHhFKAoC2v2fV49HJg2GIHnId X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6610.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(136003)(39860400002)(376002)(346002)(478600001)(316002)(5660300002)(8886007)(2906002)(6636002)(86362001)(36756003)(6666004)(1076003)(55016002)(8936002)(26005)(2616005)(7696005)(66946007)(66556008)(52116002)(16526019)(8676002)(186003)(956004)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1TgFWK6HjtCo+edIP9DEPAvnizMpgc1iWnU7yc7IE29/AWcZFg4Qkf5MjaaHu3EBU6ElCUhrLjSXCldAHQ7fwA5a8tvuRFGL8j/ImQA0TkuABBA7Dqz/65T6dN7+HgjKthF0pox/rpQoprjk6cRqU1il7r5zu2kP+tNUadp46J/SqzztJrKnhnzBN/xHzop0ZR8Ox+150QxstlXMX2j+IU5EPNyteHu+nrbH1CITXpwp8HtdEx4/AAKfWxYOHFlEfdyf642vA4lYayQKYQPhpoFja6Cw9ciRIKfL+tK6qstrUImPo9FFPDMViYcv29p6efWxYiCM+JJTQ3F+kRSS5vojnAwjdYFCk5fyeCsrou4rfgUVqtkQApIH7YJ6lOmbzydB0jIypFPBz6bpreN1I00w8tt6cN0ivM51YwsJX1hFpVavOmUwzsX+KaxrayKUoMq0PROElYCjnodqGxLnF/pEnHj1LXcd+3FdmCOOAxBGddIVYZhbm22CggZro8phMMGS4YrfCOFDwmzPsZt5pHLo/TDrTxGxiUFvctcOVvXYFFOu9K+EVYx0aubobJCoKKwWbGD9JZqieAZ7cO1cyI8jS0ec3g8mNh85xLOYTD/rBXDZQwPN0QKL7OPnZqmYQXNwxKsQOWRPf6l1JLkhpQ== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: febc4efe-3947-4c7c-b201-08d84cd6231c X-MS-Exchange-CrossTenant-AuthSource: AM0PR05MB6610.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2020 11:16:27.1039 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: R0FmaBj0jGhpMdw1YvULtaJZV8YptdvpNevyAaX5HzHxuPGeq/zSurA4P9xIQC/mFJ4y5tDEIqC7HW224RNRCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3762 Subject: [dpdk-dev] [PATCH 05/13] app/flow-perf: add flag action support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Introudce flag action support to flow perf application. Signed-off-by: Wisam Jaddo Acked-by: Alexander Kozyrev --- app/test-flow-perf/actions_gen.c | 14 ++++++++++++++ app/test-flow-perf/main.c | 10 ++++++++++ doc/guides/rel_notes/release_20_08.rst | 1 + doc/guides/tools/flow-perf.rst | 3 +++ 4 files changed, 28 insertions(+) diff --git a/app/test-flow-perf/actions_gen.c b/app/test-flow-perf/actions_gen.c index 7e0637595a..9fe11abc94 100644 --- a/app/test-flow-perf/actions_gen.c +++ b/app/test-flow-perf/actions_gen.c @@ -428,6 +428,14 @@ add_set_ipv6_dscp(struct rte_flow_action *actions, actions[actions_counter].conf = &set_dscp; } +static void +add_flag(struct rte_flow_action *actions, + uint8_t actions_counter, + __rte_unused struct additional_para para) +{ + actions[actions_counter].type = RTE_FLOW_ACTION_TYPE_FLAG; +} + void fill_actions(struct rte_flow_action *actions, uint64_t *flow_actions, uint32_t counter, uint16_t next_table, uint16_t hairpinq) @@ -482,6 +490,12 @@ fill_actions(struct rte_flow_action *actions, uint64_t *flow_actions, .mask = FLOW_ACTION_MASK(RTE_FLOW_ACTION_TYPE_SET_TAG), .funct = add_set_tag, }, + { + .mask = FLOW_ACTION_MASK( + RTE_FLOW_ACTION_TYPE_FLAG + ), + .funct = add_flag, + }, { .mask = FLOW_ACTION_MASK( RTE_FLOW_ACTION_TYPE_SET_MAC_SRC diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index 1f693d4ed1..ae0d1a3be5 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -170,6 +170,7 @@ usage(char *progname) "ipv4 dscp value to be set is random each flow\n"); printf(" --set-ipv6-dscp: add set ipv6 dscp action to flow actions\n" "ipv6 dscp value to be set is random each flow\n"); + printf(" --flag: add flag action to flow actions\n"); } static void @@ -465,6 +466,14 @@ args_parse(int argc, char **argv) .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 + }, }; static const struct option lgopts[] = { @@ -522,6 +531,7 @@ args_parse(int argc, char **argv) { "dec-ttl", 0, 0, 0 }, { "set-ipv4-dscp", 0, 0, 0 }, { "set-ipv6-dscp", 0, 0, 0 }, + { "flag", 0, 0, 0 }, }; hairpin_queues_num = 0; diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index 7c9d508a07..eed3900a8c 100644 --- a/doc/guides/rel_notes/release_20_08.rst +++ b/doc/guides/rel_notes/release_20_08.rst @@ -281,6 +281,7 @@ New Features items matching as well. * Start supporting header modify actions. + * Start supporting flag action. Removed Items diff --git a/doc/guides/tools/flow-perf.rst b/doc/guides/tools/flow-perf.rst index e225550e40..69cdd1b222 100644 --- a/doc/guides/tools/flow-perf.rst +++ b/doc/guides/tools/flow-perf.rst @@ -303,3 +303,6 @@ Actions: * ``--set-ipv6-dscp`` Add set IPv6 dscp action to all flows actions. The dscp value to be is random each flow. + +* ``--flag`` + Add flag action to all flows actions. -- 2.17.1