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 D657EA0A02; Thu, 14 Jan 2021 08:08:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4FDF1140F07; Thu, 14 Jan 2021 08:08:38 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 4F990140F06 for ; Thu, 14 Jan 2021 08:08:37 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shirik@nvidia.com) with SMTP; 14 Jan 2021 09:08:33 +0200 Received: from nvidia.com (c-141-140-1-007.mtl.labs.mlnx [10.141.140.7]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 10E78GjG013095; Thu, 14 Jan 2021 09:08:33 +0200 From: Shiri Kuzin To: dev@dpdk.org Cc: viacheslavo@nvidia.com, adrien.mazarguil@6wind.com, orika@nvidia.com, ferruh.yigit@intel.com, thomas@monjalon.net, rasland@nvidia.com, andrew.rybchenko@oktetlabs.ru Date: Thu, 14 Jan 2021 09:07:37 +0200 Message-Id: <20210114070743.2377-4-shirik@nvidia.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210114070743.2377-1-shirik@nvidia.com> References: <20210112140241.15914-1-shirik@nvidia.com> <20210114070743.2377-1-shirik@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v6 3/9] app/testpmd: add GENEVE header option length support 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 Sender: "dev" From: Viacheslav Ovsiienko The patch adds the GENEVE rte flow option length support to command line interpreter. The flow command with GENEVE option items looks like: flow create 0 ingress pattern eth / ipv4 / udp / geneve vni is 100 optlen is 2 / end actions drop / end The option length should be specified in 32-bit words, this value specifies the all options length in the GENEVE header. Signed-off-by: Viacheslav Ovsiienko --- app/test-pmd/cmdline_flow.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 98afde82cc..1ef4d4f75d 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -223,6 +223,7 @@ enum index { ITEM_GENEVE, ITEM_GENEVE_VNI, ITEM_GENEVE_PROTO, + ITEM_GENEVE_OPTLEN, ITEM_VXLAN_GPE, ITEM_VXLAN_GPE_VNI, ITEM_ARP_ETH_IPV4, @@ -1101,6 +1102,7 @@ static const enum index item_gtp[] = { static const enum index item_geneve[] = { ITEM_GENEVE_VNI, ITEM_GENEVE_PROTO, + ITEM_GENEVE_OPTLEN, ITEM_NEXT, ZERO, }; @@ -2807,6 +2809,14 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve, protocol)), }, + [ITEM_GENEVE_OPTLEN] = { + .name = "optlen", + .help = "GENEVE options length in dwords", + .next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve, + ver_opt_len_o_c_rsvd0, + "\x3f\x00")), + }, [ITEM_VXLAN_GPE] = { .name = "vxlan-gpe", .help = "match VXLAN-GPE header", -- 2.21.0