From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id CF32429CF for ; Thu, 23 Nov 2017 10:40:27 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id y80so15185495wmd.0 for ; Thu, 23 Nov 2017 01:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=6c1hTTISHNeGAs+gAAeALiWqb0oD78tkLiYHwpLscyw=; b=SgfJ/gjnMe0cc8n4JkXABjO2IwhmDsgWpHASRkWgUKIfRR5yCIBYz+N8L08iwqu9Ja 4ZzLPnD4TDLjycG8cP1y8XpBkDJKN3KwGfP+XV89vg80+BgvdJopv7Za/lCm/s5yqMMm LmelShsyDnYdzDiE+CZouY+SWX4SzUlFFX2fdoSnlArYgdlYAUwZHjw6AEpjoDR2AMBR mxutj9M3xpjEn2AOucteJVVTlIjvI7Nl7AUfZ/U21FsmKsWsjSo/us0ulPP1AKwf9U9f AK9jRnIbXsbI/D8fs9DvLBVCiKJbVwxJMLl44AbZIqnsGhNqAKEuAyJUZbaq/ySduDZD 0PmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6c1hTTISHNeGAs+gAAeALiWqb0oD78tkLiYHwpLscyw=; b=n06zG2T8ZPKriRrdzqVcaIwQI0ypu3Hj1mZ6SGBzLT/mdZ8q0MOheyiRC/GEnmL0+1 S/jH7+jIRXvZO3xRnhpwLlH4E6a61JF3T3EomjEp6DPYK4Lx4+thSy836UWioJpjLqg9 eA9l1JXcVf4/L2y/271SepdDWtVYjdnF7hVwPek9Q3xcQ8ZvHFGk1AnSYTQnokl6HQoV Nzcbg5EKZNiEFtMpHFCDIZCnmoHo7hIhUAdzPye8hur06tfQnHrPmGS1lFTRrVoq8DWA JswZ9RzbNGrrONHzW1likQdAfxHAR3rl4kOq42T5HFCK0iwKwxiewfBQlky9Prqhbzmr QiEg== X-Gm-Message-State: AJaThX6EKAb+JY4drvZlaPGrzjZDwbf2qnCu5HXYNB6wxdgXO+aSs8h1 CqziOmtMT/aqkS9IEPVyfeldqw== X-Google-Smtp-Source: AGs4zMaNQYbiiuISN19uZJ5UfFuiQFjPetuLVpyHjCONGOnY/XPHMquvzFEx8ikRlDuxMHUFE55cvg== X-Received: by 10.28.194.139 with SMTP id s133mr5929937wmf.14.1511430027470; Thu, 23 Nov 2017 01:40:27 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id d71sm4240331wma.7.2017.11.23.01.40.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 01:40:26 -0800 (PST) Date: Thu, 23 Nov 2017 10:40:15 +0100 From: Adrien Mazarguil To: Andrew Rybchenko Cc: dev@dpdk.org, Jingjing Wu , Roman Zhukov Message-ID: <20171123094015.GI4062@6wind.com> References: <1511166121-743-1-git-send-email-arybchenko@solarflare.com> <1511166121-743-3-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1511166121-743-3-git-send-email-arybchenko@solarflare.com> Subject: Re: [dpdk-dev] [PATCH 2/2] app/testpmd: support GENEVE pattern item in flow rules 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: , X-List-Received-Date: Thu, 23 Nov 2017 09:40:28 -0000 On Mon, Nov 20, 2017 at 08:22:01AM +0000, Andrew Rybchenko wrote: > From: Roman Zhukov > > Add the ability to match a VNI field of GENEVE protocol header. > > Signed-off-by: Roman Zhukov > Signed-off-by: Andrew Rybchenko Same comments as previously basically, keep the same order as rte_flow.h after fixing the ABI breakage. One minor comment below. > --- > app/test-pmd/cmdline_flow.c | 31 +++++++++++++++++++++++++++++ > app/test-pmd/config.c | 1 + > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 5 +++++ > 3 files changed, 37 insertions(+) > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index df16d2a..cee99f3 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -161,6 +161,9 @@ enum index { > ITEM_SCTP_CKSUM, > ITEM_VXLAN, > ITEM_VXLAN_VNI, > + ITEM_GENEVE, > + ITEM_GENEVE_VNI, > + ITEM_GENEVE_PROTO, > ITEM_E_TAG, > ITEM_E_TAG_GRP_ECID_B, > ITEM_NVGRE, > @@ -452,6 +455,7 @@ static const enum index next_item[] = { > ITEM_TCP, > ITEM_SCTP, > ITEM_VXLAN, > + ITEM_GENEVE, > ITEM_E_TAG, > ITEM_NVGRE, > ITEM_MPLS, > @@ -573,6 +577,13 @@ static const enum index item_vxlan[] = { > ZERO, > }; > > +static const enum index item_geneve[] = { > + ITEM_GENEVE_VNI, > + ITEM_GENEVE_PROTO, > + ITEM_NEXT, > + ZERO, > +}; > + > static const enum index item_e_tag[] = { > ITEM_E_TAG_GRP_ECID_B, > ITEM_NEXT, > @@ -1371,6 +1382,26 @@ static const struct token token_list[] = { > .next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param), > .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)), > }, > + [ITEM_GENEVE] = { > + .name = "geneve", > + .help = "match GENEVE header", > + .priv = PRIV_ITEM(GENEVE, sizeof(struct rte_flow_item_geneve)), > + .next = NEXT(item_geneve), > + .call = parse_vc, > + }, > + [ITEM_GENEVE_VNI] = { > + .name = "vni", > + .help = "Virtual Network Identifier", How about "virtual network identifier" (all lower caps)? > + .next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param), > + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve, vni)), > + }, > + [ITEM_GENEVE_PROTO] = { > + .name = "protocol", > + .help = "GENEVE protocol type", > + .next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param), > + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve, > + protocol)), > + }, > [ITEM_E_TAG] = { > .name = "e_tag", > .help = "match E-Tag header", > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index cd2ac11..4eda37f 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -965,6 +965,7 @@ static const struct { > MK_FLOW_ITEM(TCP, sizeof(struct rte_flow_item_tcp)), > MK_FLOW_ITEM(SCTP, sizeof(struct rte_flow_item_sctp)), > MK_FLOW_ITEM(VXLAN, sizeof(struct rte_flow_item_vxlan)), > + MK_FLOW_ITEM(GENEVE, sizeof(struct rte_flow_item_geneve)), > MK_FLOW_ITEM(E_TAG, sizeof(struct rte_flow_item_e_tag)), > MK_FLOW_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)), > MK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)), > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 9789139..8c2fd12 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -3083,6 +3083,11 @@ This section lists supported pattern items and their attributes, if any. > > - ``vni {unsigned}``: VXLAN identifier. > > +- ``geneve``: match GENEVE header. > + > + - ``vni {unsigned}``: virtual network identifier. > + - ``protocol {unsigned}``: protocol type. > + > - ``e_tag``: match IEEE 802.1BR E-Tag header. > > - ``grp_ecid_b {unsigned}``: GRP and E-CID base. > -- > 2.7.4 > -- Adrien Mazarguil 6WIND