DPDK patches and discussions
 help / color / Atom feed
From: Xiao Zhang <xiao.zhang@intel.com>
To: dev@dpdk.org
Cc: orika@mellanox.com, qi.z.zhang@intel.com, simei.su@intel.com,
	bernard.iremonger@intel.com, Xiao Zhang <xiao.zhang@intel.com>
Subject: [dpdk-dev] app/testpmd: parse flow command line for AH
Date: Thu, 13 Feb 2020 13:07:40 +0800
Message-ID: <1581570460-27068-1-git-send-email-xiao.zhang@intel.com> (raw)

add ITEM_AH
add ITEM_AH_SPI

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
---
 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


             reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  5:07 Xiao Zhang [this message]
2020-02-13  6:45 ` Ye Xiaolong
2020-02-14  1:02   ` Zhang, Xiao
2020-02-14  0:52 ` [dpdk-dev] [v2] " Xiao Zhang
2020-03-01  7:56   ` Ori Kam
2020-03-02 12:16     ` Ferruh Yigit

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1581570460-27068-1-git-send-email-xiao.zhang@intel.com \
    --to=xiao.zhang@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=orika@mellanox.com \
    --cc=qi.z.zhang@intel.com \
    --cc=simei.su@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox