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 1F612A0542; Thu, 13 Feb 2020 07:47:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5FCF91BF99; Thu, 13 Feb 2020 07:47:25 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 6B8FC1BF98 for ; Thu, 13 Feb 2020 07:47:24 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2020 22:47:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,435,1574150400"; d="scan'208";a="227132606" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.17]) by orsmga008.jf.intel.com with ESMTP; 12 Feb 2020 22:47:21 -0800 Date: Thu, 13 Feb 2020 14:45:59 +0800 From: Ye Xiaolong To: Xiao Zhang Cc: dev@dpdk.org, orika@mellanox.com, qi.z.zhang@intel.com, simei.su@intel.com, bernard.iremonger@intel.com Message-ID: <20200213064559.GQ80720@intel.com> References: <1581570460-27068-1-git-send-email-xiao.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1581570460-27068-1-git-send-email-xiao.zhang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] app/testpmd: parse flow command line for AH 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" Hi, Xiao On 02/13, Xiao Zhang wrote: >add ITEM_AH >add ITEM_AH_SPI Better to add some descriptive sentence about this patch in commit log instead of some simple bullets. Thanks, Xiaolong > >Signed-off-by: Xiao Zhang >--- > app/test-pmd/cmdline_flow.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > >diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c >index c2cc4c5..680cb1c 100644 >--- a/app/test-pmd/cmdline_flow.c >+++ b/app/test-pmd/cmdline_flow.c >@@ -220,6 +220,8 @@ enum index { > ITEM_L2TPV3OIP_SESSION_ID, > ITEM_ESP, > ITEM_ESP_SPI, >+ ITEM_AH, >+ ITEM_AH_SPI, > > /* Validate/create actions. */ > ACTIONS, >@@ -768,6 +770,7 @@ static const enum index next_item[] = { > ITEM_TAG, > ITEM_L2TPV3OIP, > ITEM_ESP, >+ ITEM_AH, > END_SET, > ZERO, > }; >@@ -1046,6 +1049,12 @@ static const enum index item_esp[] = { > ZERO, > }; > >+static const enum index item_ah[] = { >+ ITEM_AH_SPI, >+ ITEM_NEXT, >+ ZERO, >+}; >+ > static const enum index next_set_raw[] = { > SET_RAW_INDEX, > ITEM_ETH, >@@ -2699,6 +2708,19 @@ static const struct token token_list[] = { > .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp, > hdr.spi)), > }, >+ [ITEM_AH] = { >+ .name = "ah", >+ .help = "match AH header", >+ .priv = PRIV_ITEM(AH, sizeof(struct rte_flow_item_ah)), >+ .next = NEXT(item_ah), >+ .call = parse_vc, >+ }, >+ [ITEM_AH_SPI] = { >+ .name = "spi", >+ .help = "security parameters index", >+ .next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param), >+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)), >+ }, > /* Validate/create actions. */ > [ACTIONS] = { > .name = "actions", >@@ -6444,6 +6466,9 @@ flow_item_default_mask(const struct rte_flow_item *item) > case RTE_FLOW_ITEM_TYPE_ESP: > mask = &rte_flow_item_esp_mask; > break; >+ case RTE_FLOW_ITEM_TYPE_AH: >+ mask = &rte_flow_item_ah_mask; >+ break; > default: > break; > } >@@ -6541,6 +6566,10 @@ cmd_set_raw_parsed(const struct buffer *in) > size = sizeof(struct rte_flow_item_esp); > proto = 0x32; > break; >+ case RTE_FLOW_ITEM_TYPE_AH: >+ size = sizeof(struct rte_flow_item_ah); >+ proto = 0x33; >+ break; > default: > printf("Error - Not supported item\n"); > *total_size = 0; >-- >2.7.4 >