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 33A81A04AB; Sun, 30 Aug 2020 13:23:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 194C91C139; Sun, 30 Aug 2020 13:16:42 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00047.outbound.protection.outlook.com [40.107.0.47]) by dpdk.org (Postfix) with ESMTP id 06F001C10C for ; Sun, 30 Aug 2020 13:16:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b3gNXzCXpt2BO0Y+5DfEqTUFLoPmLzqHcL427PH11HvzY5fuQreLbucXJzsNzBf7GrVIqVoReS8yt2sXNn3Eoozwfling2uTAX6Ieo+6bIcpIeWFu24dFe9uZWRruA+FP8e+xOPF6r6SkprcisU/m8y8HA+gPQv7Ftx/wqMR2UkLhHsQkMj+Wss4v6815jKiW8zWDWzoHNsm0JwxashYKXR2qu2Mf0x3fb7AEfrK26jJIbtsLi69X5KtkryJLcWVybw2vqsw636cWrh1QBRqCyAatnExw9ruCk/RHMrI53g2+1TZv/ozBuBz/N4ml7eRbVfRg6Jm8TtuRgdDUVQ+Rw== 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=86raxxI161eXQOspVivZQi9u89ADDf4VhPNkmqnd2+0=; b=ZbRDCYQ5fT6WSdS0xehIxFFpyDSKCl7As8qhwiYauIvlxkSN418TIxhp19xvCj6VExE/Niv0OYOMXEUe4cr+Zd2nAfG425OdzFwzloM/2anGv8RtWbqnBsa2VJXWet86hLzOjufvodVGmABfftojl1/8J8RHlRYfyUCa5J4ztHsPYOwoHcmj6qTuVPT3VX2RGASTOhtLmG9YFS9r/1efiMkWuWgITdS2P6/VPUzYQQaHBicIA5vMfQPuiDmqxph1ydMlvnaORiYz4AUz+adLPCeiD0UhPlu3Ag3KONZGdV0jYpaTBWZKFIK7UiLQqLmWJ9vI1oPAzrU0/9z5D6mxOA== 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=86raxxI161eXQOspVivZQi9u89ADDf4VhPNkmqnd2+0=; b=OGjU68v6a37ojG2q5dP5Wk6DmzYw/lOVOLP+GD87Xa2sleVVxmTTDE90AartifoCga4wYAY64jCA7ZP4EaO143/gAD1kdGqUppXf3y6wuJH4v1BY+eXZknkXcaO52fAciy5DvoPnkrMcIz9lIS5s/HZhQnDzv4L/wTX771Sn/Pw= 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:35 +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:35 +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:43 +0000 Message-Id: <20200830111544.4190-13-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:34 +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: d2fe7324-f033-43a9-2c38-08d84cd627cd 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:3631; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: inZJEl1+f6xm9gy2DiuBLR7bTC5W3S70xfHAtjRwtkxYiP7qa9VK5qd+vU8z5ljk1TsLiqgNuxqYBuMmhfR7Iz1At54sEemHupFZ4ncvM8hRrDnobbh9BaGKTwVjdWb0aMfJ/RQEKVa73kpA9aejBAXj8wZSjC5quqfrmiofKRXqTBNPtI5gyjrzKGkGpdx2FhG/Ai5341DEAWgI6lHiYWcOW3FcjWRU3dMzICfRC2/vjguzCiQPJtQRXBjs50RSsSCRrpYlJsxhbEZBB75sVMrSIMXKAIROkNBB++kX69Xbs3vAMUfQnER8FfEsNzujyGvl5YzaiU6v2uoUhuUUeA== 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)(83380400001)(16526019)(8676002)(186003)(956004)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: yYGtBI94OmuW5o79U3wmhYIclCK+/k7H3/iXrKn7Z80IIBS1EVkYJT1/W8sCGovCglkVjnFYoJmJkyInrsKYkW8CRY+WLPUqVUbjj27cvxrphnbQvfs1QaoqP4ZuREY0dhDeek9rE4P6qUyAVJglIkm9xKLmAYqyFYauZEh46C8WEDdfGX7gZdayPEORLJ9ceP6c0BwJhQ52G7Fy522N2K5VuBkwNmKkXCusoSsf48JRLBaqVwR/BNsKP7MK1L/uhLaaEJ7K0TwBtuRWErVjmxviCCJ3tybEQ8wCwUWFtGJH7BfhDqb//TKKpLbnlZEWMfpHmQGOBMxhyRgXrxroyi/xAU3tIYhru8f0cfs64xTE79+5D5tJvCY4Hi/dA0z+g5gjECdmW9dbnufPs1K+5kCehu+PdIvdvtT6bOv1EcigtY2e4Rju4Yf7xVjQT625Ra4JVCpFh079diKGUGDSaklphxEsfSScnhZmA/9hUN1sKz897Fw86QEIiQvC8fUm7BvxGD5hdlTA07EKOda9a9YzLnILBBMRMZtifhQsGBfiedR0IxRlg2fFmNR224KZNeu5PGtgBbz6F51zZpB378vaVtYRi2qVH6PRwHRJuFd5CEfIJzYoMs3NXqUe0Ao41TFfZSgM9rUN/OB8KWai+Q== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2fe7324-f033-43a9-2c38-08d84cd627cd 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:34.9513 (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: KXnkkDqUliBXHQ9cwSZnlmahGgMOe4EKlWOfFgphioxIDNQWmYoDgJllJgAcrbOp+dyG2aKWkXOo7LAxoF20jg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3762 Subject: [dpdk-dev] [PATCH 12/13] app/flow-perf: add icmp matching 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" Start support matching on icmpv4 and icmpv6. Usage: --icmpv4: add icmp item to match on. --icmpv6: add icmpv6 item to match on. Signed-off-by: Wisam Jaddo Acked-by: Alexander Kozyrev --- app/test-flow-perf/items_gen.c | 41 +++++++++++++++++++++++++- app/test-flow-perf/main.c | 16 ++++++++++ doc/guides/rel_notes/release_20_08.rst | 2 ++ doc/guides/tools/flow-perf.rst | 6 ++++ 4 files changed, 64 insertions(+), 1 deletion(-) diff --git a/app/test-flow-perf/items_gen.c b/app/test-flow-perf/items_gen.c index 8277ac70da..2b1ab41467 100644 --- a/app/test-flow-perf/items_gen.c +++ b/app/test-flow-perf/items_gen.c @@ -310,6 +310,38 @@ add_meta_tag(struct rte_flow_item *items, items[items_counter].mask = &tag_mask; } +static void +add_icmpv4(struct rte_flow_item *items, + uint8_t items_counter, + __rte_unused struct additional_para para) +{ + static struct rte_flow_item_icmp icmpv4_spec; + static struct rte_flow_item_icmp icmpv4_mask; + + memset(&icmpv4_spec, 0, sizeof(struct rte_flow_item_icmp)); + memset(&icmpv4_mask, 0, sizeof(struct rte_flow_item_icmp)); + + items[items_counter].type = RTE_FLOW_ITEM_TYPE_ICMP; + items[items_counter].spec = &icmpv4_spec; + items[items_counter].mask = &icmpv4_mask; +} + +static void +add_icmpv6(struct rte_flow_item *items, + uint8_t items_counter, + __rte_unused struct additional_para para) +{ + static struct rte_flow_item_icmp6 icmpv6_spec; + static struct rte_flow_item_icmp6 icmpv6_mask; + + memset(&icmpv6_spec, 0, sizeof(struct rte_flow_item_icmp6)); + memset(&icmpv6_mask, 0, sizeof(struct rte_flow_item_icmp6)); + + items[items_counter].type = RTE_FLOW_ITEM_TYPE_ICMP6; + items[items_counter].spec = &icmpv6_spec; + items[items_counter].mask = &icmpv6_mask; +} + void fill_items(struct rte_flow_item *items, uint64_t *flow_items, uint32_t outer_ip_src) @@ -381,7 +413,14 @@ fill_items(struct rte_flow_item *items, .mask = RTE_FLOW_ITEM_TYPE_GTP, .funct = add_gtp, }, - + { + .mask = RTE_FLOW_ITEM_TYPE_ICMP, + .funct = add_icmpv4, + }, + { + .mask = RTE_FLOW_ITEM_TYPE_ICMP6, + .funct = add_icmpv6, + }, }; for (j = 0; j < MAX_ITEMS_NUM; j++) { diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index 18199c6e2e..c420da6a57 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -130,6 +130,8 @@ usage(char *progname) printf(" --gtp: add gtp layer in flow items\n"); printf(" --meta: add meta layer in flow items\n"); printf(" --tag: add tag layer in flow items\n"); + printf(" --icmpv4: add icmpv4 layer in flow items\n"); + printf(" --icmpv6: add icmpv6 layer in flow items\n"); printf("To set flow actions:\n"); printf(" --port-id: add port-id action in flow actions\n"); @@ -284,6 +286,18 @@ args_parse(int argc, char **argv) .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, @@ -538,6 +552,8 @@ args_parse(int argc, char **argv) { "gtp", 0, 0, 0 }, { "meta", 0, 0, 0 }, { "tag", 0, 0, 0 }, + { "icmpv4", 0, 0, 0 }, + { "icmpv6", 0, 0, 0 }, /* Actions */ { "port-id", 0, 0, 0 }, { "rss", 0, 0, 0 }, diff --git a/doc/guides/rel_notes/release_20_08.rst b/doc/guides/rel_notes/release_20_08.rst index b21f0bfb03..03eb4948e0 100644 --- a/doc/guides/rel_notes/release_20_08.rst +++ b/doc/guides/rel_notes/release_20_08.rst @@ -287,6 +287,8 @@ New Features * Add new option to set portmask for insertion/deletion: ``--portmask=N`` Where N represent the hexadecimal bitmask of ports used. + * Start supporting icmp and icmp6 matching items. + Removed Items ------------- diff --git a/doc/guides/tools/flow-perf.rst b/doc/guides/tools/flow-perf.rst index bbefc978c6..7e5dc0c54b 100644 --- a/doc/guides/tools/flow-perf.rst +++ b/doc/guides/tools/flow-perf.rst @@ -175,6 +175,12 @@ Items: under ``TAG_INDEX`` with full mask, default value = 0. Other fields are open mask. +* ``--icmpv4`` + Add icmpv4 item to all flows items, This item have open mask. + +* ``--icmpv6`` + Add icmpv6 item to all flows items, This item have open mask. + Actions: -- 2.17.1