DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test-pmd: enable testpmd on windows
@ 2021-03-18  6:26 Jie Zhou
  2021-03-19 16:51 ` [dpdk-dev] [PATCH v2] " Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-03-18  6:26 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson

From: Jie Zhou <jizh@microsoft.com>

This patch is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that TestPMD depends on
- Enable building testpmd on Windows
- Resolve name collisions with Windows types
- Add clock_gettime_monotic for testpmd on Windows
- Make printf format work for both Linux and Windows
- Add missing macros
- Add missing IPPROTO_RAW to in.h
- Replace htons with RTE_BE16
- Replace inet_aton with inet_pton
- Fix parse_fec_mode to return fec_capa to remove compilation warning
- ...

Issue under active investigation:
- Recent DPDK upstream change "eal: detach memsegs on cleanup" exposed
  a failure at testpmd exit with "EAL: Could not unmap memory: No Error".
  Investigating KERNELBASE!UnmapViewOfFile. The issue will cause system
  crash. Currently temporarily remove cleanup at exit on Windows.
  Will revert after issue root caused and fixed

Future work:
- Some issues discovered at validation which need further investigations
  * Performance inconsistency issues: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * Currently mempool allocation only succeed with native. Other methods
    failed at rte_mem_lock at VirtualLock. Thus currently only allow native
- Hot-plug not supported yet

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Jie Zhou <jizh@microsoft.com>
---
 app/meson.build                             |  15 +-
 app/test-pmd/cmdline.c                      |  12 +-
 app/test-pmd/cmdline_flow.c                 | 440 ++++++++++----------
 app/test-pmd/config.c                       |  37 +-
 app/test-pmd/csumonly.c                     |   6 +-
 app/test-pmd/icmpecho.c                     |   4 +-
 app/test-pmd/ieee1588fwd.c                  |  10 +-
 app/test-pmd/parameters.c                   |  17 +-
 app/test-pmd/testpmd.c                      |  39 +-
 app/test-pmd/testpmd.h                      |   6 +-
 lib/librte_eal/windows/include/netinet/in.h |   1 +
 lib/librte_eal/windows/include/rte_os.h     |   8 +
 lib/meson.build                             |   7 +
 13 files changed, 353 insertions(+), 249 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 87fc195db..00622933e 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-	subdir_done()
-endif
-
 apps = [
 	'pdump',
 	'proc-info',
@@ -21,6 +17,11 @@ apps = [
 	'test-regex',
 	'test-sad']
 
+if is_windows
+	apps = [
+		'test-pmd']
+endif
+
 # for BSD only
 lib_execinfo = cc.find_library('execinfo', required: false)
 
@@ -73,5 +74,7 @@ foreach app:apps
 	endif
 endforeach
 
-# special case the autotests
-subdir('test')
+if not(is_windows)
+	# special case the autotests
+	subdir('test')
+endif
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 14110eb2e..36f5d89aa 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,12 +8,14 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <termios.h>
+#endif
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
@@ -3502,7 +3504,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char* str, const char* item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
@@ -16458,17 +16460,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 49d9f9c04..3ee8c7378 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -31,6 +31,12 @@
 
 #include "testpmd.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+#endif
+
 /** Parser token indices. */
 enum index {
 	/* Special tokens. */
@@ -40,21 +46,21 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	SHARED_ACTION_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_SHARED_ACTION_ID,
 
 	/* Top-level command. */
 	SET,
@@ -125,7 +131,7 @@ enum index {
 	SHARED_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -858,7 +864,7 @@ static const enum index next_vc_attr[] = {
 	TRANSFER,
 	TUNNEL_SET,
 	TUNNEL_MATCH,
-	PATTERN,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -869,7 +875,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1837,104 +1843,104 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
-		.type = "HEX",
+		.type = "COMMON_HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[SHARED_ACTION_ID] = {
+	[COMMON_SHARED_ACTION_ID] = {
 		.name = "{shared_action_id}",
 		.type = "SHARED_ACTION_ID",
 		.help = "shared action id",
@@ -1965,7 +1971,7 @@ static const struct token token_list[] = {
 		.name = "shared_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage shared actions",
-		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_sa,
 	},
@@ -1980,7 +1986,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update shared action",
 		.next = NEXT(NEXT_ENTRY(SHARED_ACTION_SPEC),
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_sa,
 	},
@@ -1994,42 +2000,42 @@ static const struct token token_list[] = {
 	[SHARED_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query shared action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(SHARED_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.sa.action_id)),
 		.call = parse_sa,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump all flow rules to file",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
@@ -2038,8 +2044,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2048,22 +2054,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2080,14 +2086,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2095,21 +2101,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2117,7 +2123,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2133,7 +2139,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2147,14 +2153,14 @@ static const struct token token_list[] = {
 	[GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
 	[PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
@@ -2179,19 +2185,19 @@ static const struct token token_list[] = {
 	[TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	[TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2258,7 +2264,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2278,7 +2284,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2292,7 +2298,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2306,7 +2312,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2319,7 +2325,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2332,34 +2338,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2378,25 +2384,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2410,41 +2416,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2458,42 +2464,42 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2507,7 +2513,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2515,7 +2521,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2523,35 +2529,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2565,28 +2571,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2600,14 +2606,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2621,21 +2627,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2649,28 +2655,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2684,7 +2690,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2697,7 +2703,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2712,7 +2718,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2725,7 +2731,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2733,7 +2739,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2741,7 +2747,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2756,7 +2762,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2766,14 +2772,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2781,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2789,7 +2795,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2805,7 +2811,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2819,20 +2825,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2859,20 +2865,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2888,7 +2894,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -2903,7 +2909,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -2911,7 +2917,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -2919,7 +2925,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -2927,7 +2933,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -2943,7 +2949,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -2958,7 +2964,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -2966,7 +2972,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "Fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -2981,14 +2987,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3003,7 +3009,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3019,7 +3025,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3036,7 +3042,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3054,7 +3060,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3072,7 +3078,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3087,7 +3093,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3101,7 +3107,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3115,14 +3121,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3143,7 +3149,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3152,7 +3158,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3169,14 +3175,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3190,13 +3196,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3211,7 +3217,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3225,7 +3231,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3239,7 +3245,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3252,14 +3258,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3292,7 +3298,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3308,7 +3314,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3324,7 +3330,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3340,21 +3346,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3362,7 +3368,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3411,7 +3417,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3425,7 +3431,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3447,7 +3453,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3469,14 +3475,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3520,7 +3526,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3541,7 +3547,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3556,7 +3562,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3594,7 +3600,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3602,7 +3608,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3617,7 +3623,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3625,7 +3631,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3641,7 +3647,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3649,7 +3655,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3664,7 +3670,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3680,7 +3686,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3704,7 +3710,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3749,7 +3755,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3767,7 +3773,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3785,7 +3791,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3802,7 +3808,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3820,7 +3826,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -3928,7 +3934,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3945,7 +3951,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3962,7 +3968,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -3979,7 +3985,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -3996,7 +4002,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4013,7 +4019,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4044,7 +4050,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4060,7 +4066,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4076,7 +4082,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4091,7 +4097,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4105,7 +4111,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4119,7 +4125,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4133,7 +4139,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4216,7 +4222,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4224,7 +4230,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4245,7 +4251,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4253,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4262,7 +4268,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4271,7 +4277,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4311,7 +4317,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4344,14 +4350,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4359,7 +4365,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4375,7 +4381,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4383,7 +4389,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4399,7 +4405,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4415,7 +4421,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4433,7 +4439,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4447,7 +4453,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4461,7 +4467,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4472,7 +4478,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to destroy",
 		.next = NEXT(next_sa_destroy_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.sa_destroy.action_id)),
 		.call = parse_sa_destroy,
@@ -4482,7 +4488,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to create",
 		.next = NEXT(next_sa_create_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_SHARED] = {
@@ -4862,7 +4868,7 @@ parse_vc(struct context *ctx, const struct token *token,
 	case TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -4943,7 +4949,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 576d5acab..a3bfdcba6 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -38,7 +38,6 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_flow.h>
-#include <rte_errno.h>
 #ifdef RTE_NET_IXGBE
 #include <rte_pmd_ixgbe.h>
 #endif
@@ -170,6 +169,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 	printf("%s%s", name, buf);
 }
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+clock_gettime_monotonic(struct timespec* tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	if (QueryPerformanceFrequency(&pf) == 0)
+		return -1;
+
+	if (QueryPerformanceCounter(&pc) == 0)
+		return -1;
+
+	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+	tp->tv_sec = nsec / NS_PER_SEC;
+	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+
+	return 0;
+}
+#endif
+
 void
 nic_stats_display(portid_t port_id)
 {
@@ -182,6 +202,7 @@ nic_stats_display(portid_t port_id)
 	uint64_t diff_pkts_rx, diff_pkts_tx, diff_bytes_rx, diff_bytes_tx,
 								diff_ns;
 	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
+	int ret;
 	struct rte_eth_stats stats;
 
 	static const char *nic_stats_border = "########################";
@@ -202,7 +223,13 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
-	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+	ret = clock_gettime_monotonic(&cur_time);
+#else
+	ret = clock_gettime(CLOCK_TYPE_ID, &cur_time);
+#endif
+	if (ret == 0) {
 		uint64_t ns;
 
 		ns = cur_time.tv_sec * NS_PER_SEC;
@@ -2674,7 +2701,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
 
 void
 port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
-			 uint hash_key_len)
+			 unsigned int hash_key_len)
 {
 	struct rte_eth_rss_conf rss_conf;
 	int diag;
@@ -3404,13 +3431,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..51f2e44f8 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,11 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+#ifndef RTE_EXEC_ENV_WINDOWS
+	nb_seg = random() % tx_pkt_nb_segs + 1;
+#else
+	nb_seg = rand() % tx_pkt_nb_segs + 1;
+#endif
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..9ad04e992 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,9 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +84,10 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index a326c8ce4..482d3bdfa 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -200,11 +200,15 @@ usage(char* progname)
 	       "requests flow API isolated mode on all ports at initialization time.\n");
 	printf("  --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n");
 	printf("  --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --hot-plug: enable hot plug for device.\n");
+#endif
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -229,7 +233,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -626,11 +630,15 @@ launch_args_parse(int argc, char** argv)
 		{ "mask-event",			1, 0, 0 },
 		{ "tx-offloads",		1, 0, 0 },
 		{ "rx-offloads",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "hot-plug",			0, 0, 0 },
+#endif
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -742,13 +750,14 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
@@ -1333,8 +1342,10 @@ launch_args_parse(int argc, char** argv)
 					rte_exit(EXIT_FAILURE,
 						 "invalid mask-event argument\n");
 				}
+#ifndef RTE_EXEC_ENV_WINDOWS
 			if (!strcmp(lgopts[opt_idx].name, "hot-plug"))
 				hot_plug = 1;
+#endif
 			if (!strcmp(lgopts[opt_idx].name, "mlockall"))
 				do_mlockall = 1;
 			if (!strcmp(lgopts[opt_idx].name, "no-mlockall"))
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 98c3248c0..21ce089bd 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -61,6 +63,10 @@
 #include <rte_latencystats.h>
 #endif
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
+
 #include "testpmd.h"
 
 #ifndef MAP_HUGETLB
@@ -372,7 +378,9 @@ uint8_t lsc_interrupt = 1; /* enabled by default */
  */
 uint8_t rmv_interrupt = 1; /* enabled by default */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 uint8_t hot_plug = 0; /**< hotplug disabled by default. */
+#endif
 
 /* After attach, port setup is called on event or by iterator */
 bool setup_on_probe_event = true;
@@ -524,9 +532,11 @@ static void check_all_ports_link_status(uint32_t port_mask);
 static int eth_event_callback(portid_t port_id,
 			      enum rte_eth_event_type type,
 			      void *param, void *ret_param);
+#ifndef RTE_EXEC_ENV_WINDOWS
 static void dev_event_callback(const char *device_name,
 				enum rte_dev_event_type type,
 				void *param);
+#endif
 
 /*
  * Check if all the ports are started.
@@ -632,6 +642,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -846,6 +857,7 @@ setup_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, bool huge)
 
 	return 0;
 }
+
 static void
 dma_unmap_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 	     struct rte_mempool_memhdr *memhdr, unsigned mem_idx __rte_unused)
@@ -902,6 +914,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +985,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1006,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1047,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1056,7 +1073,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 			rte_exit(EXIT_FAILURE, "Invalid mempool creation mode\n");
 		}
 	}
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1082,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3047,11 +3065,14 @@ pmd_test_exit(void)
 {
 	portid_t pt_id;
 	unsigned int i;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	int ret;
+#endif
 
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3059,6 +3080,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3072,7 +3094,7 @@ pmd_test_exit(void)
 			close_port(pt_id);
 		}
 	}
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (hot_plug) {
 		ret = rte_dev_event_monitor_stop();
 		if (ret) {
@@ -3096,6 +3118,7 @@ pmd_test_exit(void)
 			return;
 		}
 	}
+#endif
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i])
 			rte_mempool_free(mempools[i]);
@@ -3259,6 +3282,7 @@ register_eth_event_callback(void)
 	return 0;
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* This function is used by the interrupt thread */
 static void
 dev_event_callback(const char *device_name, enum rte_dev_event_type type,
@@ -3308,6 +3332,7 @@ dev_event_callback(const char *device_name, enum rte_dev_event_type type,
 		break;
 	}
 }
+#endif
 
 static void
 rxtx_port_config(struct rte_port *port)
@@ -3759,7 +3784,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3834,10 +3861,13 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+	/* mlockall on Windows is unnecessary as latency impact from page fault is small compare to other resources. */
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3859,6 +3889,7 @@ main(int argc, char** argv)
 
 	init_config();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (hot_plug) {
 		ret = rte_dev_hotplug_handle_enable();
 		if (ret) {
@@ -3882,6 +3913,7 @@ main(int argc, char** argv)
 			return -1;
 		}
 	}
+#endif
 
 	if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
 		rte_exit(EXIT_FAILURE, "Start ports failed\n");
@@ -3969,10 +4001,11 @@ main(int argc, char** argv)
 			return 1;
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	ret = rte_eal_cleanup();
 	if (ret != 0)
 		rte_exit(EXIT_FAILURE,
 			 "EAL cleanup failed: %s\n", strerror(-ret));
-
+#endif
 	return EXIT_SUCCESS;
 }
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index af4085917..23731ccae 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char* str, const char* item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
@@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
@@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
 
 void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
 void port_rss_hash_key_update(portid_t port_id, char rss_type[],
-			      uint8_t *hash_key, uint hash_key_len);
+			      uint8_t *hash_key, unsigned int hash_key_len);
 int rx_queue_id_is_invalid(queueid_t rxq_id);
 int tx_queue_id_is_invalid(queueid_t txq_id);
 void setup_gro(const char *onoff, portid_t port_id);
diff --git a/lib/librte_eal/windows/include/netinet/in.h b/lib/librte_eal/windows/include/netinet/in.h
index 6455b9ba5..38268cf80 100644
--- a/lib/librte_eal/windows/include/netinet/in.h
+++ b/lib/librte_eal/windows/include/netinet/in.h
@@ -24,6 +24,7 @@
 #define IPPROTO_NONE      59
 #define IPPROTO_DSTOPTS   60
 #define IPPROTO_SCTP     132
+#define IPPROTO_RAW      255
 
 #define INET6_ADDRSTRLEN 46
 
diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index 7ef38ff06..f318a66b8 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -25,6 +25,14 @@ extern "C" {
 #define PATH_MAX _MAX_PATH
 #endif
 
+#define strcasecmp _stricmp
+#define open _open
+#define read _read
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifndef sleep
 #define sleep(x) Sleep(1000 * (x))
 #endif
diff --git a/lib/meson.build b/lib/meson.build
index 7712aa497..295976a4d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -46,6 +46,13 @@ if is_windows
 		'cmdline',
 		'hash',
 		'cfgfile',
+		'metrics',
+		'timer',
+		'gro',
+		'gso',
+		'pdump',
+		'bitratestats',
+		'latencystats',
 	] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-03-18  6:26 [dpdk-dev] [PATCH] app/test-pmd: enable testpmd on windows Jie Zhou
@ 2021-03-19 16:51 ` Jie Zhou
  2021-03-21  1:01   ` Dmitry Kozlyuk
                     ` (4 more replies)
  0 siblings, 5 replies; 232+ messages in thread
From: Jie Zhou @ 2021-03-19 16:51 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

From: Jie Zhou <jizh@microsoft.com>

This patch is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that TestPMD depends on
- Enable building testpmd on Windows
- Resolve name collisions with Windows types
- Add clock_gettime_monotic for testpmd on Windows
- Make printf format work for both Linux and Windows
- Add missing macros
- Add missing IPPROTO_RAW to in.h
- Replace htons with RTE_BE16
- Replace inet_aton with inet_pton
- Fix parse_fec_mode to return fec_capa to remove compilation warning
- ...

Issue under active investigation:
- Recent DPDK upstream change "eal: detach memsegs on cleanup" exposed
  failure at eal exit with "EAL: Could not unmap memory: No Error".
  Investigating KERNELBASE!UnmapViewOfFile. The issue will cause system
  crash. Currently temporarily remove cleanup at exit on Windows.
  Will revert after issue root caused and fixed

Future work:
- Some issues discovered at validation which need further investigations
  * Perf inconsistency issues: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * Currently mempool allocation only succeed with native. Other methods
    failed at rte_mem_lock/VirtualLock. Thus currently only allow native
- Hot-plug not supported yet

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Signed-off-by: Jie Zhou <jizh@microsoft.com>

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---
 app/meson.build                             |  15 +-
 app/test-pmd/cmdline.c                      |  12 +-
 app/test-pmd/cmdline_flow.c                 | 440 ++++++++++----------
 app/test-pmd/config.c                       |  37 +-
 app/test-pmd/csumonly.c                     |   4 +
 app/test-pmd/icmpecho.c                     |   4 +-
 app/test-pmd/ieee1588fwd.c                  |  10 +-
 app/test-pmd/parameters.c                   |  18 +-
 app/test-pmd/testpmd.c                      |  38 +-
 app/test-pmd/testpmd.h                      |   6 +-
 lib/librte_eal/windows/include/netinet/in.h |   1 +
 lib/librte_eal/windows/include/rte_os.h     |   8 +
 lib/meson.build                             |   7 +
 13 files changed, 352 insertions(+), 248 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 87fc195db..00622933e 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-	subdir_done()
-endif
-
 apps = [
 	'pdump',
 	'proc-info',
@@ -21,6 +17,11 @@ apps = [
 	'test-regex',
 	'test-sad']
 
+if is_windows
+	apps = [
+		'test-pmd']
+endif
+
 # for BSD only
 lib_execinfo = cc.find_library('execinfo', required: false)
 
@@ -73,5 +74,7 @@ foreach app:apps
 	endif
 endforeach
 
-# special case the autotests
-subdir('test')
+if not(is_windows)
+	# special case the autotests
+	subdir('test')
+endif
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 14110eb2e..35a6dd0d3 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,12 +8,14 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <termios.h>
+#endif
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
@@ -3502,7 +3504,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
@@ -16458,17 +16460,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 49d9f9c04..3ee8c7378 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -31,6 +31,12 @@
 
 #include "testpmd.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+#endif
+
 /** Parser token indices. */
 enum index {
 	/* Special tokens. */
@@ -40,21 +46,21 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	SHARED_ACTION_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_SHARED_ACTION_ID,
 
 	/* Top-level command. */
 	SET,
@@ -125,7 +131,7 @@ enum index {
 	SHARED_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -858,7 +864,7 @@ static const enum index next_vc_attr[] = {
 	TRANSFER,
 	TUNNEL_SET,
 	TUNNEL_MATCH,
-	PATTERN,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -869,7 +875,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1837,104 +1843,104 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
-		.type = "HEX",
+		.type = "COMMON_HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[SHARED_ACTION_ID] = {
+	[COMMON_SHARED_ACTION_ID] = {
 		.name = "{shared_action_id}",
 		.type = "SHARED_ACTION_ID",
 		.help = "shared action id",
@@ -1965,7 +1971,7 @@ static const struct token token_list[] = {
 		.name = "shared_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage shared actions",
-		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_sa,
 	},
@@ -1980,7 +1986,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update shared action",
 		.next = NEXT(NEXT_ENTRY(SHARED_ACTION_SPEC),
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_sa,
 	},
@@ -1994,42 +2000,42 @@ static const struct token token_list[] = {
 	[SHARED_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query shared action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(SHARED_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.sa.action_id)),
 		.call = parse_sa,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump all flow rules to file",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
@@ -2038,8 +2044,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2048,22 +2054,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2080,14 +2086,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2095,21 +2101,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2117,7 +2123,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2133,7 +2139,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2147,14 +2153,14 @@ static const struct token token_list[] = {
 	[GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
 	[PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
@@ -2179,19 +2185,19 @@ static const struct token token_list[] = {
 	[TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	[TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2258,7 +2264,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2278,7 +2284,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2292,7 +2298,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2306,7 +2312,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2319,7 +2325,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2332,34 +2338,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2378,25 +2384,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2410,41 +2416,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2458,42 +2464,42 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2507,7 +2513,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2515,7 +2521,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2523,35 +2529,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2565,28 +2571,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2600,14 +2606,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2621,21 +2627,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2649,28 +2655,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2684,7 +2690,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2697,7 +2703,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2712,7 +2718,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2725,7 +2731,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2733,7 +2739,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2741,7 +2747,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2756,7 +2762,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2766,14 +2772,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2781,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2789,7 +2795,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2805,7 +2811,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2819,20 +2825,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2859,20 +2865,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2888,7 +2894,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -2903,7 +2909,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -2911,7 +2917,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -2919,7 +2925,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -2927,7 +2933,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -2943,7 +2949,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -2958,7 +2964,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -2966,7 +2972,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "Fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -2981,14 +2987,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3003,7 +3009,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3019,7 +3025,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3036,7 +3042,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3054,7 +3060,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3072,7 +3078,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3087,7 +3093,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3101,7 +3107,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3115,14 +3121,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3143,7 +3149,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3152,7 +3158,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3169,14 +3175,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3190,13 +3196,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3211,7 +3217,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3225,7 +3231,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3239,7 +3245,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3252,14 +3258,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3292,7 +3298,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3308,7 +3314,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3324,7 +3330,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3340,21 +3346,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3362,7 +3368,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3411,7 +3417,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3425,7 +3431,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3447,7 +3453,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3469,14 +3475,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3520,7 +3526,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3541,7 +3547,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3556,7 +3562,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3594,7 +3600,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3602,7 +3608,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3617,7 +3623,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3625,7 +3631,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3641,7 +3647,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3649,7 +3655,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3664,7 +3670,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3680,7 +3686,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3704,7 +3710,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3749,7 +3755,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3767,7 +3773,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3785,7 +3791,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3802,7 +3808,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3820,7 +3826,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -3928,7 +3934,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3945,7 +3951,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3962,7 +3968,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -3979,7 +3985,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -3996,7 +4002,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4013,7 +4019,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4044,7 +4050,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4060,7 +4066,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4076,7 +4082,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4091,7 +4097,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4105,7 +4111,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4119,7 +4125,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4133,7 +4139,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4216,7 +4222,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4224,7 +4230,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4245,7 +4251,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4253,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4262,7 +4268,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4271,7 +4277,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4311,7 +4317,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4344,14 +4350,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4359,7 +4365,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4375,7 +4381,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4383,7 +4389,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4399,7 +4405,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4415,7 +4421,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4433,7 +4439,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4447,7 +4453,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4461,7 +4467,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4472,7 +4478,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to destroy",
 		.next = NEXT(next_sa_destroy_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.sa_destroy.action_id)),
 		.call = parse_sa_destroy,
@@ -4482,7 +4488,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to create",
 		.next = NEXT(next_sa_create_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_SHARED] = {
@@ -4862,7 +4868,7 @@ parse_vc(struct context *ctx, const struct token *token,
 	case TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -4943,7 +4949,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 576d5acab..af7570429 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -38,7 +38,6 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_flow.h>
-#include <rte_errno.h>
 #ifdef RTE_NET_IXGBE
 #include <rte_pmd_ixgbe.h>
 #endif
@@ -170,6 +169,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 	printf("%s%s", name, buf);
 }
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+clock_gettime_monotonic(struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	if (QueryPerformanceFrequency(&pf) == 0)
+		return -1;
+
+	if (QueryPerformanceCounter(&pc) == 0)
+		return -1;
+
+	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+	tp->tv_sec = nsec / NS_PER_SEC;
+	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+
+	return 0;
+}
+#endif
+
 void
 nic_stats_display(portid_t port_id)
 {
@@ -182,6 +202,7 @@ nic_stats_display(portid_t port_id)
 	uint64_t diff_pkts_rx, diff_pkts_tx, diff_bytes_rx, diff_bytes_tx,
 								diff_ns;
 	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
+	int ret;
 	struct rte_eth_stats stats;
 
 	static const char *nic_stats_border = "########################";
@@ -202,7 +223,13 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
-	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+	ret = clock_gettime_monotonic(&cur_time);
+#else
+	ret = clock_gettime(CLOCK_TYPE_ID, &cur_time);
+#endif
+	if (ret == 0) {
 		uint64_t ns;
 
 		ns = cur_time.tv_sec * NS_PER_SEC;
@@ -2674,7 +2701,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
 
 void
 port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
-			 uint hash_key_len)
+			 unsigned int hash_key_len)
 {
 	struct rte_eth_rss_conf rss_conf;
 	int diag;
@@ -3404,13 +3431,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..0fb03b9f9 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,11 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
+#ifndef RTE_EXEC_ENV_WINDOWS
 		nb_seg = random() % tx_pkt_nb_segs + 1;
+#else
+		nb_seg = rand() % tx_pkt_nb_segs + 1;
+#endif
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..9ad04e992 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,9 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +84,10 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index a326c8ce4..a279d5f32 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -15,6 +15,7 @@
 
 #include <sys/queue.h>
 #include <sys/stat.h>
+#include <sys/socket.h>
 
 #include <stdint.h>
 #include <unistd.h>
@@ -200,11 +201,15 @@ usage(char* progname)
 	       "requests flow API isolated mode on all ports at initialization time.\n");
 	printf("  --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n");
 	printf("  --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --hot-plug: enable hot plug for device.\n");
+#endif
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -229,7 +234,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -626,11 +631,15 @@ launch_args_parse(int argc, char** argv)
 		{ "mask-event",			1, 0, 0 },
 		{ "tx-offloads",		1, 0, 0 },
 		{ "rx-offloads",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "hot-plug",			0, 0, 0 },
+#endif
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -742,13 +751,14 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
@@ -1333,8 +1343,10 @@ launch_args_parse(int argc, char** argv)
 					rte_exit(EXIT_FAILURE,
 						 "invalid mask-event argument\n");
 				}
+#ifndef RTE_EXEC_ENV_WINDOWS
 			if (!strcmp(lgopts[opt_idx].name, "hot-plug"))
 				hot_plug = 1;
+#endif
 			if (!strcmp(lgopts[opt_idx].name, "mlockall"))
 				do_mlockall = 1;
 			if (!strcmp(lgopts[opt_idx].name, "no-mlockall"))
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 98c3248c0..764191077 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -61,6 +63,10 @@
 #include <rte_latencystats.h>
 #endif
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
+
 #include "testpmd.h"
 
 #ifndef MAP_HUGETLB
@@ -372,7 +378,9 @@ uint8_t lsc_interrupt = 1; /* enabled by default */
  */
 uint8_t rmv_interrupt = 1; /* enabled by default */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 uint8_t hot_plug = 0; /**< hotplug disabled by default. */
+#endif
 
 /* After attach, port setup is called on event or by iterator */
 bool setup_on_probe_event = true;
@@ -524,9 +532,11 @@ static void check_all_ports_link_status(uint32_t port_mask);
 static int eth_event_callback(portid_t port_id,
 			      enum rte_eth_event_type type,
 			      void *param, void *ret_param);
+#ifndef RTE_EXEC_ENV_WINDOWS
 static void dev_event_callback(const char *device_name,
 				enum rte_dev_event_type type,
 				void *param);
+#endif
 
 /*
  * Check if all the ports are started.
@@ -632,6 +642,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -846,6 +857,7 @@ setup_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, bool huge)
 
 	return 0;
 }
+
 static void
 dma_unmap_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 	     struct rte_mempool_memhdr *memhdr, unsigned mem_idx __rte_unused)
@@ -902,6 +914,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +985,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1006,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1047,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1056,7 +1073,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 			rte_exit(EXIT_FAILURE, "Invalid mempool creation mode\n");
 		}
 	}
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1082,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3047,11 +3065,14 @@ pmd_test_exit(void)
 {
 	portid_t pt_id;
 	unsigned int i;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	int ret;
+#endif
 
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3059,6 +3080,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3072,7 +3094,7 @@ pmd_test_exit(void)
 			close_port(pt_id);
 		}
 	}
-
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (hot_plug) {
 		ret = rte_dev_event_monitor_stop();
 		if (ret) {
@@ -3096,6 +3118,7 @@ pmd_test_exit(void)
 			return;
 		}
 	}
+#endif
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i])
 			rte_mempool_free(mempools[i]);
@@ -3259,6 +3282,7 @@ register_eth_event_callback(void)
 	return 0;
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* This function is used by the interrupt thread */
 static void
 dev_event_callback(const char *device_name, enum rte_dev_event_type type,
@@ -3308,6 +3332,7 @@ dev_event_callback(const char *device_name, enum rte_dev_event_type type,
 		break;
 	}
 }
+#endif
 
 static void
 rxtx_port_config(struct rte_port *port)
@@ -3759,7 +3784,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3834,10 +3861,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3859,6 +3888,7 @@ main(int argc, char** argv)
 
 	init_config();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (hot_plug) {
 		ret = rte_dev_hotplug_handle_enable();
 		if (ret) {
@@ -3882,6 +3912,7 @@ main(int argc, char** argv)
 			return -1;
 		}
 	}
+#endif
 
 	if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
 		rte_exit(EXIT_FAILURE, "Start ports failed\n");
@@ -3969,10 +4000,11 @@ main(int argc, char** argv)
 			return 1;
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	ret = rte_eal_cleanup();
 	if (ret != 0)
 		rte_exit(EXIT_FAILURE,
 			 "EAL cleanup failed: %s\n", strerror(-ret));
-
+#endif
 	return EXIT_SUCCESS;
 }
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index af4085917..c56c813d6 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
@@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
@@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
 
 void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
 void port_rss_hash_key_update(portid_t port_id, char rss_type[],
-			      uint8_t *hash_key, uint hash_key_len);
+			      uint8_t *hash_key, unsigned int hash_key_len);
 int rx_queue_id_is_invalid(queueid_t rxq_id);
 int tx_queue_id_is_invalid(queueid_t txq_id);
 void setup_gro(const char *onoff, portid_t port_id);
diff --git a/lib/librte_eal/windows/include/netinet/in.h b/lib/librte_eal/windows/include/netinet/in.h
index 6455b9ba5..38268cf80 100644
--- a/lib/librte_eal/windows/include/netinet/in.h
+++ b/lib/librte_eal/windows/include/netinet/in.h
@@ -24,6 +24,7 @@
 #define IPPROTO_NONE      59
 #define IPPROTO_DSTOPTS   60
 #define IPPROTO_SCTP     132
+#define IPPROTO_RAW      255
 
 #define INET6_ADDRSTRLEN 46
 
diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index 7ef38ff06..f318a66b8 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -25,6 +25,14 @@ extern "C" {
 #define PATH_MAX _MAX_PATH
 #endif
 
+#define strcasecmp _stricmp
+#define open _open
+#define read _read
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifndef sleep
 #define sleep(x) Sleep(1000 * (x))
 #endif
diff --git a/lib/meson.build b/lib/meson.build
index 7712aa497..295976a4d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -46,6 +46,13 @@ if is_windows
 		'cmdline',
 		'hash',
 		'cfgfile',
+		'metrics',
+		'timer',
+		'gro',
+		'gso',
+		'pdump',
+		'bitratestats',
+		'latencystats',
 	] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-03-19 16:51 ` [dpdk-dev] [PATCH v2] " Jie Zhou
@ 2021-03-21  1:01   ` Dmitry Kozlyuk
       [not found]     ` <BY5PR21MB1426269DDB5427AE20AE4935D0659@BY5PR21MB1426.namprd21.prod.outlook.com>
  2021-03-31 19:10   ` [dpdk-dev] " Kadam, Pallavi
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-03-21  1:01 UTC (permalink / raw)
  To: Jie Zhou, Anatoly Burakov
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

2021-03-19 09:51 (UTC-0700), Jie Zhou:
> Issue under active investigation:
> - Recent DPDK upstream change "eal: detach memsegs on cleanup" exposed
>   failure at eal exit with "EAL: Could not unmap memory: No Error".
>   Investigating KERNELBASE!UnmapViewOfFile. The issue will cause system
>   crash. Currently temporarily remove cleanup at exit on Windows.
>   Will revert after issue root caused and fixed

+Anatoly

It's my fault I assumed "eal: detach memsegs on cleanup" series related to
multiprocess only and didn't properly review it.

The culprit is this code (eal_common_memory.c:1019):

for (i = 0; i < RTE_DIM(mcfg->memsegs); i++) {
	struct rte_memseg_list *msl = &mcfg->memsegs[i];

	/* skip uninitialized segments */
	if (msl->base_va == NULL)
		continue;
	/*
	 * external segments are supposed to be detached at this point,
	 * but if they aren't, we can't really do anything about it,
	 * because if we skip them here, they'll become invalid after
	 * we unmap the memconfig anyway. however, if this is externally
	 * referenced memory, we have no business unmapping it.
	 */
	if (!msl->external)
		if (rte_mem_unmap(msl->base_va, msl->len) != 0)
			RTE_LOG(ERR, EAL, "Could not unmap memory: %s\n",
				strerror(errno));

1. It assumes memory is allocated using mapping, which is not the case for
Windows. Instead of rte_mem_unmap() it should be eal_mem_free(), which is the
same munmap() on Unices. However...

2. It assumes this line will remove all mappings within (base_va, size), as
munmap()/rte_mem_unmap() would do. However, eal_mem_free(base_va, size) is
only guaranteed to work if (base_va, size) came from eal_mem_reserve(size) or
from OS-specific allocation (mmap on Unices, VirtualAlloc2 on Windows).
Because of underlying munmap, it works as desired on Unices, but not on
Windows.

3. A minor, but still: errno -> rte_errno, strerror -> rte_strerror.

I can make eal_mem_free() behave as expected at issue 2.
Or should we simple disable this code when where's no multiprocess support
(how do we test for it properly, BTW)?


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [EXTERNAL] Re: [PATCH v2] app/test-pmd: enable testpmd on windows
       [not found]     ` <BY5PR21MB1426269DDB5427AE20AE4935D0659@BY5PR21MB1426.namprd21.prod.outlook.com>
@ 2021-03-22 22:23       ` Dmitry Kozlyuk
  2021-03-24  9:02         ` David Marchand
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-03-22 22:23 UTC (permalink / raw)
  To: Jie Zhou; +Cc: dev

2021-03-22 21:55 (UTC+0000), Jie Zhou:
> Thank you Dmitry!
> 
> Regarding " I can make eal_mem_free() behave as expected at issue 2. Or should we simple disable this code when where's no multiprocess support (how do we test for it properly, BTW)?". The issue hit when I ran testpmd (with i40e pmd) and at "quit" (which calling into rte_eal_cleanup and reached this rte_mem_unmap). I can test your patch with my local testpmd (which I will add back the rte_eal_cleanup to exercise the code path), if that is what you are asking about test.

Thanks, but it really was a question to Anatoly about how to test if
multiprocess is supported. I can send a patch that kind of works, if you
wish, but I wonder if there's a simpler solution.

Please don't drop Cc so that everyone can see the progress.


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [EXTERNAL] Re: [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-03-22 22:23       ` [dpdk-dev] [EXTERNAL] " Dmitry Kozlyuk
@ 2021-03-24  9:02         ` David Marchand
  0 siblings, 0 replies; 232+ messages in thread
From: David Marchand @ 2021-03-24  9:02 UTC (permalink / raw)
  To: Dmitry Kozlyuk, Burakov, Anatoly
  Cc: Jie Zhou, dev, Thomas Monjalon, Yigit, Ferruh, Bruce Richardson

On Mon, Mar 22, 2021 at 11:23 PM Dmitry Kozlyuk
<dmitry.kozliuk@gmail.com> wrote:
>
> 2021-03-22 21:55 (UTC+0000), Jie Zhou:
> > Thank you Dmitry!
> >
> > Regarding " I can make eal_mem_free() behave as expected at issue 2. Or should we simple disable this code when where's no multiprocess support (how do we test for it properly, BTW)?". The issue hit when I ran testpmd (with i40e pmd) and at "quit" (which calling into rte_eal_cleanup and reached this rte_mem_unmap). I can test your patch with my local testpmd (which I will add back the rte_eal_cleanup to exercise the code path), if that is what you are asking about test.
>
> Thanks, but it really was a question to Anatoly about how to test if
> multiprocess is supported. I can send a patch that kind of works, if you
> wish, but I wonder if there's a simpler solution.
>
> Please don't drop Cc so that everyone can see the progress.
>

When in --in-memory mode, would it be simpler to avoid the cleaning up
code entirely?
It should (I would not say solve but) avoid your issue on Windows
which only supports --in-memory.

If this does not help... Anatoly, the floor is yours.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-03-19 16:51 ` [dpdk-dev] [PATCH v2] " Jie Zhou
  2021-03-21  1:01   ` Dmitry Kozlyuk
@ 2021-03-31 19:10   ` Kadam, Pallavi
  2021-04-02 22:14     ` Jie Zhou
  2021-04-01  8:44   ` Tal Shnaiderman
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 232+ messages in thread
From: Kadam, Pallavi @ 2021-03-31 19:10 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, thomas, bruce.richardson,
	ferruh.yigit


On 3/19/2021 9:51 AM, Jie Zhou wrote:
> From: Jie Zhou <jizh@microsoft.com>
>
> This patch is to enable testpmd on windows. It mainly includes:
> - Enable building libraries on Windows that TestPMD depends on
> - Enable building testpmd on Windows
> - Resolve name collisions with Windows types
> - Add clock_gettime_monotic for testpmd on Windows
> - Make printf format work for both Linux and Windows
> - Add missing macros
> - Add missing IPPROTO_RAW to in.h
> - Replace htons with RTE_BE16
> - Replace inet_aton with inet_pton
> - Fix parse_fec_mode to return fec_capa to remove compilation warning
> - ...
>
> Issue under active investigation:
> - Recent DPDK upstream change "eal: detach memsegs on cleanup" exposed
>    failure at eal exit with "EAL: Could not unmap memory: No Error".
>    Investigating KERNELBASE!UnmapViewOfFile. The issue will cause system
>    crash. Currently temporarily remove cleanup at exit on Windows.
>    Will revert after issue root caused and fixed
>
> Future work:
> - Some issues discovered at validation which need further investigations
>    * Perf inconsistency issues: TPUT fluctuated significantly from runs
>    * After traffic stop, port stats shows pps being 0 while bps not
>    * Currently mempool allocation only succeed with native. Other methods
>      failed at rte_mem_lock/VirtualLock. Thus currently only allow native
> - Hot-plug not supported yet
>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
>
> ---
> V2 changes:
>      - Fix commit message log long line issue
>      - Fix coding style issues of pointer location
>      - Fix indentation issue
>      - Fix FreeBSD2101 compilation issue of AF_INET undeclared
> ---
>   app/meson.build                             |  15 +-
>   app/test-pmd/cmdline.c                      |  12 +-
>   app/test-pmd/cmdline_flow.c                 | 440 ++++++++++----------
>   app/test-pmd/config.c                       |  37 +-
>   app/test-pmd/csumonly.c                     |   4 +
>   app/test-pmd/icmpecho.c                     |   4 +-
>   app/test-pmd/ieee1588fwd.c                  |  10 +-
>   app/test-pmd/parameters.c                   |  18 +-
>   app/test-pmd/testpmd.c                      |  38 +-
>   app/test-pmd/testpmd.h                      |   6 +-
>   lib/librte_eal/windows/include/netinet/in.h |   1 +
>   lib/librte_eal/windows/include/rte_os.h     |   8 +
>   lib/meson.build                             |   7 +
>   13 files changed, 352 insertions(+), 248 deletions(-)
>
> diff --git a/app/meson.build b/app/meson.build
> index 87fc195db..00622933e 100644
> --- a/app/meson.build
> +++ b/app/meson.build
> @@ -1,10 +1,6 @@
>   # SPDX-License-Identifier: BSD-3-Clause
>   # Copyright(c) 2017-2019 Intel Corporation
>   
> -if is_windows
> -	subdir_done()
> -endif
> -
>   apps = [
>   	'pdump',
>   	'proc-info',
> @@ -21,6 +17,11 @@ apps = [
>   	'test-regex',
>   	'test-sad']
>   
> +if is_windows
> +	apps = [
> +		'test-pmd']
> +endif
> +
>   # for BSD only
>   lib_execinfo = cc.find_library('execinfo', required: false)
>   
> @@ -73,5 +74,7 @@ foreach app:apps
>   	endif
>   endforeach
>   
> -# special case the autotests
> -subdir('test')
> +if not(is_windows)
> +	# special case the autotests
> +	subdir('test')
> +endif
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 14110eb2e..35a6dd0d3 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -8,12 +8,14 @@
>   #include <stdio.h>
>   #include <stdint.h>
>   #include <string.h>
> +
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   #include <termios.h>
> +#endif
>   #include <unistd.h>
>   #include <inttypes.h>
>   #include <sys/socket.h>
>   #include <netinet/in.h>
> -
>   #include <sys/queue.h>
>   
>   #include <rte_common.h>
> @@ -3502,7 +3504,7 @@ cmdline_parse_inst_t cmd_stop = {
>   /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
>   
>   unsigned int
> -parse_item_list(char* str, const char* item_name, unsigned int max_items,
> +parse_item_list(const char *str, const char *item_name, unsigned int max_items,
>   		unsigned int *parsed_items, int check_unique_values)
>   {
>   	unsigned int nb_item;
> @@ -16458,17 +16460,17 @@ cmd_set_port_fec_mode_parsed(
>   {
>   	struct cmd_set_port_fec_mode *res = parsed_result;
>   	uint16_t port_id = res->port_id;
> -	uint32_t mode;
> +	uint32_t fec_capa;
>   	int ret;
>   
> -	ret = parse_fec_mode(res->fec_value, &mode);
> +	ret = parse_fec_mode(res->fec_value, &fec_capa);
>   	if (ret < 0) {
>   		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
>   			port_id);
>   		return;
>   	}
>   
> -	ret = rte_eth_fec_set(port_id, mode);
> +	ret = rte_eth_fec_set(port_id, fec_capa);
>   	if (ret == -ENOTSUP) {
>   		printf("Function not implemented\n");
>   		return;
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 49d9f9c04..3ee8c7378 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -31,6 +31,12 @@
>   
>   #include "testpmd.h"
>   
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +#ifndef IPDEFTTL
> +#define IPDEFTTL 64
> +#endif
> +#endif
> +
>   /** Parser token indices. */
>   enum index {
>   	/* Special tokens. */
> @@ -40,21 +46,21 @@ enum index {
>   	END_SET,
>   
>   	/* Common tokens. */
> -	INTEGER,
> -	UNSIGNED,
> -	PREFIX,
> -	BOOLEAN,
> -	STRING,
> -	HEX,
> -	FILE_PATH,
> -	MAC_ADDR,
> -	IPV4_ADDR,
> -	IPV6_ADDR,
> -	RULE_ID,
> -	PORT_ID,
> -	GROUP_ID,
> -	PRIORITY_LEVEL,
> -	SHARED_ACTION_ID,
> +	COMMON_INTEGER,
> +	COMMON_UNSIGNED,
> +	COMMON_PREFIX,
> +	COMMON_BOOLEAN,
> +	COMMON_STRING,
> +	COMMON_HEX,
> +	COMMON_FILE_PATH,
> +	COMMON_MAC_ADDR,
> +	COMMON_IPV4_ADDR,
> +	COMMON_IPV6_ADDR,
> +	COMMON_RULE_ID,
> +	COMMON_PORT_ID,
> +	COMMON_GROUP_ID,
> +	COMMON_PRIORITY_LEVEL,
> +	COMMON_SHARED_ACTION_ID,
>   
>   	/* Top-level command. */
>   	SET,
> @@ -125,7 +131,7 @@ enum index {
>   	SHARED_ACTION_DESTROY_ID,
>   
>   	/* Validate/create pattern. */
> -	PATTERN,
> +	ITEM_PATTERN,
>   	ITEM_PARAM_IS,
>   	ITEM_PARAM_SPEC,
>   	ITEM_PARAM_LAST,
> @@ -858,7 +864,7 @@ static const enum index next_vc_attr[] = {
>   	TRANSFER,
>   	TUNNEL_SET,
>   	TUNNEL_MATCH,
> -	PATTERN,
> +	ITEM_PATTERN,
>   	ZERO,
>   };
>   
> @@ -869,7 +875,7 @@ static const enum index next_destroy_attr[] = {
>   };
>   
>   static const enum index next_dump_attr[] = {
> -	FILE_PATH,
> +	COMMON_FILE_PATH,
>   	END,
>   	ZERO,
>   };
> @@ -1837,104 +1843,104 @@ static const struct token token_list[] = {
>   		.help = "set command may end here",
>   	},
>   	/* Common tokens. */
> -	[INTEGER] = {
> +	[COMMON_INTEGER] = {
>   		.name = "{int}",
>   		.type = "INTEGER",
>   		.help = "integer value",
>   		.call = parse_int,
>   		.comp = comp_none,
>   	},
> -	[UNSIGNED] = {
> +	[COMMON_UNSIGNED] = {
>   		.name = "{unsigned}",
>   		.type = "UNSIGNED",
>   		.help = "unsigned integer value",
>   		.call = parse_int,
>   		.comp = comp_none,
>   	},
> -	[PREFIX] = {
> +	[COMMON_PREFIX] = {
>   		.name = "{prefix}",
>   		.type = "PREFIX",
>   		.help = "prefix length for bit-mask",
>   		.call = parse_prefix,
>   		.comp = comp_none,
>   	},
> -	[BOOLEAN] = {
> +	[COMMON_BOOLEAN] = {
>   		.name = "{boolean}",
>   		.type = "BOOLEAN",
>   		.help = "any boolean value",
>   		.call = parse_boolean,
>   		.comp = comp_boolean,
>   	},
> -	[STRING] = {
> +	[COMMON_STRING] = {
>   		.name = "{string}",
>   		.type = "STRING",
>   		.help = "fixed string",
>   		.call = parse_string,
>   		.comp = comp_none,
>   	},
> -	[HEX] = {
> +	[COMMON_HEX] = {
>   		.name = "{hex}",
> -		.type = "HEX",
> +		.type = "COMMON_HEX",
>   		.help = "fixed string",
>   		.call = parse_hex,
>   	},
> -	[FILE_PATH] = {
> +	[COMMON_FILE_PATH] = {
>   		.name = "{file path}",
>   		.type = "STRING",
>   		.help = "file path",
>   		.call = parse_string0,
>   		.comp = comp_none,
>   	},
> -	[MAC_ADDR] = {
> +	[COMMON_MAC_ADDR] = {
>   		.name = "{MAC address}",
>   		.type = "MAC-48",
>   		.help = "standard MAC address notation",
>   		.call = parse_mac_addr,
>   		.comp = comp_none,
>   	},
> -	[IPV4_ADDR] = {
> +	[COMMON_IPV4_ADDR] = {
>   		.name = "{IPv4 address}",
>   		.type = "IPV4 ADDRESS",
>   		.help = "standard IPv4 address notation",
>   		.call = parse_ipv4_addr,
>   		.comp = comp_none,
>   	},
> -	[IPV6_ADDR] = {
> +	[COMMON_IPV6_ADDR] = {
>   		.name = "{IPv6 address}",
>   		.type = "IPV6 ADDRESS",
>   		.help = "standard IPv6 address notation",
>   		.call = parse_ipv6_addr,
>   		.comp = comp_none,
>   	},
> -	[RULE_ID] = {
> +	[COMMON_RULE_ID] = {
>   		.name = "{rule id}",
>   		.type = "RULE ID",
>   		.help = "rule identifier",
>   		.call = parse_int,
>   		.comp = comp_rule_id,
>   	},
> -	[PORT_ID] = {
> +	[COMMON_PORT_ID] = {
>   		.name = "{port_id}",
>   		.type = "PORT ID",
>   		.help = "port identifier",
>   		.call = parse_port,
>   		.comp = comp_port,
>   	},
> -	[GROUP_ID] = {
> +	[COMMON_GROUP_ID] = {
>   		.name = "{group_id}",
>   		.type = "GROUP ID",
>   		.help = "group identifier",
>   		.call = parse_int,
>   		.comp = comp_none,
>   	},
> -	[PRIORITY_LEVEL] = {
> +	[COMMON_PRIORITY_LEVEL] = {
>   		.name = "{level}",
>   		.type = "PRIORITY",
>   		.help = "priority level",
>   		.call = parse_int,
>   		.comp = comp_none,
>   	},
> -	[SHARED_ACTION_ID] = {
> +	[COMMON_SHARED_ACTION_ID] = {
>   		.name = "{shared_action_id}",
>   		.type = "SHARED_ACTION_ID",
>   		.help = "shared action id",
> @@ -1965,7 +1971,7 @@ static const struct token token_list[] = {
>   		.name = "shared_action",
>   		.type = "{command} {port_id} [{arg} [...]]",
>   		.help = "manage shared actions",
> -		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_sa,
>   	},
> @@ -1980,7 +1986,7 @@ static const struct token token_list[] = {
>   		.name = "update",
>   		.help = "update shared action",
>   		.next = NEXT(NEXT_ENTRY(SHARED_ACTION_SPEC),
> -			     NEXT_ENTRY(SHARED_ACTION_ID)),
> +			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
>   		.call = parse_sa,
>   	},
> @@ -1994,42 +2000,42 @@ static const struct token token_list[] = {
>   	[SHARED_ACTION_QUERY] = {
>   		.name = "query",
>   		.help = "query shared action",
> -		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(SHARED_ACTION_ID)),
> +		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, args.sa.action_id)),
>   		.call = parse_sa,
>   	},
>   	[VALIDATE] = {
>   		.name = "validate",
>   		.help = "check whether a flow rule can be created",
> -		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_vc,
>   	},
>   	[CREATE] = {
>   		.name = "create",
>   		.help = "create a flow rule",
> -		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_vc,
>   	},
>   	[DESTROY] = {
>   		.name = "destroy",
>   		.help = "destroy specific flow rules",
> -		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_destroy,
>   	},
>   	[FLUSH] = {
>   		.name = "flush",
>   		.help = "destroy all flow rules",
> -		.next = NEXT(NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_flush,
>   	},
>   	[DUMP] = {
>   		.name = "dump",
>   		.help = "dump all flow rules to file",
> -		.next = NEXT(next_dump_attr, NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
>   			     ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_dump,
> @@ -2038,8 +2044,8 @@ static const struct token token_list[] = {
>   		.name = "query",
>   		.help = "query an existing flow rule",
>   		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
> -			     NEXT_ENTRY(RULE_ID),
> -			     NEXT_ENTRY(PORT_ID)),
> +			     NEXT_ENTRY(COMMON_RULE_ID),
> +			     NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
>   			     ARGS_ENTRY(struct buffer, args.query.rule),
>   			     ARGS_ENTRY(struct buffer, port)),
> @@ -2048,22 +2054,22 @@ static const struct token token_list[] = {
>   	[LIST] = {
>   		.name = "list",
>   		.help = "list existing flow rules",
> -		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_list,
>   	},
>   	[AGED] = {
>   		.name = "aged",
>   		.help = "list and destroy aged flows",
> -		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_aged,
>   	},
>   	[ISOLATE] = {
>   		.name = "isolate",
>   		.help = "restrict ingress traffic to the defined flow rules",
> -		.next = NEXT(NEXT_ENTRY(BOOLEAN),
> -			     NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
> +			     NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
>   			     ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_isolate,
> @@ -2080,14 +2086,14 @@ static const struct token token_list[] = {
>   		.name = "create",
>   		.help = "create new tunnel object",
>   		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
> -			     NEXT_ENTRY(PORT_ID)),
> +			     NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_tunnel,
>   	},
>   	[TUNNEL_CREATE_TYPE] = {
>   		.name = "type",
>   		.help = "create new tunnel",
> -		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
> +		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
>   		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
>   		.call = parse_tunnel,
>   	},
> @@ -2095,21 +2101,21 @@ static const struct token token_list[] = {
>   		.name = "destroy",
>   		.help = "destroy tunel",
>   		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
> -			     NEXT_ENTRY(PORT_ID)),
> +			     NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_tunnel,
>   	},
>   	[TUNNEL_DESTROY_ID] = {
>   		.name = "id",
>   		.help = "tunnel identifier to testroy",
> -		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
>   		.call = parse_tunnel,
>   	},
>   	[TUNNEL_LIST] = {
>   		.name = "list",
>   		.help = "list existing tunnels",
> -		.next = NEXT(NEXT_ENTRY(PORT_ID)),
> +		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
>   		.call = parse_tunnel,
>   	},
> @@ -2117,7 +2123,7 @@ static const struct token token_list[] = {
>   	[DESTROY_RULE] = {
>   		.name = "rule",
>   		.help = "specify a rule identifier",
> -		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
> +		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
>   		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
>   		.call = parse_destroy,
>   	},
> @@ -2133,7 +2139,7 @@ static const struct token token_list[] = {
>   	[LIST_GROUP] = {
>   		.name = "group",
>   		.help = "specify a group",
> -		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
> +		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
>   		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
>   		.call = parse_list,
>   	},
> @@ -2147,14 +2153,14 @@ static const struct token token_list[] = {
>   	[GROUP] = {
>   		.name = "group",
>   		.help = "specify a group",
> -		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
> +		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
>   		.call = parse_vc,
>   	},
>   	[PRIORITY] = {
>   		.name = "priority",
>   		.help = "specify a priority level",
> -		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
> +		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
>   		.call = parse_vc,
>   	},
> @@ -2179,19 +2185,19 @@ static const struct token token_list[] = {
>   	[TUNNEL_SET] = {
>   		.name = "tunnel_set",
>   		.help = "tunnel steer rule",
> -		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
>   		.call = parse_vc,
>   	},
>   	[TUNNEL_MATCH] = {
>   		.name = "tunnel_match",
>   		.help = "tunnel match rule",
> -		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
>   		.call = parse_vc,
>   	},
>   	/* Validate/create pattern. */
> -	[PATTERN] = {
> +	[ITEM_PATTERN] = {
>   		.name = "pattern",
>   		.help = "submit a list of pattern items",
>   		.next = NEXT(next_item),
> @@ -2258,7 +2264,7 @@ static const struct token token_list[] = {
>   	[ITEM_ANY_NUM] = {
>   		.name = "num",
>   		.help = "number of layers covered",
> -		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
>   	},
>   	[ITEM_PF] = {
> @@ -2278,7 +2284,7 @@ static const struct token token_list[] = {
>   	[ITEM_VF_ID] = {
>   		.name = "id",
>   		.help = "VF ID",
> -		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
>   	},
>   	[ITEM_PHY_PORT] = {
> @@ -2292,7 +2298,7 @@ static const struct token token_list[] = {
>   	[ITEM_PHY_PORT_INDEX] = {
>   		.name = "index",
>   		.help = "physical port index",
> -		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
>   	},
>   	[ITEM_PORT_ID] = {
> @@ -2306,7 +2312,7 @@ static const struct token token_list[] = {
>   	[ITEM_PORT_ID_ID] = {
>   		.name = "id",
>   		.help = "DPDK port ID",
> -		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
>   	},
>   	[ITEM_MARK] = {
> @@ -2319,7 +2325,7 @@ static const struct token token_list[] = {
>   	[ITEM_MARK_ID] = {
>   		.name = "id",
>   		.help = "Integer value to match against",
> -		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
>   	},
>   	[ITEM_RAW] = {
> @@ -2332,34 +2338,34 @@ static const struct token token_list[] = {
>   	[ITEM_RAW_RELATIVE] = {
>   		.name = "relative",
>   		.help = "look for pattern after the previous item",
> -		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
> +		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
>   					   relative, 1)),
>   	},
>   	[ITEM_RAW_SEARCH] = {
>   		.name = "search",
>   		.help = "search pattern from offset (see also limit)",
> -		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
> +		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
>   					   search, 1)),
>   	},
>   	[ITEM_RAW_OFFSET] = {
>   		.name = "offset",
>   		.help = "absolute or relative offset for pattern",
> -		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
> +		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
>   	},
>   	[ITEM_RAW_LIMIT] = {
>   		.name = "limit",
>   		.help = "search area limit for start of pattern",
> -		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
>   	},
>   	[ITEM_RAW_PATTERN] = {
>   		.name = "pattern",
>   		.help = "byte string to look for",
>   		.next = NEXT(item_raw,
> -			     NEXT_ENTRY(STRING),
> +			     NEXT_ENTRY(COMMON_STRING),
>   			     NEXT_ENTRY(ITEM_PARAM_IS,
>   					ITEM_PARAM_SPEC,
>   					ITEM_PARAM_MASK)),
> @@ -2378,25 +2384,25 @@ static const struct token token_list[] = {
>   	[ITEM_ETH_DST] = {
>   		.name = "dst",
>   		.help = "destination MAC",
> -		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
> +		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
>   	},
>   	[ITEM_ETH_SRC] = {
>   		.name = "src",
>   		.help = "source MAC",
> -		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
> +		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
>   	},
>   	[ITEM_ETH_TYPE] = {
>   		.name = "type",
>   		.help = "EtherType",
> -		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
>   	},
>   	[ITEM_ETH_HAS_VLAN] = {
>   		.name = "has_vlan",
>   		.help = "packet header contains VLAN",
> -		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
>   					   has_vlan, 1)),
>   	},
> @@ -2410,41 +2416,41 @@ static const struct token token_list[] = {
>   	[ITEM_VLAN_TCI] = {
>   		.name = "tci",
>   		.help = "tag control information",
> -		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
>   	},
>   	[ITEM_VLAN_PCP] = {
>   		.name = "pcp",
>   		.help = "priority code point",
> -		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
>   						  tci, "\xe0\x00")),
>   	},
>   	[ITEM_VLAN_DEI] = {
>   		.name = "dei",
>   		.help = "drop eligible indicator",
> -		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
>   						  tci, "\x10\x00")),
>   	},
>   	[ITEM_VLAN_VID] = {
>   		.name = "vid",
>   		.help = "VLAN identifier",
> -		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
>   						  tci, "\x0f\xff")),
>   	},
>   	[ITEM_VLAN_INNER_TYPE] = {
>   		.name = "inner_type",
>   		.help = "inner EtherType",
> -		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
>   					     inner_type)),
>   	},
>   	[ITEM_VLAN_HAS_MORE_VLAN] = {
>   		.name = "has_more_vlan",
>   		.help = "packet header contains another VLAN",
> -		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
>   					   has_more_vlan, 1)),
>   	},
> @@ -2458,42 +2464,42 @@ static const struct token token_list[] = {
>   	[ITEM_IPV4_TOS] = {
>   		.name = "tos",
>   		.help = "type of service",
> -		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
>   					     hdr.type_of_service)),
>   	},
>   	[ITEM_IPV4_FRAGMENT_OFFSET] = {
>   		.name = "fragment_offset",
>   		.help = "fragmentation flags and fragment offset",
> -		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
>   					     hdr.fragment_offset)),
>   	},
>   	[ITEM_IPV4_TTL] = {
>   		.name = "ttl",
>   		.help = "time to live",
> -		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
>   					     hdr.time_to_live)),
>   	},
>   	[ITEM_IPV4_PROTO] = {
>   		.name = "proto",
>   		.help = "next protocol ID",
> -		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
>   					     hdr.next_proto_id)),
>   	},
>   	[ITEM_IPV4_SRC] = {
>   		.name = "src",
>   		.help = "source address",
> -		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
> +		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
>   					     hdr.src_addr)),
>   	},
>   	[ITEM_IPV4_DST] = {
>   		.name = "dst",
>   		.help = "destination address",
> -		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
> +		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
>   					     hdr.dst_addr)),
>   	},
> @@ -2507,7 +2513,7 @@ static const struct token token_list[] = {
>   	[ITEM_IPV6_TC] = {
>   		.name = "tc",
>   		.help = "traffic class",
> -		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
>   						  hdr.vtc_flow,
>   						  "\x0f\xf0\x00\x00")),
> @@ -2515,7 +2521,7 @@ static const struct token token_list[] = {
>   	[ITEM_IPV6_FLOW] = {
>   		.name = "flow",
>   		.help = "flow label",
> -		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
>   						  hdr.vtc_flow,
>   						  "\x00\x0f\xff\xff")),
> @@ -2523,35 +2529,35 @@ static const struct token token_list[] = {
>   	[ITEM_IPV6_PROTO] = {
>   		.name = "proto",
>   		.help = "protocol (next header)",
> -		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
>   					     hdr.proto)),
>   	},
>   	[ITEM_IPV6_HOP] = {
>   		.name = "hop",
>   		.help = "hop limit",
> -		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
>   					     hdr.hop_limits)),
>   	},
>   	[ITEM_IPV6_SRC] = {
>   		.name = "src",
>   		.help = "source address",
> -		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
> +		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
>   					     hdr.src_addr)),
>   	},
>   	[ITEM_IPV6_DST] = {
>   		.name = "dst",
>   		.help = "destination address",
> -		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
> +		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
>   					     hdr.dst_addr)),
>   	},
>   	[ITEM_IPV6_HAS_FRAG_EXT] = {
>   		.name = "has_frag_ext",
>   		.help = "fragment packet attribute",
> -		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
>   					   has_frag_ext, 1)),
>   	},
> @@ -2565,28 +2571,28 @@ static const struct token token_list[] = {
>   	[ITEM_ICMP_TYPE] = {
>   		.name = "type",
>   		.help = "ICMP packet type",
> -		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
>   					     hdr.icmp_type)),
>   	},
>   	[ITEM_ICMP_CODE] = {
>   		.name = "code",
>   		.help = "ICMP packet code",
> -		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
>   					     hdr.icmp_code)),
>   	},
>   	[ITEM_ICMP_IDENT] = {
>   		.name = "ident",
>   		.help = "ICMP packet identifier",
> -		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
>   					     hdr.icmp_ident)),
>   	},
>   	[ITEM_ICMP_SEQ] = {
>   		.name = "seq",
>   		.help = "ICMP packet sequence number",
> -		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
>   					     hdr.icmp_seq_nb)),
>   	},
> @@ -2600,14 +2606,14 @@ static const struct token token_list[] = {
>   	[ITEM_UDP_SRC] = {
>   		.name = "src",
>   		.help = "UDP source port",
> -		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
>   					     hdr.src_port)),
>   	},
>   	[ITEM_UDP_DST] = {
>   		.name = "dst",
>   		.help = "UDP destination port",
> -		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
>   					     hdr.dst_port)),
>   	},
> @@ -2621,21 +2627,21 @@ static const struct token token_list[] = {
>   	[ITEM_TCP_SRC] = {
>   		.name = "src",
>   		.help = "TCP source port",
> -		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
>   					     hdr.src_port)),
>   	},
>   	[ITEM_TCP_DST] = {
>   		.name = "dst",
>   		.help = "TCP destination port",
> -		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
>   					     hdr.dst_port)),
>   	},
>   	[ITEM_TCP_FLAGS] = {
>   		.name = "flags",
>   		.help = "TCP flags",
> -		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
>   					     hdr.tcp_flags)),
>   	},
> @@ -2649,28 +2655,28 @@ static const struct token token_list[] = {
>   	[ITEM_SCTP_SRC] = {
>   		.name = "src",
>   		.help = "SCTP source port",
> -		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
>   					     hdr.src_port)),
>   	},
>   	[ITEM_SCTP_DST] = {
>   		.name = "dst",
>   		.help = "SCTP destination port",
> -		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
>   					     hdr.dst_port)),
>   	},
>   	[ITEM_SCTP_TAG] = {
>   		.name = "tag",
>   		.help = "validation tag",
> -		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
>   					     hdr.tag)),
>   	},
>   	[ITEM_SCTP_CKSUM] = {
>   		.name = "cksum",
>   		.help = "checksum",
> -		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
>   					     hdr.cksum)),
>   	},
> @@ -2684,7 +2690,7 @@ static const struct token token_list[] = {
>   	[ITEM_VXLAN_VNI] = {
>   		.name = "vni",
>   		.help = "VXLAN identifier",
> -		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
>   	},
>   	[ITEM_E_TAG] = {
> @@ -2697,7 +2703,7 @@ static const struct token token_list[] = {
>   	[ITEM_E_TAG_GRP_ECID_B] = {
>   		.name = "grp_ecid_b",
>   		.help = "GRP and E-CID base",
> -		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
>   						  rsvd_grp_ecid_b,
>   						  "\x3f\xff")),
> @@ -2712,7 +2718,7 @@ static const struct token token_list[] = {
>   	[ITEM_NVGRE_TNI] = {
>   		.name = "tni",
>   		.help = "virtual subnet ID",
> -		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
>   	},
>   	[ITEM_MPLS] = {
> @@ -2725,7 +2731,7 @@ static const struct token token_list[] = {
>   	[ITEM_MPLS_LABEL] = {
>   		.name = "label",
>   		.help = "MPLS label",
> -		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
>   						  label_tc_s,
>   						  "\xff\xff\xf0")),
> @@ -2733,7 +2739,7 @@ static const struct token token_list[] = {
>   	[ITEM_MPLS_TC] = {
>   		.name = "tc",
>   		.help = "MPLS Traffic Class",
> -		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
>   						  label_tc_s,
>   						  "\x00\x00\x0e")),
> @@ -2741,7 +2747,7 @@ static const struct token token_list[] = {
>   	[ITEM_MPLS_S] = {
>   		.name = "s",
>   		.help = "MPLS Bottom-of-Stack",
> -		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
>   						  label_tc_s,
>   						  "\x00\x00\x01")),
> @@ -2756,7 +2762,7 @@ static const struct token token_list[] = {
>   	[ITEM_GRE_PROTO] = {
>   		.name = "protocol",
>   		.help = "GRE protocol type",
> -		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
>   					     protocol)),
>   	},
> @@ -2766,14 +2772,14 @@ static const struct token token_list[] = {
>   			"checksum (1b), undefined (1b), key bit (1b),"
>   			" sequence number (1b), reserved 0 (9b),"
>   			" version (3b)",
> -		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
>   					     c_rsvd0_ver)),
>   	},
>   	[ITEM_GRE_C_BIT] = {
>   		.name = "c_bit",
>   		.help = "checksum bit (C)",
> -		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
> +		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
>   						  c_rsvd0_ver,
>   						  "\x80\x00\x00\x00")),
> @@ -2781,7 +2787,7 @@ static const struct token token_list[] = {
>   	[ITEM_GRE_S_BIT] = {
>   		.name = "s_bit",
>   		.help = "sequence number bit (S)",
> -		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
> +		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
>   						  c_rsvd0_ver,
>   						  "\x10\x00\x00\x00")),
> @@ -2789,7 +2795,7 @@ static const struct token token_list[] = {
>   	[ITEM_GRE_K_BIT] = {
>   		.name = "k_bit",
>   		.help = "key bit (K)",
> -		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
> +		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
>   						  c_rsvd0_ver,
>   						  "\x20\x00\x00\x00")),
> @@ -2805,7 +2811,7 @@ static const struct token token_list[] = {
>   	[ITEM_FUZZY_THRESH] = {
>   		.name = "thresh",
>   		.help = "match accuracy threshold",
> -		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
>   					thresh)),
>   	},
> @@ -2819,20 +2825,20 @@ static const struct token token_list[] = {
>   	[ITEM_GTP_FLAGS] = {
>   		.name = "v_pt_rsv_flags",
>   		.help = "GTP flags",
> -		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
>   					v_pt_rsv_flags)),
>   	},
>   	[ITEM_GTP_MSG_TYPE] = {
>   		.name = "msg_type",
>   		.help = "GTP message type",
> -		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
>   	},
>   	[ITEM_GTP_TEID] = {
>   		.name = "teid",
>   		.help = "tunnel endpoint identifier",
> -		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
>   	},
>   	[ITEM_GTPC] = {
> @@ -2859,20 +2865,20 @@ static const struct token token_list[] = {
>   	[ITEM_GENEVE_VNI] = {
>   		.name = "vni",
>   		.help = "virtual network identifier",
> -		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
> +		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.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),
> +		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
>   						  ver_opt_len_o_c_rsvd0,
>   						  "\x3f\x00")),
> @@ -2888,7 +2894,7 @@ static const struct token token_list[] = {
>   	[ITEM_VXLAN_GPE_VNI] = {
>   		.name = "vni",
>   		.help = "VXLAN-GPE identifier",
> -		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
>   					     vni)),
>   	},
> @@ -2903,7 +2909,7 @@ static const struct token token_list[] = {
>   	[ITEM_ARP_ETH_IPV4_SHA] = {
>   		.name = "sha",
>   		.help = "sender hardware address",
> -		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
> +		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
>   					     sha)),
> @@ -2911,7 +2917,7 @@ static const struct token token_list[] = {
>   	[ITEM_ARP_ETH_IPV4_SPA] = {
>   		.name = "spa",
>   		.help = "sender IPv4 address",
> -		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
> +		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
>   					     spa)),
> @@ -2919,7 +2925,7 @@ static const struct token token_list[] = {
>   	[ITEM_ARP_ETH_IPV4_THA] = {
>   		.name = "tha",
>   		.help = "target hardware address",
> -		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
> +		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
>   					     tha)),
> @@ -2927,7 +2933,7 @@ static const struct token token_list[] = {
>   	[ITEM_ARP_ETH_IPV4_TPA] = {
>   		.name = "tpa",
>   		.help = "target IPv4 address",
> -		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
> +		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
>   					     tpa)),
> @@ -2943,7 +2949,7 @@ static const struct token token_list[] = {
>   	[ITEM_IPV6_EXT_NEXT_HDR] = {
>   		.name = "next_hdr",
>   		.help = "next header",
> -		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
>   					     next_hdr)),
>   	},
> @@ -2958,7 +2964,7 @@ static const struct token token_list[] = {
>   	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
>   		.name = "next_hdr",
>   		.help = "next header",
> -		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
> +		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
>   					hdr.next_header)),
> @@ -2966,7 +2972,7 @@ static const struct token token_list[] = {
>   	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
>   		.name = "frag_data",
>   		.help = "Fragment flags and offset",
> -		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
> +		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
>   					     hdr.frag_data)),
> @@ -2981,14 +2987,14 @@ static const struct token token_list[] = {
>   	[ITEM_ICMP6_TYPE] = {
>   		.name = "type",
>   		.help = "ICMPv6 type",
> -		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
>   					     type)),
>   	},
>   	[ITEM_ICMP6_CODE] = {
>   		.name = "code",
>   		.help = "ICMPv6 code",
> -		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
>   					     code)),
>   	},
> @@ -3003,7 +3009,7 @@ static const struct token token_list[] = {
>   	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
>   		.name = "target_addr",
>   		.help = "target address",
> -		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
> +		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
>   					     target_addr)),
> @@ -3019,7 +3025,7 @@ static const struct token token_list[] = {
>   	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
>   		.name = "target_addr",
>   		.help = "target address",
> -		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
> +		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
>   					     target_addr)),
> @@ -3036,7 +3042,7 @@ static const struct token token_list[] = {
>   	[ITEM_ICMP6_ND_OPT_TYPE] = {
>   		.name = "type",
>   		.help = "ND option type",
> -		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
> +		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
>   					     type)),
> @@ -3054,7 +3060,7 @@ static const struct token token_list[] = {
>   	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
>   		.name = "sla",
>   		.help = "source Ethernet LLA",
> -		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
> +		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
> @@ -3072,7 +3078,7 @@ static const struct token token_list[] = {
>   	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
>   		.name = "tla",
>   		.help = "target Ethernet LLA",
> -		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
> +		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
> @@ -3087,7 +3093,7 @@ static const struct token token_list[] = {
>   	[ITEM_META_DATA] = {
>   		.name = "data",
>   		.help = "metadata value",
> -		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
>   					     data, "\xff\xff\xff\xff")),
>   	},
> @@ -3101,7 +3107,7 @@ static const struct token token_list[] = {
>   	[ITEM_GRE_KEY_VALUE] = {
>   		.name = "value",
>   		.help = "key value",
> -		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
>   	},
>   	[ITEM_GTP_PSC] = {
> @@ -3115,14 +3121,14 @@ static const struct token token_list[] = {
>   	[ITEM_GTP_PSC_QFI] = {
>   		.name = "qfi",
>   		.help = "QoS flow identifier",
> -		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
>   					qfi)),
>   	},
>   	[ITEM_GTP_PSC_PDU_T] = {
>   		.name = "pdu_t",
>   		.help = "PDU type",
> -		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
>   					pdu_type)),
>   	},
> @@ -3143,7 +3149,7 @@ static const struct token token_list[] = {
>   	[ITEM_PPPOE_SEID] = {
>   		.name = "seid",
>   		.help = "session identifier",
> -		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
>   					session_id)),
>   	},
> @@ -3152,7 +3158,7 @@ static const struct token token_list[] = {
>   		.help = "match PPPoE session protocol identifier",
>   		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
>   				sizeof(struct rte_flow_item_pppoe_proto_id)),
> -		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
> +		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
>   			     item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
> @@ -3169,14 +3175,14 @@ static const struct token token_list[] = {
>   	[ITEM_HIGIG2_CLASSIFICATION] = {
>   		.name = "classification",
>   		.help = "matches classification of higig2 header",
> -		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
>   					hdr.ppt1.classification)),
>   	},
>   	[ITEM_HIGIG2_VID] = {
>   		.name = "vid",
>   		.help = "matches vid of higig2 header",
> -		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
>   					hdr.ppt1.vid)),
>   	},
> @@ -3190,13 +3196,13 @@ static const struct token token_list[] = {
>   	[ITEM_TAG_DATA] = {
>   		.name = "data",
>   		.help = "tag value to match",
> -		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
>   	},
>   	[ITEM_TAG_INDEX] = {
>   		.name = "index",
>   		.help = "index of tag array to match",
> -		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
> +		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
>   			     NEXT_ENTRY(ITEM_PARAM_IS)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
>   	},
> @@ -3211,7 +3217,7 @@ static const struct token token_list[] = {
>   	[ITEM_L2TPV3OIP_SESSION_ID] = {
>   		.name = "session_id",
>   		.help = "session identifier",
> -		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
>   					     session_id)),
>   	},
> @@ -3225,7 +3231,7 @@ static const struct token token_list[] = {
>   	[ITEM_ESP_SPI] = {
>   		.name = "spi",
>   		.help = "security policy index",
> -		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
>   				hdr.spi)),
>   	},
> @@ -3239,7 +3245,7 @@ static const struct token token_list[] = {
>   	[ITEM_AH_SPI] = {
>   		.name = "spi",
>   		.help = "security parameters index",
> -		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
>   	},
>   	[ITEM_PFCP] = {
> @@ -3252,14 +3258,14 @@ static const struct token token_list[] = {
>   	[ITEM_PFCP_S_FIELD] = {
>   		.name = "s_field",
>   		.help = "S field",
> -		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
>   				s_field)),
>   	},
>   	[ITEM_PFCP_SEID] = {
>   		.name = "seid",
>   		.help = "session endpoint identifier",
> -		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
>   	},
>   	[ITEM_ECPRI] = {
> @@ -3292,7 +3298,7 @@ static const struct token token_list[] = {
>   		.help = "Physical Channel ID",
>   		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
>   				ITEM_ECPRI_COMMON, ITEM_NEXT),
> -				NEXT_ENTRY(UNSIGNED), item_param),
> +				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
>   				hdr.type0.pc_id)),
>   	},
> @@ -3308,7 +3314,7 @@ static const struct token token_list[] = {
>   		.help = "Real-Time Control Data ID",
>   		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
>   				ITEM_ECPRI_COMMON, ITEM_NEXT),
> -				NEXT_ENTRY(UNSIGNED), item_param),
> +				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
>   				hdr.type2.rtc_id)),
>   	},
> @@ -3324,7 +3330,7 @@ static const struct token token_list[] = {
>   		.help = "Measurement ID",
>   		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
>   				ITEM_ECPRI_COMMON, ITEM_NEXT),
> -				NEXT_ENTRY(UNSIGNED), item_param),
> +				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
>   				hdr.type5.msr_id)),
>   	},
> @@ -3340,21 +3346,21 @@ static const struct token token_list[] = {
>   	[ITEM_GENEVE_OPT_CLASS]	= {
>   		.name = "class",
>   		.help = "GENEVE option class",
> -		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
>   					     option_class)),
>   	},
>   	[ITEM_GENEVE_OPT_TYPE] = {
>   		.name = "type",
>   		.help = "GENEVE option type",
> -		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
>   					option_type)),
>   	},
>   	[ITEM_GENEVE_OPT_LENGTH] = {
>   		.name = "length",
>   		.help = "GENEVE option data length (in 32b words)",
> -		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
> +		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
>   		.args = ARGS(ARGS_ENTRY_BOUNDED(
>   				struct rte_flow_item_geneve_opt, option_len,
>   				0, 31)),
> @@ -3362,7 +3368,7 @@ static const struct token token_list[] = {
>   	[ITEM_GENEVE_OPT_DATA] = {
>   		.name = "data",
>   		.help = "GENEVE option data pattern",
> -		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
> +		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
>   			     ARGS_ENTRY_ARB(0, 0),
>   			     ARGS_ENTRY_ARB
> @@ -3411,7 +3417,7 @@ static const struct token token_list[] = {
>   	[ACTION_JUMP_GROUP] = {
>   		.name = "group",
>   		.help = "group to redirect traffic to",
> -		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
>   		.call = parse_vc_conf,
>   	},
> @@ -3425,7 +3431,7 @@ static const struct token token_list[] = {
>   	[ACTION_MARK_ID] = {
>   		.name = "id",
>   		.help = "32 bit value to return with packets",
> -		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
>   		.call = parse_vc_conf,
>   	},
> @@ -3447,7 +3453,7 @@ static const struct token token_list[] = {
>   	[ACTION_QUEUE_INDEX] = {
>   		.name = "index",
>   		.help = "queue index to use",
> -		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
>   		.call = parse_vc_conf,
>   	},
> @@ -3469,14 +3475,14 @@ static const struct token token_list[] = {
>   	[ACTION_COUNT_ID] = {
>   		.name = "identifier",
>   		.help = "counter identifier to use",
> -		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
>   		.call = parse_vc_conf,
>   	},
>   	[ACTION_COUNT_SHARED] = {
>   		.name = "shared",
>   		.help = "shared counter",
> -		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
> +		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
>   					   shared, 1)),
>   		.call = parse_vc_conf,
> @@ -3520,7 +3526,7 @@ static const struct token token_list[] = {
>   	[ACTION_RSS_LEVEL] = {
>   		.name = "level",
>   		.help = "encapsulation level for \"types\"",
> -		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_ARB
>   			     (offsetof(struct action_rss_data, conf) +
>   			      offsetof(struct rte_flow_action_rss, level),
> @@ -3541,7 +3547,7 @@ static const struct token token_list[] = {
>   	[ACTION_RSS_KEY] = {
>   		.name = "key",
>   		.help = "RSS hash key",
> -		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
> +		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
>   		.args = ARGS(ARGS_ENTRY_ARB
>   			     (offsetof(struct action_rss_data, conf) +
>   			      offsetof(struct rte_flow_action_rss, key),
> @@ -3556,7 +3562,7 @@ static const struct token token_list[] = {
>   	[ACTION_RSS_KEY_LEN] = {
>   		.name = "key_len",
>   		.help = "RSS hash key length in bytes",
> -		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
>   			     (offsetof(struct action_rss_data, conf) +
>   			      offsetof(struct rte_flow_action_rss, key_len),
> @@ -3594,7 +3600,7 @@ static const struct token token_list[] = {
>   	[ACTION_VF_ORIGINAL] = {
>   		.name = "original",
>   		.help = "use original VF ID if possible",
> -		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
> +		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
>   					   original, 1)),
>   		.call = parse_vc_conf,
> @@ -3602,7 +3608,7 @@ static const struct token token_list[] = {
>   	[ACTION_VF_ID] = {
>   		.name = "id",
>   		.help = "VF ID",
> -		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
>   		.call = parse_vc_conf,
>   	},
> @@ -3617,7 +3623,7 @@ static const struct token token_list[] = {
>   	[ACTION_PHY_PORT_ORIGINAL] = {
>   		.name = "original",
>   		.help = "use original port index if possible",
> -		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
> +		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
>   					   original, 1)),
>   		.call = parse_vc_conf,
> @@ -3625,7 +3631,7 @@ static const struct token token_list[] = {
>   	[ACTION_PHY_PORT_INDEX] = {
>   		.name = "index",
>   		.help = "physical port index",
> -		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
>   					index)),
>   		.call = parse_vc_conf,
> @@ -3641,7 +3647,7 @@ static const struct token token_list[] = {
>   	[ACTION_PORT_ID_ORIGINAL] = {
>   		.name = "original",
>   		.help = "use original DPDK port ID if possible",
> -		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
> +		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
>   					   original, 1)),
>   		.call = parse_vc_conf,
> @@ -3649,7 +3655,7 @@ static const struct token token_list[] = {
>   	[ACTION_PORT_ID_ID] = {
>   		.name = "id",
>   		.help = "DPDK port ID",
> -		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
>   		.call = parse_vc_conf,
>   	},
> @@ -3664,7 +3670,7 @@ static const struct token token_list[] = {
>   	[ACTION_METER_ID] = {
>   		.name = "mtr_id",
>   		.help = "meter id to use",
> -		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
>   		.call = parse_vc_conf,
>   	},
> @@ -3680,7 +3686,7 @@ static const struct token token_list[] = {
>   	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
>   		.name = "mpls_ttl",
>   		.help = "MPLS TTL",
> -		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
>   					mpls_ttl)),
>   		.call = parse_vc_conf,
> @@ -3704,7 +3710,7 @@ static const struct token token_list[] = {
>   	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
>   		.name = "nw_ttl",
>   		.help = "IP TTL",
> -		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
>   					nw_ttl)),
>   		.call = parse_vc_conf,
> @@ -3749,7 +3755,7 @@ static const struct token token_list[] = {
>   	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
>   		.name = "ethertype",
>   		.help = "EtherType",
> -		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_of_push_vlan,
>   			      ethertype)),
> @@ -3767,7 +3773,7 @@ static const struct token token_list[] = {
>   	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
>   		.name = "vlan_vid",
>   		.help = "VLAN id",
> -		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_of_set_vlan_vid,
>   			      vlan_vid)),
> @@ -3785,7 +3791,7 @@ static const struct token token_list[] = {
>   	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
>   		.name = "vlan_pcp",
>   		.help = "VLAN priority",
> -		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_of_set_vlan_pcp,
>   			      vlan_pcp)),
> @@ -3802,7 +3808,7 @@ static const struct token token_list[] = {
>   	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
>   		.name = "ethertype",
>   		.help = "EtherType",
> -		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_of_pop_mpls,
>   			      ethertype)),
> @@ -3820,7 +3826,7 @@ static const struct token token_list[] = {
>   	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
>   		.name = "ethertype",
>   		.help = "EtherType",
> -		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_of_push_mpls,
>   			      ethertype)),
> @@ -3928,7 +3934,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
>   		.name = "ipv4_addr",
>   		.help = "new IPv4 source address to set",
> -		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
> +		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			(struct rte_flow_action_set_ipv4, ipv4_addr)),
>   		.call = parse_vc_conf,
> @@ -3945,7 +3951,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_IPV4_DST_IPV4_DST] = {
>   		.name = "ipv4_addr",
>   		.help = "new IPv4 destination address to set",
> -		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
> +		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			(struct rte_flow_action_set_ipv4, ipv4_addr)),
>   		.call = parse_vc_conf,
> @@ -3962,7 +3968,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
>   		.name = "ipv6_addr",
>   		.help = "new IPv6 source address to set",
> -		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
> +		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			(struct rte_flow_action_set_ipv6, ipv6_addr)),
>   		.call = parse_vc_conf,
> @@ -3979,7 +3985,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_IPV6_DST_IPV6_DST] = {
>   		.name = "ipv6_addr",
>   		.help = "new IPv6 destination address to set",
> -		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
> +		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			(struct rte_flow_action_set_ipv6, ipv6_addr)),
>   		.call = parse_vc_conf,
> @@ -3996,7 +4002,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_TP_SRC_TP_SRC] = {
>   		.name = "port",
>   		.help = "new source port number to set",
> -		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_set_tp, port)),
>   		.call = parse_vc_conf,
> @@ -4013,7 +4019,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_TP_DST_TP_DST] = {
>   		.name = "port",
>   		.help = "new destination port number to set",
> -		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_set_tp, port)),
>   		.call = parse_vc_conf,
> @@ -4044,7 +4050,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_TTL_TTL] = {
>   		.name = "ttl_value",
>   		.help = "new ttl value to set",
> -		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_set_ttl, ttl_value)),
>   		.call = parse_vc_conf,
> @@ -4060,7 +4066,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_MAC_SRC_MAC_SRC] = {
>   		.name = "mac_addr",
>   		.help = "new source mac address",
> -		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
> +		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_set_mac, mac_addr)),
>   		.call = parse_vc_conf,
> @@ -4076,7 +4082,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_MAC_DST_MAC_DST] = {
>   		.name = "mac_addr",
>   		.help = "new destination mac address to set",
> -		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
> +		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
>   		.args = ARGS(ARGS_ENTRY_HTON
>   			     (struct rte_flow_action_set_mac, mac_addr)),
>   		.call = parse_vc_conf,
> @@ -4091,7 +4097,7 @@ static const struct token token_list[] = {
>   	[ACTION_INC_TCP_SEQ_VALUE] = {
>   		.name = "value",
>   		.help = "the value to increase TCP sequence number by",
> -		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
>   		.call = parse_vc_conf,
>   	},
> @@ -4105,7 +4111,7 @@ static const struct token token_list[] = {
>   	[ACTION_DEC_TCP_SEQ_VALUE] = {
>   		.name = "value",
>   		.help = "the value to decrease TCP sequence number by",
> -		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
>   		.call = parse_vc_conf,
>   	},
> @@ -4119,7 +4125,7 @@ static const struct token token_list[] = {
>   	[ACTION_INC_TCP_ACK_VALUE] = {
>   		.name = "value",
>   		.help = "the value to increase TCP acknowledgment number by",
> -		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
>   		.call = parse_vc_conf,
>   	},
> @@ -4133,7 +4139,7 @@ static const struct token token_list[] = {
>   	[ACTION_DEC_TCP_ACK_VALUE] = {
>   		.name = "value",
>   		.help = "the value to decrease TCP acknowledgment number by",
> -		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
>   		.call = parse_vc_conf,
>   	},
> @@ -4216,7 +4222,7 @@ static const struct token token_list[] = {
>   	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
>   		.name = "dst_level",
>   		.help = "destination field level",
> -		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
>   					dst.level)),
>   		.call = parse_vc_conf,
> @@ -4224,7 +4230,7 @@ static const struct token token_list[] = {
>   	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
>   		.name = "dst_offset",
>   		.help = "destination field bit offset",
> -		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
>   					dst.offset)),
>   		.call = parse_vc_conf,
> @@ -4245,7 +4251,7 @@ static const struct token token_list[] = {
>   	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
>   		.name = "src_level",
>   		.help = "source field level",
> -		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
>   					src.level)),
>   		.call = parse_vc_conf,
> @@ -4253,7 +4259,7 @@ static const struct token token_list[] = {
>   	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
>   		.name = "src_offset",
>   		.help = "source field bit offset",
> -		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
>   					src.offset)),
>   		.call = parse_vc_conf,
> @@ -4262,7 +4268,7 @@ static const struct token token_list[] = {
>   		.name = "src_value",
>   		.help = "source immediate value",
>   		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
> -			NEXT_ENTRY(UNSIGNED)),
> +			NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
>   					src.value)),
>   		.call = parse_vc_conf,
> @@ -4271,7 +4277,7 @@ static const struct token token_list[] = {
>   		.name = "width",
>   		.help = "number of bits to copy",
>   		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
> -			NEXT_ENTRY(UNSIGNED)),
> +			NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
>   					width)),
>   		.call = parse_vc_conf,
> @@ -4311,7 +4317,7 @@ static const struct token token_list[] = {
>   	},
>   	[SET_RAW_INDEX] = {
>   		.name = "{index}",
> -		.type = "UNSIGNED",
> +		.type = "COMMON_UNSIGNED",
>   		.help = "index of raw_encap/raw_decap data",
>   		.next = NEXT(next_item),
>   		.call = parse_port,
> @@ -4344,14 +4350,14 @@ static const struct token token_list[] = {
>   	[ACTION_SET_TAG_INDEX] = {
>   		.name = "index",
>   		.help = "index of tag array",
> -		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
>   		.call = parse_vc_conf,
>   	},
>   	[ACTION_SET_TAG_DATA] = {
>   		.name = "data",
>   		.help = "tag value",
> -		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY
>   			     (struct rte_flow_action_set_tag, data)),
>   		.call = parse_vc_conf,
> @@ -4359,7 +4365,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_TAG_MASK] = {
>   		.name = "mask",
>   		.help = "mask for tag value",
> -		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY
>   			     (struct rte_flow_action_set_tag, mask)),
>   		.call = parse_vc_conf,
> @@ -4375,7 +4381,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_META_DATA] = {
>   		.name = "data",
>   		.help = "metadata value",
> -		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY
>   			     (struct rte_flow_action_set_meta, data)),
>   		.call = parse_vc_conf,
> @@ -4383,7 +4389,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_META_MASK] = {
>   		.name = "mask",
>   		.help = "mask for metadata value",
> -		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY
>   			     (struct rte_flow_action_set_meta, mask)),
>   		.call = parse_vc_conf,
> @@ -4399,7 +4405,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_IPV4_DSCP_VALUE] = {
>   		.name = "dscp_value",
>   		.help = "new IPv4 DSCP value to set",
> -		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY
>   			     (struct rte_flow_action_set_dscp, dscp)),
>   		.call = parse_vc_conf,
> @@ -4415,7 +4421,7 @@ static const struct token token_list[] = {
>   	[ACTION_SET_IPV6_DSCP_VALUE] = {
>   		.name = "dscp_value",
>   		.help = "new IPv6 DSCP value to set",
> -		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY
>   			     (struct rte_flow_action_set_dscp, dscp)),
>   		.call = parse_vc_conf,
> @@ -4433,7 +4439,7 @@ static const struct token token_list[] = {
>   		.help = "flow age timeout value",
>   		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
>   					   timeout, 24)),
> -		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.call = parse_vc_conf,
>   	},
>   	[ACTION_SAMPLE] = {
> @@ -4447,7 +4453,7 @@ static const struct token token_list[] = {
>   	[ACTION_SAMPLE_RATIO] = {
>   		.name = "ratio",
>   		.help = "flow sample ratio value",
> -		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
> +		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
>   		.args = ARGS(ARGS_ENTRY_ARB
>   			     (offsetof(struct action_sample_data, conf) +
>   			      offsetof(struct rte_flow_action_sample, ratio),
> @@ -4461,7 +4467,7 @@ static const struct token token_list[] = {
>   	},
>   	[ACTION_SAMPLE_INDEX_VALUE] = {
>   		.name = "{index}",
> -		.type = "UNSIGNED",
> +		.type = "COMMON_UNSIGNED",
>   		.help = "unsigned integer value",
>   		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
>   		.call = parse_vc_action_sample_index,
> @@ -4472,7 +4478,7 @@ static const struct token token_list[] = {
>   		.name = "action_id",
>   		.help = "specify a shared action id to destroy",
>   		.next = NEXT(next_sa_destroy_attr,
> -			     NEXT_ENTRY(SHARED_ACTION_ID)),
> +			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
>   		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
>   					    args.sa_destroy.action_id)),
>   		.call = parse_sa_destroy,
> @@ -4482,7 +4488,7 @@ static const struct token token_list[] = {
>   		.name = "action_id",
>   		.help = "specify a shared action id to create",
>   		.next = NEXT(next_sa_create_attr,
> -			     NEXT_ENTRY(SHARED_ACTION_ID)),
> +			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
>   		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
>   	},
>   	[ACTION_SHARED] = {
> @@ -4862,7 +4868,7 @@ parse_vc(struct context *ctx, const struct token *token,
>   	case TRANSFER:
>   		out->args.vc.attr.transfer = 1;
>   		return len;
> -	case PATTERN:
> +	case ITEM_PATTERN:
>   		out->args.vc.pattern =
>   			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
>   					       sizeof(double));
> @@ -4943,7 +4949,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
>   		return -1;
>   	/* Parse parameter types. */
>   	switch (ctx->curr) {
> -		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
> +		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
>   
>   	case ITEM_PARAM_IS:
>   		index = 0;
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 576d5acab..af7570429 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -38,7 +38,6 @@
>   #include <rte_string_fns.h>
>   #include <rte_cycles.h>
>   #include <rte_flow.h>
> -#include <rte_errno.h>
>   #ifdef RTE_NET_IXGBE
>   #include <rte_pmd_ixgbe.h>
>   #endif
> @@ -170,6 +169,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
>   	printf("%s%s", name, buf);
>   }
>   
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +clock_gettime_monotonic(struct timespec *tp)
> +{
> +	LARGE_INTEGER pf, pc;
> +	LONGLONG nsec;
> +
> +	if (QueryPerformanceFrequency(&pf) == 0)
> +		return -1;
> +
> +	if (QueryPerformanceCounter(&pc) == 0)
> +		return -1;
> +
> +	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> +	tp->tv_sec = nsec / NS_PER_SEC;
> +	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> +
> +	return 0;
> +}
> +#endif
> +
>   void
>   nic_stats_display(portid_t port_id)
>   {
> @@ -182,6 +202,7 @@ nic_stats_display(portid_t port_id)
>   	uint64_t diff_pkts_rx, diff_pkts_tx, diff_bytes_rx, diff_bytes_tx,
>   								diff_ns;
>   	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
> +	int ret;
>   	struct rte_eth_stats stats;
>   
>   	static const char *nic_stats_border = "########################";
> @@ -202,7 +223,13 @@ nic_stats_display(portid_t port_id)
>   	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
>   
>   	diff_ns = 0;
> -	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
> +
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +	ret = clock_gettime_monotonic(&cur_time);
> +#else
> +	ret = clock_gettime(CLOCK_TYPE_ID, &cur_time);
> +#endif
> +	if (ret == 0) {
>   		uint64_t ns;
>   
>   		ns = cur_time.tv_sec * NS_PER_SEC;
> @@ -2674,7 +2701,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
>   
>   void
>   port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
> -			 uint hash_key_len)
> +			 unsigned int hash_key_len)
>   {
>   	struct rte_eth_rss_conf rss_conf;
>   	int diag;
> @@ -3404,13 +3431,13 @@ set_tx_pkt_split(const char *name)
>   }
>   
>   int
> -parse_fec_mode(const char *name, uint32_t *mode)
> +parse_fec_mode(const char *name, uint32_t *fec_capa)
>   {
>   	uint8_t i;
>   
>   	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
>   		if (strcmp(fec_mode_name[i].name, name) == 0) {
> -			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
> +			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
>   			return 0;
>   		}
>   	}
> diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
> index 6b4df335f..0fb03b9f9 100644
> --- a/app/test-pmd/csumonly.c
> +++ b/app/test-pmd/csumonly.c
> @@ -696,7 +696,11 @@ pkt_copy_split(const struct rte_mbuf *pkt)
>   	mp = current_fwd_lcore()->mbp;
>   
>   	if (tx_pkt_split == TX_PKT_SPLIT_RND)
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   		nb_seg = random() % tx_pkt_nb_segs + 1;
> +#else
> +		nb_seg = rand() % tx_pkt_nb_segs + 1;
> +#endif
>   	else
>   		nb_seg = tx_pkt_nb_segs;
>   
> diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
> index af6f7e790..8948f28eb 100644
> --- a/app/test-pmd/icmpecho.c
> +++ b/app/test-pmd/icmpecho.c
> @@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
>   		}
>   		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
>   		cksum = ~icmp_h->icmp_cksum & 0xffff;
> -		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
> -		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
> +		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
> +		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
>   		cksum = (cksum & 0xffff) + (cksum >> 16);
>   		cksum = (cksum & 0xffff) + (cksum >> 16);
>   		icmp_h->icmp_cksum = ~cksum;
> diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
> index e3b98e3e0..9ad04e992 100644
> --- a/app/test-pmd/ieee1588fwd.c
> +++ b/app/test-pmd/ieee1588fwd.c
> @@ -60,8 +60,9 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
>   		printf("Port %u RX timestamp registers not valid\n", pi);
>   		return;
>   	}
> -	printf("Port %u RX timestamp value %lu s %lu ns\n",
> -		pi, timestamp.tv_sec, timestamp.tv_nsec);
> +
> +	printf("Port %u RX timestamp value %ju s %lu ns\n",
> +		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
>   }
>   
>   #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
> @@ -83,9 +84,10 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
>   		       pi, MAX_TX_TMST_WAIT_MICROSECS);
>   		return;
>   	}
> -	printf("Port %u TX timestamp value %lu s %lu ns validated after "
> +
> +	printf("Port %u TX timestamp value %ju s %lu ns validated after "
>   	       "%u micro-second%s\n",
> -	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
> +	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
>   	       (wait_us == 1) ? "" : "s");
>   }
>   
> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
> index a326c8ce4..a279d5f32 100644
> --- a/app/test-pmd/parameters.c
> +++ b/app/test-pmd/parameters.c
> @@ -15,6 +15,7 @@
>   
>   #include <sys/queue.h>
>   #include <sys/stat.h>
> +#include <sys/socket.h>
>   
>   #include <stdint.h>
>   #include <unistd.h>
> @@ -200,11 +201,15 @@ usage(char* progname)
>   	       "requests flow API isolated mode on all ports at initialization time.\n");
>   	printf("  --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n");
>   	printf("  --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n");
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	printf("  --hot-plug: enable hot plug for device.\n");
> +#endif
>   	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
>   	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	printf("  --mlockall: lock all memory\n");
>   	printf("  --no-mlockall: do not lock all memory\n");
> +#endif
>   	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
>   	       "    native: use regular DPDK memory to create and populate mempool\n"
>   	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
> @@ -229,7 +234,7 @@ usage(char* progname)
>   
>   #ifdef RTE_LIB_CMDLINE
>   static int
> -init_peer_eth_addrs(char *config_filename)
> +init_peer_eth_addrs(const char *config_filename)
>   {
>   	FILE *config_file;
>   	portid_t i;
> @@ -626,11 +631,15 @@ launch_args_parse(int argc, char** argv)
>   		{ "mask-event",			1, 0, 0 },
>   		{ "tx-offloads",		1, 0, 0 },
>   		{ "rx-offloads",		1, 0, 0 },
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   		{ "hot-plug",			0, 0, 0 },
> +#endif
>   		{ "vxlan-gpe-port",		1, 0, 0 },
>   		{ "geneve-parsed-port",		1, 0, 0 },
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   		{ "mlockall",			0, 0, 0 },
>   		{ "no-mlockall",		0, 0, 0 },
> +#endif
>   		{ "mp-alloc",			1, 0, 0 },
>   		{ "tx-ip",			1, 0, 0 },
>   		{ "tx-udp",			1, 0, 0 },
> @@ -742,13 +751,14 @@ launch_args_parse(int argc, char** argv)
>   						 "Invalid tx-ip: %s", optarg);
>   
>   				*end++ = 0;
> -				if (inet_aton(optarg, &in) == 0)
> +
> +				if (inet_pton(AF_INET, optarg, &in) == 0)
>   					rte_exit(EXIT_FAILURE,
>   						 "Invalid source IP address: %s\n",
>   						 optarg);
>   				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
>   
> -				if (inet_aton(end, &in) == 0)
> +				if (inet_pton(AF_INET, end, &in) == 0)
>   					rte_exit(EXIT_FAILURE,
>   						 "Invalid destination IP address: %s\n",
>   						 optarg);
> @@ -1333,8 +1343,10 @@ launch_args_parse(int argc, char** argv)
>   					rte_exit(EXIT_FAILURE,
>   						 "invalid mask-event argument\n");
>   				}
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   			if (!strcmp(lgopts[opt_idx].name, "hot-plug"))
>   				hot_plug = 1;
> +#endif
>   			if (!strcmp(lgopts[opt_idx].name, "mlockall"))
>   				do_mlockall = 1;
>   			if (!strcmp(lgopts[opt_idx].name, "no-mlockall"))
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index 98c3248c0..764191077 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -9,7 +9,9 @@
>   #include <string.h>
>   #include <time.h>
>   #include <fcntl.h>
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   #include <sys/mman.h>
> +#endif

Can 'mmap' and 'munmap' be replaced with 'rte_mem_map' and 
'rte_mem_unmap'  and #include <rte_eal_paging.h> instead?

>   #include <sys/types.h>
>   #include <errno.h>
>   #include <stdbool.h>
> @@ -61,6 +63,10 @@
>   #include <rte_latencystats.h>
>   #endif
>   
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +#include <process.h>
> +#endif
> +
>   #include "testpmd.h"
>   
>   #ifndef MAP_HUGETLB
> @@ -372,7 +378,9 @@ uint8_t lsc_interrupt = 1; /* enabled by default */
>    */
>   uint8_t rmv_interrupt = 1; /* enabled by default */
>   
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   uint8_t hot_plug = 0; /**< hotplug disabled by default. */
> +#endif
>   
>   /* After attach, port setup is called on event or by iterator */
>   bool setup_on_probe_event = true;
> @@ -524,9 +532,11 @@ static void check_all_ports_link_status(uint32_t port_mask);
>   static int eth_event_callback(portid_t port_id,
>   			      enum rte_eth_event_type type,
>   			      void *param, void *ret_param);
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   static void dev_event_callback(const char *device_name,
>   				enum rte_dev_event_type type,
>   				void *param);
> +#endif
>   
>   /*
>    * Check if all the ports are started.
> @@ -632,6 +642,7 @@ set_def_fwd_config(void)
>   	set_default_fwd_ports_config();
>   }
>   
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   /* extremely pessimistic estimation of memory required to create a mempool */
>   static int
>   calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
> @@ -846,6 +857,7 @@ setup_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, bool huge)
>   
>   	return 0;
>   }
> +
>   static void
>   dma_unmap_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
>   	     struct rte_mempool_memhdr *memhdr, unsigned mem_idx __rte_unused)
> @@ -902,6 +914,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
>   		}
>   	}
>   }
> +#endif
>   
>   static unsigned int
>   setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
> @@ -972,9 +985,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
>   {
>   	char pool_name[RTE_MEMPOOL_NAMESIZE];
>   	struct rte_mempool *rte_mp = NULL;
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	uint32_t mb_size;
>   
>   	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
> +#endif
>   	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
>   
>   	TESTPMD_LOG(INFO,
> @@ -991,6 +1006,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
>   				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
>   			break;
>   		}
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	case MP_ALLOC_ANON:
>   		{
>   			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
> @@ -1031,6 +1047,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
>   					heap_socket);
>   			break;
>   		}
> +#endif
>   	case MP_ALLOC_XBUF:
>   		{
>   			struct rte_pktmbuf_extmem *ext_mem;
> @@ -1056,7 +1073,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
>   			rte_exit(EXIT_FAILURE, "Invalid mempool creation mode\n");
>   		}
>   	}
> -
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   err:
>   	if (rte_mp == NULL) {
>   		rte_exit(EXIT_FAILURE,
> @@ -1065,6 +1082,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
>   	} else if (verbose_level > 0) {
>   		rte_mempool_dump(stdout, rte_mp);
>   	}
> +#endif
>   	return rte_mp;
>   }
>   
> @@ -3047,11 +3065,14 @@ pmd_test_exit(void)
>   {
>   	portid_t pt_id;
>   	unsigned int i;
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	int ret;
> +#endif
>   
>   	if (test_done == 0)
>   		stop_packet_forwarding();
>   
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
>   		if (mempools[i]) {
>   			if (mp_alloc_type == MP_ALLOC_ANON)
> @@ -3059,6 +3080,7 @@ pmd_test_exit(void)
>   						     NULL);
>   		}
>   	}
> +#endif
>   	if (ports != NULL) {
>   		no_link_check = 1;
>   		RTE_ETH_FOREACH_DEV(pt_id) {
> @@ -3072,7 +3094,7 @@ pmd_test_exit(void)
>   			close_port(pt_id);
>   		}
>   	}
> -
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	if (hot_plug) {
>   		ret = rte_dev_event_monitor_stop();
>   		if (ret) {
> @@ -3096,6 +3118,7 @@ pmd_test_exit(void)
>   			return;
>   		}
>   	}
> +#endif
>   	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
>   		if (mempools[i])
>   			rte_mempool_free(mempools[i]);
> @@ -3259,6 +3282,7 @@ register_eth_event_callback(void)
>   	return 0;
>   }
>   
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   /* This function is used by the interrupt thread */
>   static void
>   dev_event_callback(const char *device_name, enum rte_dev_event_type type,
> @@ -3308,6 +3332,7 @@ dev_event_callback(const char *device_name, enum rte_dev_event_type type,
>   		break;
>   	}
>   }
> +#endif
>   
>   static void
>   rxtx_port_config(struct rte_port *port)
> @@ -3759,7 +3784,9 @@ signal_handler(int signum)
>   		f_quit = 1;
>   		/* exit with the expected status */
>   		signal(signum, SIG_DFL);
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   		kill(getpid(), signum);
> +#endif
>   	}
>   }
>   
> @@ -3834,10 +3861,12 @@ main(int argc, char** argv)
>   	if (argc > 1)
>   		launch_args_parse(argc, argv);
>   
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
>   		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
>   			strerror(errno));
>   	}
> +#endif
>   
>   	if (tx_first && interactive)
>   		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
> @@ -3859,6 +3888,7 @@ main(int argc, char** argv)
>   
>   	init_config();
>   
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	if (hot_plug) {
>   		ret = rte_dev_hotplug_handle_enable();
>   		if (ret) {
> @@ -3882,6 +3912,7 @@ main(int argc, char** argv)
>   			return -1;
>   		}
>   	}
> +#endif
>   
>   	if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
>   		rte_exit(EXIT_FAILURE, "Start ports failed\n");
> @@ -3969,10 +4000,11 @@ main(int argc, char** argv)
>   			return 1;
>   	}
>   
> +#ifndef RTE_EXEC_ENV_WINDOWS
>   	ret = rte_eal_cleanup();
>   	if (ret != 0)
>   		rte_exit(EXIT_FAILURE,
>   			 "EAL cleanup failed: %s\n", strerror(-ret));
> -
> +#endif
>   	return EXIT_SUCCESS;
>   }
> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> index af4085917..c56c813d6 100644
> --- a/app/test-pmd/testpmd.h
> +++ b/app/test-pmd/testpmd.h
> @@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
>   }
>   
>   /* Prototypes */
> -unsigned int parse_item_list(char* str, const char* item_name,
> +unsigned int parse_item_list(const char *str, const char *item_name,
>   			unsigned int max_items,
>   			unsigned int *parsed_items, int check_unique_values);
>   void launch_args_parse(int argc, char** argv);
> @@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
>   void set_tx_pkt_times(unsigned int *tx_times);
>   void show_tx_pkt_times(void);
>   void set_tx_pkt_split(const char *name);
> -int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
> +int parse_fec_mode(const char *name, uint32_t *fec_capa);
>   void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
>   void set_nb_pkt_per_burst(uint16_t pkt_burst);
>   char *list_pkt_forwarding_modes(void);
> @@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
>   
>   void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
>   void port_rss_hash_key_update(portid_t port_id, char rss_type[],
> -			      uint8_t *hash_key, uint hash_key_len);
> +			      uint8_t *hash_key, unsigned int hash_key_len);
>   int rx_queue_id_is_invalid(queueid_t rxq_id);
>   int tx_queue_id_is_invalid(queueid_t txq_id);
>   void setup_gro(const char *onoff, portid_t port_id);
> diff --git a/lib/librte_eal/windows/include/netinet/in.h b/lib/librte_eal/windows/include/netinet/in.h
> index 6455b9ba5..38268cf80 100644
> --- a/lib/librte_eal/windows/include/netinet/in.h
> +++ b/lib/librte_eal/windows/include/netinet/in.h
> @@ -24,6 +24,7 @@
>   #define IPPROTO_NONE      59
>   #define IPPROTO_DSTOPTS   60
>   #define IPPROTO_SCTP     132
> +#define IPPROTO_RAW      255
>   
>   #define INET6_ADDRSTRLEN 46
>   
> diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
> index 7ef38ff06..f318a66b8 100644
> --- a/lib/librte_eal/windows/include/rte_os.h
> +++ b/lib/librte_eal/windows/include/rte_os.h
> @@ -25,6 +25,14 @@ extern "C" {
>   #define PATH_MAX _MAX_PATH
>   #endif
>   
> +#define strcasecmp _stricmp
> +#define open _open
> +#define read _read
> +
> +#ifndef S_ISREG
> +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
> +#endif
> +
>   #ifndef sleep
>   #define sleep(x) Sleep(1000 * (x))
>   #endif
> diff --git a/lib/meson.build b/lib/meson.build
> index 7712aa497..295976a4d 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -46,6 +46,13 @@ if is_windows
>   		'cmdline',
>   		'hash',
>   		'cfgfile',
> +		'metrics',
> +		'timer',
> +		'gro',
> +		'gso',
> +		'pdump',
> +		'bitratestats',
> +		'latencystats',
>   	] # only supported libraries for windows
>   endif
>   

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-03-19 16:51 ` [dpdk-dev] [PATCH v2] " Jie Zhou
  2021-03-21  1:01   ` Dmitry Kozlyuk
  2021-03-31 19:10   ` [dpdk-dev] " Kadam, Pallavi
@ 2021-04-01  8:44   ` Tal Shnaiderman
  2021-04-02 22:19     ` Jie Zhou
  2021-04-11 21:39   ` Dmitry Kozlyuk
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
  4 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-01  8:44 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

> Subject: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
> 
> From: Jie Zhou <jizh@microsoft.com>
> 
> This patch is to enable testpmd on windows. It mainly includes:
> - Enable building libraries on Windows that TestPMD depends on
> - Enable building testpmd on Windows
> - Resolve name collisions with Windows types
> - Add clock_gettime_monotic for testpmd on Windows
> - Make printf format work for both Linux and Windows
> - Add missing macros
> - Add missing IPPROTO_RAW to in.h
> - Replace htons with RTE_BE16
> - Replace inet_aton with inet_pton
> - Fix parse_fec_mode to return fec_capa to remove compilation warning
> - ...

Hi Jie,

I think each topic above deserves it's own patch, some can be squashed together, e.g - one patch for all missing macros.

> 
> Issue under active investigation:
> - Recent DPDK upstream change "eal: detach memsegs on cleanup" exposed
>   failure at eal exit with "EAL: Could not unmap memory: No Error".
>   Investigating KERNELBASE!UnmapViewOfFile. The issue will cause system
>   crash. Currently temporarily remove cleanup at exit on Windows.
>   Will revert after issue root caused and fixed
> 
> Future work:
> - Some issues discovered at validation which need further investigations
>   * Perf inconsistency issues: TPUT fluctuated significantly from runs
>   * After traffic stop, port stats shows pps being 0 while bps not
>   * Currently mempool allocation only succeed with native. Other methods
>     failed at rte_mem_lock/VirtualLock. Thus currently only allow native
> - Hot-plug not supported yet
> 
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> 
> ---
> V2 changes:
>     - Fix commit message log long line issue
>     - Fix coding style issues of pointer location
>     - Fix indentation issue
>     - Fix FreeBSD2101 compilation issue of AF_INET undeclared
> ---
>  app/meson.build                             |  15 +-
>  app/test-pmd/cmdline.c                      |  12 +-
>  app/test-pmd/cmdline_flow.c                 | 440 ++++++++++----------
>  app/test-pmd/config.c                       |  37 +-
>  app/test-pmd/csumonly.c                     |   4 +
>  app/test-pmd/icmpecho.c                     |   4 +-
>  app/test-pmd/ieee1588fwd.c                  |  10 +-
>  app/test-pmd/parameters.c                   |  18 +-
>  app/test-pmd/testpmd.c                      |  38 +-
>  app/test-pmd/testpmd.h                      |   6 +-
>  lib/librte_eal/windows/include/netinet/in.h |   1 +
>  lib/librte_eal/windows/include/rte_os.h     |   8 +
>  lib/meson.build                             |   7 +
>  13 files changed, 352 insertions(+), 248 deletions(-)
> 
> diff --git a/app/meson.build b/app/meson.build
> index 87fc195db..00622933e 100644
> --- a/app/meson.build
> +++ b/app/meson.build
> @@ -1,10 +1,6 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017-2019 Intel Corporation
> 
> -if is_windows
> -	subdir_done()
> -endif
> -
>  apps = [
>  	'pdump',
>  	'proc-info',
> @@ -21,6 +17,11 @@ apps = [
>  	'test-regex',
>  	'test-sad']
> 
> +if is_windows
> +	apps = [
> +		'test-pmd']
> +endif
> +

Please disable each unsupported app instead of adding this part, see how it was done in the PMDs enablement [b9d60b5434e9df46f5 ("drivers/net: build i40e and mlx5 on Windows")].  

>  # for BSD only
>  lib_execinfo = cc.find_library('execinfo', required: false)
> 
> @@ -73,5 +74,7 @@ foreach app:apps
>  	endif
>  endforeach
> 
> -# special case the autotests
> -subdir('test')
> +if not(is_windows)
> +	# special case the autotests
> +	subdir('test')
> +endif

Same, disable in ..\app\test\meson.build

<snip>

> diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
> index 6b4df335f..0fb03b9f9 100644
> --- a/app/test-pmd/csumonly.c
> +++ b/app/test-pmd/csumonly.c
> @@ -696,7 +696,11 @@ pkt_copy_split(const struct rte_mbuf *pkt)
>  	mp = current_fwd_lcore()->mbp;
> 
>  	if (tx_pkt_split == TX_PKT_SPLIT_RND)
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  		nb_seg = random() % tx_pkt_nb_segs + 1;
> +#else
> +		nb_seg = rand() % tx_pkt_nb_segs + 1;
> +#endif

Can we use a common function for both OSs instead? Rte_rand()?

>  	else
>  		nb_seg = tx_pkt_nb_segs;
>

<snip>
 
> -
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  	if (hot_plug) {
>  		ret = rte_dev_event_monitor_stop();
>  		if (ret) {
> @@ -3096,6 +3118,7 @@ pmd_test_exit(void)
>  			return;
>  		}
>  	}
> +#endif

I think it's better to add stubs for Windows instead of ifndefs in the code if possible.

>  	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
>  		if (mempools[i])
>  			rte_mempool_free(mempools[i]);
> @@ -3259,6 +3282,7 @@ register_eth_event_callback(void)
>  	return 0;
>  }
> 
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  /* This function is used by the interrupt thread */
>  static void
>  dev_event_callback(const char *device_name, enum rte_dev_event_type
> type,
> @@ -3308,6 +3332,7 @@ dev_event_callback(const char *device_name,
> enum rte_dev_event_type type,
>  		break;
>  	}
>  }
> +#endif
> 
>  static void
>  rxtx_port_config(struct rte_port *port)
> @@ -3759,7 +3784,9 @@ signal_handler(int signum)
>  		f_quit = 1;
>  		/* exit with the expected status */
>  		signal(signum, SIG_DFL);
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  		kill(getpid(), signum);
> +#endif
>  	}
>  }
> 
> @@ -3834,10 +3861,12 @@ main(int argc, char** argv)
>  	if (argc > 1)
>  		launch_args_parse(argc, argv);
> 
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
>  		TESTPMD_LOG(NOTICE, "mlockall() failed with error
> \"%s\"\n",
>  			strerror(errno));
>  	}
> +#endif
> 
>  	if (tx_first && interactive)
>  		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
> @@ -3859,6 +3888,7 @@ main(int argc, char** argv)
> 
>  	init_config();
> 
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  	if (hot_plug) {
>  		ret = rte_dev_hotplug_handle_enable();
>  		if (ret) {
> @@ -3882,6 +3912,7 @@ main(int argc, char** argv)
>  			return -1;
>  		}
>  	}
> +#endif

Same as above.

> 
>  	if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
>  		rte_exit(EXIT_FAILURE, "Start ports failed\n");
> @@ -3969,10 +4000,11 @@ main(int argc, char** argv)
>  			return 1;
>  	}
> 
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  	ret = rte_eal_cleanup();
>  	if (ret != 0)
>  		rte_exit(EXIT_FAILURE,
>  			 "EAL cleanup failed: %s\n", strerror(-ret));
> -
> +#endif
>  	return EXIT_SUCCESS;
>  }
> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> index af4085917..c56c813d6 100644
> --- a/app/test-pmd/testpmd.h
> +++ b/app/test-pmd/testpmd.h
> @@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t
> nb_tx)
>  }
> 
>  /* Prototypes */
> -unsigned int parse_item_list(char* str, const char* item_name,
> +unsigned int parse_item_list(const char *str, const char *item_name,
>  			unsigned int max_items,
>  			unsigned int *parsed_items, int
> check_unique_values);
>  void launch_args_parse(int argc, char** argv);
> @@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
>  void set_tx_pkt_times(unsigned int *tx_times);
>  void show_tx_pkt_times(void);
>  void set_tx_pkt_split(const char *name);
> -int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
> +int parse_fec_mode(const char *name, uint32_t *fec_capa);
>  void show_fec_capability(uint32_t num, struct rte_eth_fec_capa
> *speed_fec_capa);
>  void set_nb_pkt_per_burst(uint16_t pkt_burst);
>  char *list_pkt_forwarding_modes(void);
> @@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf,
> uint16_t rate,
> 
>  void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
>  void port_rss_hash_key_update(portid_t port_id, char rss_type[],
> -			      uint8_t *hash_key, uint hash_key_len);
> +			      uint8_t *hash_key, unsigned int hash_key_len);
>  int rx_queue_id_is_invalid(queueid_t rxq_id);
>  int tx_queue_id_is_invalid(queueid_t txq_id);
>  void setup_gro(const char *onoff, portid_t port_id);
> diff --git a/lib/librte_eal/windows/include/netinet/in.h
> b/lib/librte_eal/windows/include/netinet/in.h
> index 6455b9ba5..38268cf80 100644
> --- a/lib/librte_eal/windows/include/netinet/in.h
> +++ b/lib/librte_eal/windows/include/netinet/in.h
> @@ -24,6 +24,7 @@
>  #define IPPROTO_NONE      59
>  #define IPPROTO_DSTOPTS   60
>  #define IPPROTO_SCTP     132
> +#define IPPROTO_RAW      255
> 
>  #define INET6_ADDRSTRLEN 46
> 
> diff --git a/lib/librte_eal/windows/include/rte_os.h
> b/lib/librte_eal/windows/include/rte_os.h
> index 7ef38ff06..f318a66b8 100644
> --- a/lib/librte_eal/windows/include/rte_os.h
> +++ b/lib/librte_eal/windows/include/rte_os.h
> @@ -25,6 +25,14 @@ extern "C" {
>  #define PATH_MAX _MAX_PATH
>  #endif
> 
> +#define strcasecmp _stricmp
> +#define open _open
> +#define read _read
> +
> +#ifndef S_ISREG
> +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
> +#endif
> +
>  #ifndef sleep
>  #define sleep(x) Sleep(1000 * (x))
>  #endif
> diff --git a/lib/meson.build b/lib/meson.build
> index 7712aa497..295976a4d 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -46,6 +46,13 @@ if is_windows
>  		'cmdline',
>  		'hash',
>  		'cfgfile',
> +		'metrics',
> +		'timer',
> +		'gro',
> +		'gso',
> +		'pdump',
> +		'bitratestats',
> +		'latencystats',
>  	] # only supported libraries for windows
>  endif
> 
> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-03-31 19:10   ` [dpdk-dev] " Kadam, Pallavi
@ 2021-04-02 22:14     ` Jie Zhou
  2021-04-11 21:49       ` Dmitry Kozlyuk
  0 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-02 22:14 UTC (permalink / raw)
  To: Kadam, Pallavi
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, thomas,
	bruce.richardson, ferruh.yigit

On Wed, Mar 31, 2021 at 12:10:03PM -0700, Kadam, Pallavi wrote:
> 
> On 3/19/2021 9:51 AM, Jie Zhou wrote:
> >From: Jie Zhou <jizh@microsoft.com>
> >
> >This patch is to enable testpmd on windows. It mainly includes:
> >- Enable building libraries on Windows that TestPMD depends on
> >- Enable building testpmd on Windows
> >- Resolve name collisions with Windows types
> >- Add clock_gettime_monotic for testpmd on Windows
> >- Make printf format work for both Linux and Windows
> >- Add missing macros
> >- Add missing IPPROTO_RAW to in.h
> >- Replace htons with RTE_BE16
> >- Replace inet_aton with inet_pton
> >- Fix parse_fec_mode to return fec_capa to remove compilation warning
> >- ...
> >
> >Issue under active investigation:
> >- Recent DPDK upstream change "eal: detach memsegs on cleanup" exposed
> >   failure at eal exit with "EAL: Could not unmap memory: No Error".
> >   Investigating KERNELBASE!UnmapViewOfFile. The issue will cause system
> >   crash. Currently temporarily remove cleanup at exit on Windows.
> >   Will revert after issue root caused and fixed
> >
> >Future work:
> >- Some issues discovered at validation which need further investigations
> >   * Perf inconsistency issues: TPUT fluctuated significantly from runs
> >   * After traffic stop, port stats shows pps being 0 while bps not
> >   * Currently mempool allocation only succeed with native. Other methods
> >     failed at rte_mem_lock/VirtualLock. Thus currently only allow native
> >- Hot-plug not supported yet
> >
> >Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> >Signed-off-by: Jie Zhou <jizh@microsoft.com>
> >
> >---
> >V2 changes:
> >     - Fix commit message log long line issue
> >     - Fix coding style issues of pointer location
> >     - Fix indentation issue
> >     - Fix FreeBSD2101 compilation issue of AF_INET undeclared
> >---
> >  app/meson.build                             |  15 +-
> >  app/test-pmd/cmdline.c                      |  12 +-
> >  app/test-pmd/cmdline_flow.c                 | 440 ++++++++++----------
> >  app/test-pmd/config.c                       |  37 +-
> >  app/test-pmd/csumonly.c                     |   4 +
> >  app/test-pmd/icmpecho.c                     |   4 +-
> >  app/test-pmd/ieee1588fwd.c                  |  10 +-
> >  app/test-pmd/parameters.c                   |  18 +-
> >  app/test-pmd/testpmd.c                      |  38 +-
> >  app/test-pmd/testpmd.h                      |   6 +-
> >  lib/librte_eal/windows/include/netinet/in.h |   1 +
> >  lib/librte_eal/windows/include/rte_os.h     |   8 +
> >  lib/meson.build                             |   7 +
> >  13 files changed, 352 insertions(+), 248 deletions(-)
> >
> >diff --git a/app/meson.build b/app/meson.build
> >index 87fc195db..00622933e 100644
> >--- a/app/meson.build
> >+++ b/app/meson.build
> >@@ -1,10 +1,6 @@
> >  # SPDX-License-Identifier: BSD-3-Clause
> >  # Copyright(c) 2017-2019 Intel Corporation
> >-if is_windows
> >-	subdir_done()
> >-endif
> >-
> >  apps = [
> >  	'pdump',
> >  	'proc-info',
> >@@ -21,6 +17,11 @@ apps = [
> >  	'test-regex',
> >  	'test-sad']
> >+if is_windows
> >+	apps = [
> >+		'test-pmd']
> >+endif
> >+
> >  # for BSD only
> >  lib_execinfo = cc.find_library('execinfo', required: false)
> >@@ -73,5 +74,7 @@ foreach app:apps
> >  	endif
> >  endforeach
> >-# special case the autotests
> >-subdir('test')
> >+if not(is_windows)
> >+	# special case the autotests
> >+	subdir('test')
> >+endif
> >diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> >index 14110eb2e..35a6dd0d3 100644
> >--- a/app/test-pmd/cmdline.c
> >+++ b/app/test-pmd/cmdline.c
> >@@ -8,12 +8,14 @@
> >  #include <stdio.h>
> >  #include <stdint.h>
> >  #include <string.h>
> >+
> >+#ifndef RTE_EXEC_ENV_WINDOWS
> >  #include <termios.h>
> >+#endif
> >  #include <unistd.h>
> >  #include <inttypes.h>
> >  #include <sys/socket.h>
> >  #include <netinet/in.h>
> >-
> >  #include <sys/queue.h>
> >  #include <rte_common.h>
> >@@ -3502,7 +3504,7 @@ cmdline_parse_inst_t cmd_stop = {
> >  /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
> >  unsigned int
> >-parse_item_list(char* str, const char* item_name, unsigned int max_items,
> >+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
> >  		unsigned int *parsed_items, int check_unique_values)
> >  {
> >  	unsigned int nb_item;
> >@@ -16458,17 +16460,17 @@ cmd_set_port_fec_mode_parsed(
> >  {
> >  	struct cmd_set_port_fec_mode *res = parsed_result;
> >  	uint16_t port_id = res->port_id;
> >-	uint32_t mode;
> >+	uint32_t fec_capa;
> >  	int ret;
> >-	ret = parse_fec_mode(res->fec_value, &mode);
> >+	ret = parse_fec_mode(res->fec_value, &fec_capa);
> >  	if (ret < 0) {
> >  		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
> >  			port_id);
> >  		return;
> >  	}
> >-	ret = rte_eth_fec_set(port_id, mode);
> >+	ret = rte_eth_fec_set(port_id, fec_capa);
> >  	if (ret == -ENOTSUP) {
> >  		printf("Function not implemented\n");
> >  		return;
> >diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> >index 49d9f9c04..3ee8c7378 100644
> >--- a/app/test-pmd/cmdline_flow.c
> >+++ b/app/test-pmd/cmdline_flow.c
> >@@ -31,6 +31,12 @@
> >  #include "testpmd.h"
> >+#ifdef RTE_EXEC_ENV_WINDOWS
> >+#ifndef IPDEFTTL
> >+#define IPDEFTTL 64
> >+#endif
> >+#endif
> >+
> >  /** Parser token indices. */
> >  enum index {
> >  	/* Special tokens. */
> >@@ -40,21 +46,21 @@ enum index {
> >  	END_SET,
> >  	/* Common tokens. */
> >-	INTEGER,
> >-	UNSIGNED,
> >-	PREFIX,
> >-	BOOLEAN,
> >-	STRING,
> >-	HEX,
> >-	FILE_PATH,
> >-	MAC_ADDR,
> >-	IPV4_ADDR,
> >-	IPV6_ADDR,
> >-	RULE_ID,
> >-	PORT_ID,
> >-	GROUP_ID,
> >-	PRIORITY_LEVEL,
> >-	SHARED_ACTION_ID,
> >+	COMMON_INTEGER,
> >+	COMMON_UNSIGNED,
> >+	COMMON_PREFIX,
> >+	COMMON_BOOLEAN,
> >+	COMMON_STRING,
> >+	COMMON_HEX,
> >+	COMMON_FILE_PATH,
> >+	COMMON_MAC_ADDR,
> >+	COMMON_IPV4_ADDR,
> >+	COMMON_IPV6_ADDR,
> >+	COMMON_RULE_ID,
> >+	COMMON_PORT_ID,
> >+	COMMON_GROUP_ID,
> >+	COMMON_PRIORITY_LEVEL,
> >+	COMMON_SHARED_ACTION_ID,
> >  	/* Top-level command. */
> >  	SET,
> >@@ -125,7 +131,7 @@ enum index {
> >  	SHARED_ACTION_DESTROY_ID,
> >  	/* Validate/create pattern. */
> >-	PATTERN,
> >+	ITEM_PATTERN,
> >  	ITEM_PARAM_IS,
> >  	ITEM_PARAM_SPEC,
> >  	ITEM_PARAM_LAST,
> >@@ -858,7 +864,7 @@ static const enum index next_vc_attr[] = {
> >  	TRANSFER,
> >  	TUNNEL_SET,
> >  	TUNNEL_MATCH,
> >-	PATTERN,
> >+	ITEM_PATTERN,
> >  	ZERO,
> >  };
> >@@ -869,7 +875,7 @@ static const enum index next_destroy_attr[] = {
> >  };
> >  static const enum index next_dump_attr[] = {
> >-	FILE_PATH,
> >+	COMMON_FILE_PATH,
> >  	END,
> >  	ZERO,
> >  };
> >@@ -1837,104 +1843,104 @@ static const struct token token_list[] = {
> >  		.help = "set command may end here",
> >  	},
> >  	/* Common tokens. */
> >-	[INTEGER] = {
> >+	[COMMON_INTEGER] = {
> >  		.name = "{int}",
> >  		.type = "INTEGER",
> >  		.help = "integer value",
> >  		.call = parse_int,
> >  		.comp = comp_none,
> >  	},
> >-	[UNSIGNED] = {
> >+	[COMMON_UNSIGNED] = {
> >  		.name = "{unsigned}",
> >  		.type = "UNSIGNED",
> >  		.help = "unsigned integer value",
> >  		.call = parse_int,
> >  		.comp = comp_none,
> >  	},
> >-	[PREFIX] = {
> >+	[COMMON_PREFIX] = {
> >  		.name = "{prefix}",
> >  		.type = "PREFIX",
> >  		.help = "prefix length for bit-mask",
> >  		.call = parse_prefix,
> >  		.comp = comp_none,
> >  	},
> >-	[BOOLEAN] = {
> >+	[COMMON_BOOLEAN] = {
> >  		.name = "{boolean}",
> >  		.type = "BOOLEAN",
> >  		.help = "any boolean value",
> >  		.call = parse_boolean,
> >  		.comp = comp_boolean,
> >  	},
> >-	[STRING] = {
> >+	[COMMON_STRING] = {
> >  		.name = "{string}",
> >  		.type = "STRING",
> >  		.help = "fixed string",
> >  		.call = parse_string,
> >  		.comp = comp_none,
> >  	},
> >-	[HEX] = {
> >+	[COMMON_HEX] = {
> >  		.name = "{hex}",
> >-		.type = "HEX",
> >+		.type = "COMMON_HEX",
> >  		.help = "fixed string",
> >  		.call = parse_hex,
> >  	},
> >-	[FILE_PATH] = {
> >+	[COMMON_FILE_PATH] = {
> >  		.name = "{file path}",
> >  		.type = "STRING",
> >  		.help = "file path",
> >  		.call = parse_string0,
> >  		.comp = comp_none,
> >  	},
> >-	[MAC_ADDR] = {
> >+	[COMMON_MAC_ADDR] = {
> >  		.name = "{MAC address}",
> >  		.type = "MAC-48",
> >  		.help = "standard MAC address notation",
> >  		.call = parse_mac_addr,
> >  		.comp = comp_none,
> >  	},
> >-	[IPV4_ADDR] = {
> >+	[COMMON_IPV4_ADDR] = {
> >  		.name = "{IPv4 address}",
> >  		.type = "IPV4 ADDRESS",
> >  		.help = "standard IPv4 address notation",
> >  		.call = parse_ipv4_addr,
> >  		.comp = comp_none,
> >  	},
> >-	[IPV6_ADDR] = {
> >+	[COMMON_IPV6_ADDR] = {
> >  		.name = "{IPv6 address}",
> >  		.type = "IPV6 ADDRESS",
> >  		.help = "standard IPv6 address notation",
> >  		.call = parse_ipv6_addr,
> >  		.comp = comp_none,
> >  	},
> >-	[RULE_ID] = {
> >+	[COMMON_RULE_ID] = {
> >  		.name = "{rule id}",
> >  		.type = "RULE ID",
> >  		.help = "rule identifier",
> >  		.call = parse_int,
> >  		.comp = comp_rule_id,
> >  	},
> >-	[PORT_ID] = {
> >+	[COMMON_PORT_ID] = {
> >  		.name = "{port_id}",
> >  		.type = "PORT ID",
> >  		.help = "port identifier",
> >  		.call = parse_port,
> >  		.comp = comp_port,
> >  	},
> >-	[GROUP_ID] = {
> >+	[COMMON_GROUP_ID] = {
> >  		.name = "{group_id}",
> >  		.type = "GROUP ID",
> >  		.help = "group identifier",
> >  		.call = parse_int,
> >  		.comp = comp_none,
> >  	},
> >-	[PRIORITY_LEVEL] = {
> >+	[COMMON_PRIORITY_LEVEL] = {
> >  		.name = "{level}",
> >  		.type = "PRIORITY",
> >  		.help = "priority level",
> >  		.call = parse_int,
> >  		.comp = comp_none,
> >  	},
> >-	[SHARED_ACTION_ID] = {
> >+	[COMMON_SHARED_ACTION_ID] = {
> >  		.name = "{shared_action_id}",
> >  		.type = "SHARED_ACTION_ID",
> >  		.help = "shared action id",
> >@@ -1965,7 +1971,7 @@ static const struct token token_list[] = {
> >  		.name = "shared_action",
> >  		.type = "{command} {port_id} [{arg} [...]]",
> >  		.help = "manage shared actions",
> >-		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_sa,
> >  	},
> >@@ -1980,7 +1986,7 @@ static const struct token token_list[] = {
> >  		.name = "update",
> >  		.help = "update shared action",
> >  		.next = NEXT(NEXT_ENTRY(SHARED_ACTION_SPEC),
> >-			     NEXT_ENTRY(SHARED_ACTION_ID)),
> >+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
> >  		.call = parse_sa,
> >  	},
> >@@ -1994,42 +2000,42 @@ static const struct token token_list[] = {
> >  	[SHARED_ACTION_QUERY] = {
> >  		.name = "query",
> >  		.help = "query shared action",
> >-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(SHARED_ACTION_ID)),
> >+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, args.sa.action_id)),
> >  		.call = parse_sa,
> >  	},
> >  	[VALIDATE] = {
> >  		.name = "validate",
> >  		.help = "check whether a flow rule can be created",
> >-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_vc,
> >  	},
> >  	[CREATE] = {
> >  		.name = "create",
> >  		.help = "create a flow rule",
> >-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_vc,
> >  	},
> >  	[DESTROY] = {
> >  		.name = "destroy",
> >  		.help = "destroy specific flow rules",
> >-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_destroy,
> >  	},
> >  	[FLUSH] = {
> >  		.name = "flush",
> >  		.help = "destroy all flow rules",
> >-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_flush,
> >  	},
> >  	[DUMP] = {
> >  		.name = "dump",
> >  		.help = "dump all flow rules to file",
> >-		.next = NEXT(next_dump_attr, NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
> >  			     ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_dump,
> >@@ -2038,8 +2044,8 @@ static const struct token token_list[] = {
> >  		.name = "query",
> >  		.help = "query an existing flow rule",
> >  		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
> >-			     NEXT_ENTRY(RULE_ID),
> >-			     NEXT_ENTRY(PORT_ID)),
> >+			     NEXT_ENTRY(COMMON_RULE_ID),
> >+			     NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
> >  			     ARGS_ENTRY(struct buffer, args.query.rule),
> >  			     ARGS_ENTRY(struct buffer, port)),
> >@@ -2048,22 +2054,22 @@ static const struct token token_list[] = {
> >  	[LIST] = {
> >  		.name = "list",
> >  		.help = "list existing flow rules",
> >-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_list,
> >  	},
> >  	[AGED] = {
> >  		.name = "aged",
> >  		.help = "list and destroy aged flows",
> >-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_aged,
> >  	},
> >  	[ISOLATE] = {
> >  		.name = "isolate",
> >  		.help = "restrict ingress traffic to the defined flow rules",
> >-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
> >-			     NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
> >+			     NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
> >  			     ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_isolate,
> >@@ -2080,14 +2086,14 @@ static const struct token token_list[] = {
> >  		.name = "create",
> >  		.help = "create new tunnel object",
> >  		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
> >-			     NEXT_ENTRY(PORT_ID)),
> >+			     NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_tunnel,
> >  	},
> >  	[TUNNEL_CREATE_TYPE] = {
> >  		.name = "type",
> >  		.help = "create new tunnel",
> >-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
> >+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
> >  		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
> >  		.call = parse_tunnel,
> >  	},
> >@@ -2095,21 +2101,21 @@ static const struct token token_list[] = {
> >  		.name = "destroy",
> >  		.help = "destroy tunel",
> >  		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
> >-			     NEXT_ENTRY(PORT_ID)),
> >+			     NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_tunnel,
> >  	},
> >  	[TUNNEL_DESTROY_ID] = {
> >  		.name = "id",
> >  		.help = "tunnel identifier to testroy",
> >-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
> >  		.call = parse_tunnel,
> >  	},
> >  	[TUNNEL_LIST] = {
> >  		.name = "list",
> >  		.help = "list existing tunnels",
> >-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
> >+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
> >  		.call = parse_tunnel,
> >  	},
> >@@ -2117,7 +2123,7 @@ static const struct token token_list[] = {
> >  	[DESTROY_RULE] = {
> >  		.name = "rule",
> >  		.help = "specify a rule identifier",
> >-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
> >+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
> >  		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
> >  		.call = parse_destroy,
> >  	},
> >@@ -2133,7 +2139,7 @@ static const struct token token_list[] = {
> >  	[LIST_GROUP] = {
> >  		.name = "group",
> >  		.help = "specify a group",
> >-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
> >+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
> >  		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
> >  		.call = parse_list,
> >  	},
> >@@ -2147,14 +2153,14 @@ static const struct token token_list[] = {
> >  	[GROUP] = {
> >  		.name = "group",
> >  		.help = "specify a group",
> >-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
> >+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
> >  		.call = parse_vc,
> >  	},
> >  	[PRIORITY] = {
> >  		.name = "priority",
> >  		.help = "specify a priority level",
> >-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
> >+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
> >  		.call = parse_vc,
> >  	},
> >@@ -2179,19 +2185,19 @@ static const struct token token_list[] = {
> >  	[TUNNEL_SET] = {
> >  		.name = "tunnel_set",
> >  		.help = "tunnel steer rule",
> >-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
> >  		.call = parse_vc,
> >  	},
> >  	[TUNNEL_MATCH] = {
> >  		.name = "tunnel_match",
> >  		.help = "tunnel match rule",
> >-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
> >  		.call = parse_vc,
> >  	},
> >  	/* Validate/create pattern. */
> >-	[PATTERN] = {
> >+	[ITEM_PATTERN] = {
> >  		.name = "pattern",
> >  		.help = "submit a list of pattern items",
> >  		.next = NEXT(next_item),
> >@@ -2258,7 +2264,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ANY_NUM] = {
> >  		.name = "num",
> >  		.help = "number of layers covered",
> >-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
> >  	},
> >  	[ITEM_PF] = {
> >@@ -2278,7 +2284,7 @@ static const struct token token_list[] = {
> >  	[ITEM_VF_ID] = {
> >  		.name = "id",
> >  		.help = "VF ID",
> >-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
> >  	},
> >  	[ITEM_PHY_PORT] = {
> >@@ -2292,7 +2298,7 @@ static const struct token token_list[] = {
> >  	[ITEM_PHY_PORT_INDEX] = {
> >  		.name = "index",
> >  		.help = "physical port index",
> >-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
> >  	},
> >  	[ITEM_PORT_ID] = {
> >@@ -2306,7 +2312,7 @@ static const struct token token_list[] = {
> >  	[ITEM_PORT_ID_ID] = {
> >  		.name = "id",
> >  		.help = "DPDK port ID",
> >-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
> >  	},
> >  	[ITEM_MARK] = {
> >@@ -2319,7 +2325,7 @@ static const struct token token_list[] = {
> >  	[ITEM_MARK_ID] = {
> >  		.name = "id",
> >  		.help = "Integer value to match against",
> >-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
> >  	},
> >  	[ITEM_RAW] = {
> >@@ -2332,34 +2338,34 @@ static const struct token token_list[] = {
> >  	[ITEM_RAW_RELATIVE] = {
> >  		.name = "relative",
> >  		.help = "look for pattern after the previous item",
> >-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
> >+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
> >  					   relative, 1)),
> >  	},
> >  	[ITEM_RAW_SEARCH] = {
> >  		.name = "search",
> >  		.help = "search pattern from offset (see also limit)",
> >-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
> >+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
> >  					   search, 1)),
> >  	},
> >  	[ITEM_RAW_OFFSET] = {
> >  		.name = "offset",
> >  		.help = "absolute or relative offset for pattern",
> >-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
> >+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
> >  	},
> >  	[ITEM_RAW_LIMIT] = {
> >  		.name = "limit",
> >  		.help = "search area limit for start of pattern",
> >-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
> >  	},
> >  	[ITEM_RAW_PATTERN] = {
> >  		.name = "pattern",
> >  		.help = "byte string to look for",
> >  		.next = NEXT(item_raw,
> >-			     NEXT_ENTRY(STRING),
> >+			     NEXT_ENTRY(COMMON_STRING),
> >  			     NEXT_ENTRY(ITEM_PARAM_IS,
> >  					ITEM_PARAM_SPEC,
> >  					ITEM_PARAM_MASK)),
> >@@ -2378,25 +2384,25 @@ static const struct token token_list[] = {
> >  	[ITEM_ETH_DST] = {
> >  		.name = "dst",
> >  		.help = "destination MAC",
> >-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
> >+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
> >  	},
> >  	[ITEM_ETH_SRC] = {
> >  		.name = "src",
> >  		.help = "source MAC",
> >-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
> >+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
> >  	},
> >  	[ITEM_ETH_TYPE] = {
> >  		.name = "type",
> >  		.help = "EtherType",
> >-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
> >  	},
> >  	[ITEM_ETH_HAS_VLAN] = {
> >  		.name = "has_vlan",
> >  		.help = "packet header contains VLAN",
> >-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
> >  					   has_vlan, 1)),
> >  	},
> >@@ -2410,41 +2416,41 @@ static const struct token token_list[] = {
> >  	[ITEM_VLAN_TCI] = {
> >  		.name = "tci",
> >  		.help = "tag control information",
> >-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
> >  	},
> >  	[ITEM_VLAN_PCP] = {
> >  		.name = "pcp",
> >  		.help = "priority code point",
> >-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
> >  						  tci, "\xe0\x00")),
> >  	},
> >  	[ITEM_VLAN_DEI] = {
> >  		.name = "dei",
> >  		.help = "drop eligible indicator",
> >-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
> >  						  tci, "\x10\x00")),
> >  	},
> >  	[ITEM_VLAN_VID] = {
> >  		.name = "vid",
> >  		.help = "VLAN identifier",
> >-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
> >  						  tci, "\x0f\xff")),
> >  	},
> >  	[ITEM_VLAN_INNER_TYPE] = {
> >  		.name = "inner_type",
> >  		.help = "inner EtherType",
> >-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
> >  					     inner_type)),
> >  	},
> >  	[ITEM_VLAN_HAS_MORE_VLAN] = {
> >  		.name = "has_more_vlan",
> >  		.help = "packet header contains another VLAN",
> >-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
> >  					   has_more_vlan, 1)),
> >  	},
> >@@ -2458,42 +2464,42 @@ static const struct token token_list[] = {
> >  	[ITEM_IPV4_TOS] = {
> >  		.name = "tos",
> >  		.help = "type of service",
> >-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
> >  					     hdr.type_of_service)),
> >  	},
> >  	[ITEM_IPV4_FRAGMENT_OFFSET] = {
> >  		.name = "fragment_offset",
> >  		.help = "fragmentation flags and fragment offset",
> >-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
> >  					     hdr.fragment_offset)),
> >  	},
> >  	[ITEM_IPV4_TTL] = {
> >  		.name = "ttl",
> >  		.help = "time to live",
> >-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
> >  					     hdr.time_to_live)),
> >  	},
> >  	[ITEM_IPV4_PROTO] = {
> >  		.name = "proto",
> >  		.help = "next protocol ID",
> >-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
> >  					     hdr.next_proto_id)),
> >  	},
> >  	[ITEM_IPV4_SRC] = {
> >  		.name = "src",
> >  		.help = "source address",
> >-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
> >+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
> >  					     hdr.src_addr)),
> >  	},
> >  	[ITEM_IPV4_DST] = {
> >  		.name = "dst",
> >  		.help = "destination address",
> >-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
> >+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
> >  					     hdr.dst_addr)),
> >  	},
> >@@ -2507,7 +2513,7 @@ static const struct token token_list[] = {
> >  	[ITEM_IPV6_TC] = {
> >  		.name = "tc",
> >  		.help = "traffic class",
> >-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
> >  						  hdr.vtc_flow,
> >  						  "\x0f\xf0\x00\x00")),
> >@@ -2515,7 +2521,7 @@ static const struct token token_list[] = {
> >  	[ITEM_IPV6_FLOW] = {
> >  		.name = "flow",
> >  		.help = "flow label",
> >-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
> >  						  hdr.vtc_flow,
> >  						  "\x00\x0f\xff\xff")),
> >@@ -2523,35 +2529,35 @@ static const struct token token_list[] = {
> >  	[ITEM_IPV6_PROTO] = {
> >  		.name = "proto",
> >  		.help = "protocol (next header)",
> >-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
> >  					     hdr.proto)),
> >  	},
> >  	[ITEM_IPV6_HOP] = {
> >  		.name = "hop",
> >  		.help = "hop limit",
> >-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
> >  					     hdr.hop_limits)),
> >  	},
> >  	[ITEM_IPV6_SRC] = {
> >  		.name = "src",
> >  		.help = "source address",
> >-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
> >+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
> >  					     hdr.src_addr)),
> >  	},
> >  	[ITEM_IPV6_DST] = {
> >  		.name = "dst",
> >  		.help = "destination address",
> >-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
> >+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
> >  					     hdr.dst_addr)),
> >  	},
> >  	[ITEM_IPV6_HAS_FRAG_EXT] = {
> >  		.name = "has_frag_ext",
> >  		.help = "fragment packet attribute",
> >-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
> >  					   has_frag_ext, 1)),
> >  	},
> >@@ -2565,28 +2571,28 @@ static const struct token token_list[] = {
> >  	[ITEM_ICMP_TYPE] = {
> >  		.name = "type",
> >  		.help = "ICMP packet type",
> >-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
> >  					     hdr.icmp_type)),
> >  	},
> >  	[ITEM_ICMP_CODE] = {
> >  		.name = "code",
> >  		.help = "ICMP packet code",
> >-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
> >  					     hdr.icmp_code)),
> >  	},
> >  	[ITEM_ICMP_IDENT] = {
> >  		.name = "ident",
> >  		.help = "ICMP packet identifier",
> >-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
> >  					     hdr.icmp_ident)),
> >  	},
> >  	[ITEM_ICMP_SEQ] = {
> >  		.name = "seq",
> >  		.help = "ICMP packet sequence number",
> >-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
> >  					     hdr.icmp_seq_nb)),
> >  	},
> >@@ -2600,14 +2606,14 @@ static const struct token token_list[] = {
> >  	[ITEM_UDP_SRC] = {
> >  		.name = "src",
> >  		.help = "UDP source port",
> >-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
> >  					     hdr.src_port)),
> >  	},
> >  	[ITEM_UDP_DST] = {
> >  		.name = "dst",
> >  		.help = "UDP destination port",
> >-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
> >  					     hdr.dst_port)),
> >  	},
> >@@ -2621,21 +2627,21 @@ static const struct token token_list[] = {
> >  	[ITEM_TCP_SRC] = {
> >  		.name = "src",
> >  		.help = "TCP source port",
> >-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
> >  					     hdr.src_port)),
> >  	},
> >  	[ITEM_TCP_DST] = {
> >  		.name = "dst",
> >  		.help = "TCP destination port",
> >-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
> >  					     hdr.dst_port)),
> >  	},
> >  	[ITEM_TCP_FLAGS] = {
> >  		.name = "flags",
> >  		.help = "TCP flags",
> >-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
> >  					     hdr.tcp_flags)),
> >  	},
> >@@ -2649,28 +2655,28 @@ static const struct token token_list[] = {
> >  	[ITEM_SCTP_SRC] = {
> >  		.name = "src",
> >  		.help = "SCTP source port",
> >-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
> >  					     hdr.src_port)),
> >  	},
> >  	[ITEM_SCTP_DST] = {
> >  		.name = "dst",
> >  		.help = "SCTP destination port",
> >-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
> >  					     hdr.dst_port)),
> >  	},
> >  	[ITEM_SCTP_TAG] = {
> >  		.name = "tag",
> >  		.help = "validation tag",
> >-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
> >  					     hdr.tag)),
> >  	},
> >  	[ITEM_SCTP_CKSUM] = {
> >  		.name = "cksum",
> >  		.help = "checksum",
> >-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
> >  					     hdr.cksum)),
> >  	},
> >@@ -2684,7 +2690,7 @@ static const struct token token_list[] = {
> >  	[ITEM_VXLAN_VNI] = {
> >  		.name = "vni",
> >  		.help = "VXLAN identifier",
> >-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
> >  	},
> >  	[ITEM_E_TAG] = {
> >@@ -2697,7 +2703,7 @@ static const struct token token_list[] = {
> >  	[ITEM_E_TAG_GRP_ECID_B] = {
> >  		.name = "grp_ecid_b",
> >  		.help = "GRP and E-CID base",
> >-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
> >  						  rsvd_grp_ecid_b,
> >  						  "\x3f\xff")),
> >@@ -2712,7 +2718,7 @@ static const struct token token_list[] = {
> >  	[ITEM_NVGRE_TNI] = {
> >  		.name = "tni",
> >  		.help = "virtual subnet ID",
> >-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
> >  	},
> >  	[ITEM_MPLS] = {
> >@@ -2725,7 +2731,7 @@ static const struct token token_list[] = {
> >  	[ITEM_MPLS_LABEL] = {
> >  		.name = "label",
> >  		.help = "MPLS label",
> >-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
> >  						  label_tc_s,
> >  						  "\xff\xff\xf0")),
> >@@ -2733,7 +2739,7 @@ static const struct token token_list[] = {
> >  	[ITEM_MPLS_TC] = {
> >  		.name = "tc",
> >  		.help = "MPLS Traffic Class",
> >-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
> >  						  label_tc_s,
> >  						  "\x00\x00\x0e")),
> >@@ -2741,7 +2747,7 @@ static const struct token token_list[] = {
> >  	[ITEM_MPLS_S] = {
> >  		.name = "s",
> >  		.help = "MPLS Bottom-of-Stack",
> >-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
> >  						  label_tc_s,
> >  						  "\x00\x00\x01")),
> >@@ -2756,7 +2762,7 @@ static const struct token token_list[] = {
> >  	[ITEM_GRE_PROTO] = {
> >  		.name = "protocol",
> >  		.help = "GRE protocol type",
> >-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
> >  					     protocol)),
> >  	},
> >@@ -2766,14 +2772,14 @@ static const struct token token_list[] = {
> >  			"checksum (1b), undefined (1b), key bit (1b),"
> >  			" sequence number (1b), reserved 0 (9b),"
> >  			" version (3b)",
> >-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
> >  					     c_rsvd0_ver)),
> >  	},
> >  	[ITEM_GRE_C_BIT] = {
> >  		.name = "c_bit",
> >  		.help = "checksum bit (C)",
> >-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
> >+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
> >  						  c_rsvd0_ver,
> >  						  "\x80\x00\x00\x00")),
> >@@ -2781,7 +2787,7 @@ static const struct token token_list[] = {
> >  	[ITEM_GRE_S_BIT] = {
> >  		.name = "s_bit",
> >  		.help = "sequence number bit (S)",
> >-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
> >+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
> >  						  c_rsvd0_ver,
> >  						  "\x10\x00\x00\x00")),
> >@@ -2789,7 +2795,7 @@ static const struct token token_list[] = {
> >  	[ITEM_GRE_K_BIT] = {
> >  		.name = "k_bit",
> >  		.help = "key bit (K)",
> >-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
> >+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
> >  						  c_rsvd0_ver,
> >  						  "\x20\x00\x00\x00")),
> >@@ -2805,7 +2811,7 @@ static const struct token token_list[] = {
> >  	[ITEM_FUZZY_THRESH] = {
> >  		.name = "thresh",
> >  		.help = "match accuracy threshold",
> >-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
> >  					thresh)),
> >  	},
> >@@ -2819,20 +2825,20 @@ static const struct token token_list[] = {
> >  	[ITEM_GTP_FLAGS] = {
> >  		.name = "v_pt_rsv_flags",
> >  		.help = "GTP flags",
> >-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
> >  					v_pt_rsv_flags)),
> >  	},
> >  	[ITEM_GTP_MSG_TYPE] = {
> >  		.name = "msg_type",
> >  		.help = "GTP message type",
> >-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
> >  	},
> >  	[ITEM_GTP_TEID] = {
> >  		.name = "teid",
> >  		.help = "tunnel endpoint identifier",
> >-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
> >  	},
> >  	[ITEM_GTPC] = {
> >@@ -2859,20 +2865,20 @@ static const struct token token_list[] = {
> >  	[ITEM_GENEVE_VNI] = {
> >  		.name = "vni",
> >  		.help = "virtual network identifier",
> >-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
> >+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.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),
> >+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
> >  						  ver_opt_len_o_c_rsvd0,
> >  						  "\x3f\x00")),
> >@@ -2888,7 +2894,7 @@ static const struct token token_list[] = {
> >  	[ITEM_VXLAN_GPE_VNI] = {
> >  		.name = "vni",
> >  		.help = "VXLAN-GPE identifier",
> >-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
> >  					     vni)),
> >  	},
> >@@ -2903,7 +2909,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ARP_ETH_IPV4_SHA] = {
> >  		.name = "sha",
> >  		.help = "sender hardware address",
> >-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
> >+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
> >  					     sha)),
> >@@ -2911,7 +2917,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ARP_ETH_IPV4_SPA] = {
> >  		.name = "spa",
> >  		.help = "sender IPv4 address",
> >-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
> >+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
> >  					     spa)),
> >@@ -2919,7 +2925,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ARP_ETH_IPV4_THA] = {
> >  		.name = "tha",
> >  		.help = "target hardware address",
> >-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
> >+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
> >  					     tha)),
> >@@ -2927,7 +2933,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ARP_ETH_IPV4_TPA] = {
> >  		.name = "tpa",
> >  		.help = "target IPv4 address",
> >-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
> >+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
> >  					     tpa)),
> >@@ -2943,7 +2949,7 @@ static const struct token token_list[] = {
> >  	[ITEM_IPV6_EXT_NEXT_HDR] = {
> >  		.name = "next_hdr",
> >  		.help = "next header",
> >-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
> >  					     next_hdr)),
> >  	},
> >@@ -2958,7 +2964,7 @@ static const struct token token_list[] = {
> >  	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
> >  		.name = "next_hdr",
> >  		.help = "next header",
> >-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
> >+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
> >  					hdr.next_header)),
> >@@ -2966,7 +2972,7 @@ static const struct token token_list[] = {
> >  	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
> >  		.name = "frag_data",
> >  		.help = "Fragment flags and offset",
> >-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
> >+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
> >  					     hdr.frag_data)),
> >@@ -2981,14 +2987,14 @@ static const struct token token_list[] = {
> >  	[ITEM_ICMP6_TYPE] = {
> >  		.name = "type",
> >  		.help = "ICMPv6 type",
> >-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
> >  					     type)),
> >  	},
> >  	[ITEM_ICMP6_CODE] = {
> >  		.name = "code",
> >  		.help = "ICMPv6 code",
> >-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
> >  					     code)),
> >  	},
> >@@ -3003,7 +3009,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
> >  		.name = "target_addr",
> >  		.help = "target address",
> >-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
> >+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
> >  					     target_addr)),
> >@@ -3019,7 +3025,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
> >  		.name = "target_addr",
> >  		.help = "target address",
> >-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
> >+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
> >  					     target_addr)),
> >@@ -3036,7 +3042,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ICMP6_ND_OPT_TYPE] = {
> >  		.name = "type",
> >  		.help = "ND option type",
> >-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
> >+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
> >  					     type)),
> >@@ -3054,7 +3060,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
> >  		.name = "sla",
> >  		.help = "source Ethernet LLA",
> >-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
> >+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
> >@@ -3072,7 +3078,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
> >  		.name = "tla",
> >  		.help = "target Ethernet LLA",
> >-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
> >+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
> >@@ -3087,7 +3093,7 @@ static const struct token token_list[] = {
> >  	[ITEM_META_DATA] = {
> >  		.name = "data",
> >  		.help = "metadata value",
> >-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
> >  					     data, "\xff\xff\xff\xff")),
> >  	},
> >@@ -3101,7 +3107,7 @@ static const struct token token_list[] = {
> >  	[ITEM_GRE_KEY_VALUE] = {
> >  		.name = "value",
> >  		.help = "key value",
> >-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
> >  	},
> >  	[ITEM_GTP_PSC] = {
> >@@ -3115,14 +3121,14 @@ static const struct token token_list[] = {
> >  	[ITEM_GTP_PSC_QFI] = {
> >  		.name = "qfi",
> >  		.help = "QoS flow identifier",
> >-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
> >  					qfi)),
> >  	},
> >  	[ITEM_GTP_PSC_PDU_T] = {
> >  		.name = "pdu_t",
> >  		.help = "PDU type",
> >-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
> >  					pdu_type)),
> >  	},
> >@@ -3143,7 +3149,7 @@ static const struct token token_list[] = {
> >  	[ITEM_PPPOE_SEID] = {
> >  		.name = "seid",
> >  		.help = "session identifier",
> >-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
> >  					session_id)),
> >  	},
> >@@ -3152,7 +3158,7 @@ static const struct token token_list[] = {
> >  		.help = "match PPPoE session protocol identifier",
> >  		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
> >  				sizeof(struct rte_flow_item_pppoe_proto_id)),
> >-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
> >+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
> >  			     item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
> >@@ -3169,14 +3175,14 @@ static const struct token token_list[] = {
> >  	[ITEM_HIGIG2_CLASSIFICATION] = {
> >  		.name = "classification",
> >  		.help = "matches classification of higig2 header",
> >-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
> >  					hdr.ppt1.classification)),
> >  	},
> >  	[ITEM_HIGIG2_VID] = {
> >  		.name = "vid",
> >  		.help = "matches vid of higig2 header",
> >-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
> >  					hdr.ppt1.vid)),
> >  	},
> >@@ -3190,13 +3196,13 @@ static const struct token token_list[] = {
> >  	[ITEM_TAG_DATA] = {
> >  		.name = "data",
> >  		.help = "tag value to match",
> >-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
> >  	},
> >  	[ITEM_TAG_INDEX] = {
> >  		.name = "index",
> >  		.help = "index of tag array to match",
> >-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
> >+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
> >  			     NEXT_ENTRY(ITEM_PARAM_IS)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
> >  	},
> >@@ -3211,7 +3217,7 @@ static const struct token token_list[] = {
> >  	[ITEM_L2TPV3OIP_SESSION_ID] = {
> >  		.name = "session_id",
> >  		.help = "session identifier",
> >-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
> >  					     session_id)),
> >  	},
> >@@ -3225,7 +3231,7 @@ static const struct token token_list[] = {
> >  	[ITEM_ESP_SPI] = {
> >  		.name = "spi",
> >  		.help = "security policy index",
> >-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
> >  				hdr.spi)),
> >  	},
> >@@ -3239,7 +3245,7 @@ static const struct token token_list[] = {
> >  	[ITEM_AH_SPI] = {
> >  		.name = "spi",
> >  		.help = "security parameters index",
> >-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
> >  	},
> >  	[ITEM_PFCP] = {
> >@@ -3252,14 +3258,14 @@ static const struct token token_list[] = {
> >  	[ITEM_PFCP_S_FIELD] = {
> >  		.name = "s_field",
> >  		.help = "S field",
> >-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
> >  				s_field)),
> >  	},
> >  	[ITEM_PFCP_SEID] = {
> >  		.name = "seid",
> >  		.help = "session endpoint identifier",
> >-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
> >  	},
> >  	[ITEM_ECPRI] = {
> >@@ -3292,7 +3298,7 @@ static const struct token token_list[] = {
> >  		.help = "Physical Channel ID",
> >  		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
> >  				ITEM_ECPRI_COMMON, ITEM_NEXT),
> >-				NEXT_ENTRY(UNSIGNED), item_param),
> >+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
> >  				hdr.type0.pc_id)),
> >  	},
> >@@ -3308,7 +3314,7 @@ static const struct token token_list[] = {
> >  		.help = "Real-Time Control Data ID",
> >  		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
> >  				ITEM_ECPRI_COMMON, ITEM_NEXT),
> >-				NEXT_ENTRY(UNSIGNED), item_param),
> >+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
> >  				hdr.type2.rtc_id)),
> >  	},
> >@@ -3324,7 +3330,7 @@ static const struct token token_list[] = {
> >  		.help = "Measurement ID",
> >  		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
> >  				ITEM_ECPRI_COMMON, ITEM_NEXT),
> >-				NEXT_ENTRY(UNSIGNED), item_param),
> >+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
> >  				hdr.type5.msr_id)),
> >  	},
> >@@ -3340,21 +3346,21 @@ static const struct token token_list[] = {
> >  	[ITEM_GENEVE_OPT_CLASS]	= {
> >  		.name = "class",
> >  		.help = "GENEVE option class",
> >-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
> >  					     option_class)),
> >  	},
> >  	[ITEM_GENEVE_OPT_TYPE] = {
> >  		.name = "type",
> >  		.help = "GENEVE option type",
> >-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
> >  					option_type)),
> >  	},
> >  	[ITEM_GENEVE_OPT_LENGTH] = {
> >  		.name = "length",
> >  		.help = "GENEVE option data length (in 32b words)",
> >-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
> >+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
> >  		.args = ARGS(ARGS_ENTRY_BOUNDED(
> >  				struct rte_flow_item_geneve_opt, option_len,
> >  				0, 31)),
> >@@ -3362,7 +3368,7 @@ static const struct token token_list[] = {
> >  	[ITEM_GENEVE_OPT_DATA] = {
> >  		.name = "data",
> >  		.help = "GENEVE option data pattern",
> >-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
> >+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
> >  			     ARGS_ENTRY_ARB(0, 0),
> >  			     ARGS_ENTRY_ARB
> >@@ -3411,7 +3417,7 @@ static const struct token token_list[] = {
> >  	[ACTION_JUMP_GROUP] = {
> >  		.name = "group",
> >  		.help = "group to redirect traffic to",
> >-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -3425,7 +3431,7 @@ static const struct token token_list[] = {
> >  	[ACTION_MARK_ID] = {
> >  		.name = "id",
> >  		.help = "32 bit value to return with packets",
> >-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -3447,7 +3453,7 @@ static const struct token token_list[] = {
> >  	[ACTION_QUEUE_INDEX] = {
> >  		.name = "index",
> >  		.help = "queue index to use",
> >-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -3469,14 +3475,14 @@ static const struct token token_list[] = {
> >  	[ACTION_COUNT_ID] = {
> >  		.name = "identifier",
> >  		.help = "counter identifier to use",
> >-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
> >  		.call = parse_vc_conf,
> >  	},
> >  	[ACTION_COUNT_SHARED] = {
> >  		.name = "shared",
> >  		.help = "shared counter",
> >-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
> >+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
> >  					   shared, 1)),
> >  		.call = parse_vc_conf,
> >@@ -3520,7 +3526,7 @@ static const struct token token_list[] = {
> >  	[ACTION_RSS_LEVEL] = {
> >  		.name = "level",
> >  		.help = "encapsulation level for \"types\"",
> >-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_ARB
> >  			     (offsetof(struct action_rss_data, conf) +
> >  			      offsetof(struct rte_flow_action_rss, level),
> >@@ -3541,7 +3547,7 @@ static const struct token token_list[] = {
> >  	[ACTION_RSS_KEY] = {
> >  		.name = "key",
> >  		.help = "RSS hash key",
> >-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
> >+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
> >  		.args = ARGS(ARGS_ENTRY_ARB
> >  			     (offsetof(struct action_rss_data, conf) +
> >  			      offsetof(struct rte_flow_action_rss, key),
> >@@ -3556,7 +3562,7 @@ static const struct token token_list[] = {
> >  	[ACTION_RSS_KEY_LEN] = {
> >  		.name = "key_len",
> >  		.help = "RSS hash key length in bytes",
> >-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
> >  			     (offsetof(struct action_rss_data, conf) +
> >  			      offsetof(struct rte_flow_action_rss, key_len),
> >@@ -3594,7 +3600,7 @@ static const struct token token_list[] = {
> >  	[ACTION_VF_ORIGINAL] = {
> >  		.name = "original",
> >  		.help = "use original VF ID if possible",
> >-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
> >+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
> >  					   original, 1)),
> >  		.call = parse_vc_conf,
> >@@ -3602,7 +3608,7 @@ static const struct token token_list[] = {
> >  	[ACTION_VF_ID] = {
> >  		.name = "id",
> >  		.help = "VF ID",
> >-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -3617,7 +3623,7 @@ static const struct token token_list[] = {
> >  	[ACTION_PHY_PORT_ORIGINAL] = {
> >  		.name = "original",
> >  		.help = "use original port index if possible",
> >-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
> >+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
> >  					   original, 1)),
> >  		.call = parse_vc_conf,
> >@@ -3625,7 +3631,7 @@ static const struct token token_list[] = {
> >  	[ACTION_PHY_PORT_INDEX] = {
> >  		.name = "index",
> >  		.help = "physical port index",
> >-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
> >  					index)),
> >  		.call = parse_vc_conf,
> >@@ -3641,7 +3647,7 @@ static const struct token token_list[] = {
> >  	[ACTION_PORT_ID_ORIGINAL] = {
> >  		.name = "original",
> >  		.help = "use original DPDK port ID if possible",
> >-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
> >+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
> >  					   original, 1)),
> >  		.call = parse_vc_conf,
> >@@ -3649,7 +3655,7 @@ static const struct token token_list[] = {
> >  	[ACTION_PORT_ID_ID] = {
> >  		.name = "id",
> >  		.help = "DPDK port ID",
> >-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -3664,7 +3670,7 @@ static const struct token token_list[] = {
> >  	[ACTION_METER_ID] = {
> >  		.name = "mtr_id",
> >  		.help = "meter id to use",
> >-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -3680,7 +3686,7 @@ static const struct token token_list[] = {
> >  	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
> >  		.name = "mpls_ttl",
> >  		.help = "MPLS TTL",
> >-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
> >  					mpls_ttl)),
> >  		.call = parse_vc_conf,
> >@@ -3704,7 +3710,7 @@ static const struct token token_list[] = {
> >  	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
> >  		.name = "nw_ttl",
> >  		.help = "IP TTL",
> >-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
> >  					nw_ttl)),
> >  		.call = parse_vc_conf,
> >@@ -3749,7 +3755,7 @@ static const struct token token_list[] = {
> >  	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
> >  		.name = "ethertype",
> >  		.help = "EtherType",
> >-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_of_push_vlan,
> >  			      ethertype)),
> >@@ -3767,7 +3773,7 @@ static const struct token token_list[] = {
> >  	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
> >  		.name = "vlan_vid",
> >  		.help = "VLAN id",
> >-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_of_set_vlan_vid,
> >  			      vlan_vid)),
> >@@ -3785,7 +3791,7 @@ static const struct token token_list[] = {
> >  	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
> >  		.name = "vlan_pcp",
> >  		.help = "VLAN priority",
> >-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_of_set_vlan_pcp,
> >  			      vlan_pcp)),
> >@@ -3802,7 +3808,7 @@ static const struct token token_list[] = {
> >  	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
> >  		.name = "ethertype",
> >  		.help = "EtherType",
> >-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_of_pop_mpls,
> >  			      ethertype)),
> >@@ -3820,7 +3826,7 @@ static const struct token token_list[] = {
> >  	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
> >  		.name = "ethertype",
> >  		.help = "EtherType",
> >-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_of_push_mpls,
> >  			      ethertype)),
> >@@ -3928,7 +3934,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
> >  		.name = "ipv4_addr",
> >  		.help = "new IPv4 source address to set",
> >-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
> >+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			(struct rte_flow_action_set_ipv4, ipv4_addr)),
> >  		.call = parse_vc_conf,
> >@@ -3945,7 +3951,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_IPV4_DST_IPV4_DST] = {
> >  		.name = "ipv4_addr",
> >  		.help = "new IPv4 destination address to set",
> >-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
> >+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			(struct rte_flow_action_set_ipv4, ipv4_addr)),
> >  		.call = parse_vc_conf,
> >@@ -3962,7 +3968,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
> >  		.name = "ipv6_addr",
> >  		.help = "new IPv6 source address to set",
> >-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
> >+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			(struct rte_flow_action_set_ipv6, ipv6_addr)),
> >  		.call = parse_vc_conf,
> >@@ -3979,7 +3985,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_IPV6_DST_IPV6_DST] = {
> >  		.name = "ipv6_addr",
> >  		.help = "new IPv6 destination address to set",
> >-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
> >+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			(struct rte_flow_action_set_ipv6, ipv6_addr)),
> >  		.call = parse_vc_conf,
> >@@ -3996,7 +4002,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_TP_SRC_TP_SRC] = {
> >  		.name = "port",
> >  		.help = "new source port number to set",
> >-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_set_tp, port)),
> >  		.call = parse_vc_conf,
> >@@ -4013,7 +4019,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_TP_DST_TP_DST] = {
> >  		.name = "port",
> >  		.help = "new destination port number to set",
> >-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_set_tp, port)),
> >  		.call = parse_vc_conf,
> >@@ -4044,7 +4050,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_TTL_TTL] = {
> >  		.name = "ttl_value",
> >  		.help = "new ttl value to set",
> >-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_set_ttl, ttl_value)),
> >  		.call = parse_vc_conf,
> >@@ -4060,7 +4066,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_MAC_SRC_MAC_SRC] = {
> >  		.name = "mac_addr",
> >  		.help = "new source mac address",
> >-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
> >+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_set_mac, mac_addr)),
> >  		.call = parse_vc_conf,
> >@@ -4076,7 +4082,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_MAC_DST_MAC_DST] = {
> >  		.name = "mac_addr",
> >  		.help = "new destination mac address to set",
> >-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
> >+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
> >  		.args = ARGS(ARGS_ENTRY_HTON
> >  			     (struct rte_flow_action_set_mac, mac_addr)),
> >  		.call = parse_vc_conf,
> >@@ -4091,7 +4097,7 @@ static const struct token token_list[] = {
> >  	[ACTION_INC_TCP_SEQ_VALUE] = {
> >  		.name = "value",
> >  		.help = "the value to increase TCP sequence number by",
> >-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -4105,7 +4111,7 @@ static const struct token token_list[] = {
> >  	[ACTION_DEC_TCP_SEQ_VALUE] = {
> >  		.name = "value",
> >  		.help = "the value to decrease TCP sequence number by",
> >-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -4119,7 +4125,7 @@ static const struct token token_list[] = {
> >  	[ACTION_INC_TCP_ACK_VALUE] = {
> >  		.name = "value",
> >  		.help = "the value to increase TCP acknowledgment number by",
> >-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -4133,7 +4139,7 @@ static const struct token token_list[] = {
> >  	[ACTION_DEC_TCP_ACK_VALUE] = {
> >  		.name = "value",
> >  		.help = "the value to decrease TCP acknowledgment number by",
> >-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
> >  		.call = parse_vc_conf,
> >  	},
> >@@ -4216,7 +4222,7 @@ static const struct token token_list[] = {
> >  	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
> >  		.name = "dst_level",
> >  		.help = "destination field level",
> >-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
> >  					dst.level)),
> >  		.call = parse_vc_conf,
> >@@ -4224,7 +4230,7 @@ static const struct token token_list[] = {
> >  	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
> >  		.name = "dst_offset",
> >  		.help = "destination field bit offset",
> >-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
> >  					dst.offset)),
> >  		.call = parse_vc_conf,
> >@@ -4245,7 +4251,7 @@ static const struct token token_list[] = {
> >  	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
> >  		.name = "src_level",
> >  		.help = "source field level",
> >-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
> >  					src.level)),
> >  		.call = parse_vc_conf,
> >@@ -4253,7 +4259,7 @@ static const struct token token_list[] = {
> >  	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
> >  		.name = "src_offset",
> >  		.help = "source field bit offset",
> >-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
> >  					src.offset)),
> >  		.call = parse_vc_conf,
> >@@ -4262,7 +4268,7 @@ static const struct token token_list[] = {
> >  		.name = "src_value",
> >  		.help = "source immediate value",
> >  		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
> >-			NEXT_ENTRY(UNSIGNED)),
> >+			NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
> >  					src.value)),
> >  		.call = parse_vc_conf,
> >@@ -4271,7 +4277,7 @@ static const struct token token_list[] = {
> >  		.name = "width",
> >  		.help = "number of bits to copy",
> >  		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
> >-			NEXT_ENTRY(UNSIGNED)),
> >+			NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
> >  					width)),
> >  		.call = parse_vc_conf,
> >@@ -4311,7 +4317,7 @@ static const struct token token_list[] = {
> >  	},
> >  	[SET_RAW_INDEX] = {
> >  		.name = "{index}",
> >-		.type = "UNSIGNED",
> >+		.type = "COMMON_UNSIGNED",
> >  		.help = "index of raw_encap/raw_decap data",
> >  		.next = NEXT(next_item),
> >  		.call = parse_port,
> >@@ -4344,14 +4350,14 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_TAG_INDEX] = {
> >  		.name = "index",
> >  		.help = "index of tag array",
> >-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
> >  		.call = parse_vc_conf,
> >  	},
> >  	[ACTION_SET_TAG_DATA] = {
> >  		.name = "data",
> >  		.help = "tag value",
> >-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY
> >  			     (struct rte_flow_action_set_tag, data)),
> >  		.call = parse_vc_conf,
> >@@ -4359,7 +4365,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_TAG_MASK] = {
> >  		.name = "mask",
> >  		.help = "mask for tag value",
> >-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY
> >  			     (struct rte_flow_action_set_tag, mask)),
> >  		.call = parse_vc_conf,
> >@@ -4375,7 +4381,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_META_DATA] = {
> >  		.name = "data",
> >  		.help = "metadata value",
> >-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY
> >  			     (struct rte_flow_action_set_meta, data)),
> >  		.call = parse_vc_conf,
> >@@ -4383,7 +4389,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_META_MASK] = {
> >  		.name = "mask",
> >  		.help = "mask for metadata value",
> >-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY
> >  			     (struct rte_flow_action_set_meta, mask)),
> >  		.call = parse_vc_conf,
> >@@ -4399,7 +4405,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_IPV4_DSCP_VALUE] = {
> >  		.name = "dscp_value",
> >  		.help = "new IPv4 DSCP value to set",
> >-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY
> >  			     (struct rte_flow_action_set_dscp, dscp)),
> >  		.call = parse_vc_conf,
> >@@ -4415,7 +4421,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SET_IPV6_DSCP_VALUE] = {
> >  		.name = "dscp_value",
> >  		.help = "new IPv6 DSCP value to set",
> >-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY
> >  			     (struct rte_flow_action_set_dscp, dscp)),
> >  		.call = parse_vc_conf,
> >@@ -4433,7 +4439,7 @@ static const struct token token_list[] = {
> >  		.help = "flow age timeout value",
> >  		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
> >  					   timeout, 24)),
> >-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.call = parse_vc_conf,
> >  	},
> >  	[ACTION_SAMPLE] = {
> >@@ -4447,7 +4453,7 @@ static const struct token token_list[] = {
> >  	[ACTION_SAMPLE_RATIO] = {
> >  		.name = "ratio",
> >  		.help = "flow sample ratio value",
> >-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
> >+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
> >  		.args = ARGS(ARGS_ENTRY_ARB
> >  			     (offsetof(struct action_sample_data, conf) +
> >  			      offsetof(struct rte_flow_action_sample, ratio),
> >@@ -4461,7 +4467,7 @@ static const struct token token_list[] = {
> >  	},
> >  	[ACTION_SAMPLE_INDEX_VALUE] = {
> >  		.name = "{index}",
> >-		.type = "UNSIGNED",
> >+		.type = "COMMON_UNSIGNED",
> >  		.help = "unsigned integer value",
> >  		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
> >  		.call = parse_vc_action_sample_index,
> >@@ -4472,7 +4478,7 @@ static const struct token token_list[] = {
> >  		.name = "action_id",
> >  		.help = "specify a shared action id to destroy",
> >  		.next = NEXT(next_sa_destroy_attr,
> >-			     NEXT_ENTRY(SHARED_ACTION_ID)),
> >+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
> >  		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
> >  					    args.sa_destroy.action_id)),
> >  		.call = parse_sa_destroy,
> >@@ -4482,7 +4488,7 @@ static const struct token token_list[] = {
> >  		.name = "action_id",
> >  		.help = "specify a shared action id to create",
> >  		.next = NEXT(next_sa_create_attr,
> >-			     NEXT_ENTRY(SHARED_ACTION_ID)),
> >+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
> >  		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
> >  	},
> >  	[ACTION_SHARED] = {
> >@@ -4862,7 +4868,7 @@ parse_vc(struct context *ctx, const struct token *token,
> >  	case TRANSFER:
> >  		out->args.vc.attr.transfer = 1;
> >  		return len;
> >-	case PATTERN:
> >+	case ITEM_PATTERN:
> >  		out->args.vc.pattern =
> >  			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
> >  					       sizeof(double));
> >@@ -4943,7 +4949,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
> >  		return -1;
> >  	/* Parse parameter types. */
> >  	switch (ctx->curr) {
> >-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
> >+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
> >  	case ITEM_PARAM_IS:
> >  		index = 0;
> >diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> >index 576d5acab..af7570429 100644
> >--- a/app/test-pmd/config.c
> >+++ b/app/test-pmd/config.c
> >@@ -38,7 +38,6 @@
> >  #include <rte_string_fns.h>
> >  #include <rte_cycles.h>
> >  #include <rte_flow.h>
> >-#include <rte_errno.h>
> >  #ifdef RTE_NET_IXGBE
> >  #include <rte_pmd_ixgbe.h>
> >  #endif
> >@@ -170,6 +169,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
> >  	printf("%s%s", name, buf);
> >  }
> >+#ifdef RTE_EXEC_ENV_WINDOWS
> >+static int
> >+clock_gettime_monotonic(struct timespec *tp)
> >+{
> >+	LARGE_INTEGER pf, pc;
> >+	LONGLONG nsec;
> >+
> >+	if (QueryPerformanceFrequency(&pf) == 0)
> >+		return -1;
> >+
> >+	if (QueryPerformanceCounter(&pc) == 0)
> >+		return -1;
> >+
> >+	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> >+	tp->tv_sec = nsec / NS_PER_SEC;
> >+	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> >+
> >+	return 0;
> >+}
> >+#endif
> >+
> >  void
> >  nic_stats_display(portid_t port_id)
> >  {
> >@@ -182,6 +202,7 @@ nic_stats_display(portid_t port_id)
> >  	uint64_t diff_pkts_rx, diff_pkts_tx, diff_bytes_rx, diff_bytes_tx,
> >  								diff_ns;
> >  	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
> >+	int ret;
> >  	struct rte_eth_stats stats;
> >  	static const char *nic_stats_border = "########################";
> >@@ -202,7 +223,13 @@ nic_stats_display(portid_t port_id)
> >  	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
> >  	diff_ns = 0;
> >-	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
> >+
> >+#ifdef RTE_EXEC_ENV_WINDOWS
> >+	ret = clock_gettime_monotonic(&cur_time);
> >+#else
> >+	ret = clock_gettime(CLOCK_TYPE_ID, &cur_time);
> >+#endif
> >+	if (ret == 0) {
> >  		uint64_t ns;
> >  		ns = cur_time.tv_sec * NS_PER_SEC;
> >@@ -2674,7 +2701,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
> >  void
> >  port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
> >-			 uint hash_key_len)
> >+			 unsigned int hash_key_len)
> >  {
> >  	struct rte_eth_rss_conf rss_conf;
> >  	int diag;
> >@@ -3404,13 +3431,13 @@ set_tx_pkt_split(const char *name)
> >  }
> >  int
> >-parse_fec_mode(const char *name, uint32_t *mode)
> >+parse_fec_mode(const char *name, uint32_t *fec_capa)
> >  {
> >  	uint8_t i;
> >  	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
> >  		if (strcmp(fec_mode_name[i].name, name) == 0) {
> >-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
> >+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
> >  			return 0;
> >  		}
> >  	}
> >diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
> >index 6b4df335f..0fb03b9f9 100644
> >--- a/app/test-pmd/csumonly.c
> >+++ b/app/test-pmd/csumonly.c
> >@@ -696,7 +696,11 @@ pkt_copy_split(const struct rte_mbuf *pkt)
> >  	mp = current_fwd_lcore()->mbp;
> >  	if (tx_pkt_split == TX_PKT_SPLIT_RND)
> >+#ifndef RTE_EXEC_ENV_WINDOWS
> >  		nb_seg = random() % tx_pkt_nb_segs + 1;
> >+#else
> >+		nb_seg = rand() % tx_pkt_nb_segs + 1;
> >+#endif
> >  	else
> >  		nb_seg = tx_pkt_nb_segs;
> >diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
> >index af6f7e790..8948f28eb 100644
> >--- a/app/test-pmd/icmpecho.c
> >+++ b/app/test-pmd/icmpecho.c
> >@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
> >  		}
> >  		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
> >  		cksum = ~icmp_h->icmp_cksum & 0xffff;
> >-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
> >-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
> >+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
> >+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
> >  		cksum = (cksum & 0xffff) + (cksum >> 16);
> >  		cksum = (cksum & 0xffff) + (cksum >> 16);
> >  		icmp_h->icmp_cksum = ~cksum;
> >diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
> >index e3b98e3e0..9ad04e992 100644
> >--- a/app/test-pmd/ieee1588fwd.c
> >+++ b/app/test-pmd/ieee1588fwd.c
> >@@ -60,8 +60,9 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
> >  		printf("Port %u RX timestamp registers not valid\n", pi);
> >  		return;
> >  	}
> >-	printf("Port %u RX timestamp value %lu s %lu ns\n",
> >-		pi, timestamp.tv_sec, timestamp.tv_nsec);
> >+
> >+	printf("Port %u RX timestamp value %ju s %lu ns\n",
> >+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
> >  }
> >  #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
> >@@ -83,9 +84,10 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
> >  		       pi, MAX_TX_TMST_WAIT_MICROSECS);
> >  		return;
> >  	}
> >-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
> >+
> >+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
> >  	       "%u micro-second%s\n",
> >-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
> >+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
> >  	       (wait_us == 1) ? "" : "s");
> >  }
> >diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
> >index a326c8ce4..a279d5f32 100644
> >--- a/app/test-pmd/parameters.c
> >+++ b/app/test-pmd/parameters.c
> >@@ -15,6 +15,7 @@
> >  #include <sys/queue.h>
> >  #include <sys/stat.h>
> >+#include <sys/socket.h>
> >  #include <stdint.h>
> >  #include <unistd.h>
> >@@ -200,11 +201,15 @@ usage(char* progname)
> >  	       "requests flow API isolated mode on all ports at initialization time.\n");
> >  	printf("  --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n");
> >  	printf("  --rx-offloads=0xXXXXXXXX: hexadecimal bitmask of RX queue offloads\n");
> >+#ifndef RTE_EXEC_ENV_WINDOWS
> >  	printf("  --hot-plug: enable hot plug for device.\n");
> >+#endif
> >  	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
> >  	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
> >+#ifndef RTE_EXEC_ENV_WINDOWS
> >  	printf("  --mlockall: lock all memory\n");
> >  	printf("  --no-mlockall: do not lock all memory\n");
> >+#endif
> >  	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
> >  	       "    native: use regular DPDK memory to create and populate mempool\n"
> >  	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
> >@@ -229,7 +234,7 @@ usage(char* progname)
> >  #ifdef RTE_LIB_CMDLINE
> >  static int
> >-init_peer_eth_addrs(char *config_filename)
> >+init_peer_eth_addrs(const char *config_filename)
> >  {
> >  	FILE *config_file;
> >  	portid_t i;
> >@@ -626,11 +631,15 @@ launch_args_parse(int argc, char** argv)
> >  		{ "mask-event",			1, 0, 0 },
> >  		{ "tx-offloads",		1, 0, 0 },
> >  		{ "rx-offloads",		1, 0, 0 },
> >+#ifndef RTE_EXEC_ENV_WINDOWS
> >  		{ "hot-plug",			0, 0, 0 },
> >+#endif
> >  		{ "vxlan-gpe-port",		1, 0, 0 },
> >  		{ "geneve-parsed-port",		1, 0, 0 },
> >+#ifndef RTE_EXEC_ENV_WINDOWS
> >  		{ "mlockall",			0, 0, 0 },
> >  		{ "no-mlockall",		0, 0, 0 },
> >+#endif
> >  		{ "mp-alloc",			1, 0, 0 },
> >  		{ "tx-ip",			1, 0, 0 },
> >  		{ "tx-udp",			1, 0, 0 },
> >@@ -742,13 +751,14 @@ launch_args_parse(int argc, char** argv)
> >  						 "Invalid tx-ip: %s", optarg);
> >  				*end++ = 0;
> >-				if (inet_aton(optarg, &in) == 0)
> >+
> >+				if (inet_pton(AF_INET, optarg, &in) == 0)
> >  					rte_exit(EXIT_FAILURE,
> >  						 "Invalid source IP address: %s\n",
> >  						 optarg);
> >  				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
> >-				if (inet_aton(end, &in) == 0)
> >+				if (inet_pton(AF_INET, end, &in) == 0)
> >  					rte_exit(EXIT_FAILURE,
> >  						 "Invalid destination IP address: %s\n",
> >  						 optarg);
> >@@ -1333,8 +1343,10 @@ launch_args_parse(int argc, char** argv)
> >  					rte_exit(EXIT_FAILURE,
> >  						 "invalid mask-event argument\n");
> >  				}
> >+#ifndef RTE_EXEC_ENV_WINDOWS
> >  			if (!strcmp(lgopts[opt_idx].name, "hot-plug"))
> >  				hot_plug = 1;
> >+#endif
> >  			if (!strcmp(lgopts[opt_idx].name, "mlockall"))
> >  				do_mlockall = 1;
> >  			if (!strcmp(lgopts[opt_idx].name, "no-mlockall"))
> >diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> >index 98c3248c0..764191077 100644
> >--- a/app/test-pmd/testpmd.c
> >+++ b/app/test-pmd/testpmd.c
> >@@ -9,7 +9,9 @@
> >  #include <string.h>
> >  #include <time.h>
> >  #include <fcntl.h>
> >+#ifndef RTE_EXEC_ENV_WINDOWS
> >  #include <sys/mman.h>
> >+#endif
> 
> Can 'mmap' and 'munmap' be replaced with 'rte_mem_map' and
> 'rte_mem_unmap'  and #include <rte_eal_paging.h> instead?
>
Thanks Pallavi, will address in next version. 

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-04-01  8:44   ` Tal Shnaiderman
@ 2021-04-02 22:19     ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-02 22:19 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

On Thu, Apr 01, 2021 at 08:44:31AM +0000, Tal Shnaiderman wrote:
> > Subject: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
> > 
> > From: Jie Zhou <jizh@microsoft.com>
> > 
> > This patch is to enable testpmd on windows. It mainly includes:
> > - Enable building libraries on Windows that TestPMD depends on
> > - Enable building testpmd on Windows
> > - Resolve name collisions with Windows types
> > - Add clock_gettime_monotic for testpmd on Windows
> > - Make printf format work for both Linux and Windows
> > - Add missing macros
> > - Add missing IPPROTO_RAW to in.h
> > - Replace htons with RTE_BE16
> > - Replace inet_aton with inet_pton
> > - Fix parse_fec_mode to return fec_capa to remove compilation warning
> > - ...
> 
> Hi Jie,
> 
> I think each topic above deserves it's own patch, some can be squashed together, e.g - one patch for all missing macros.
>
Sure Tal, I will try to split into multiple patch as many as possible in next version.
 
> > 
> > Issue under active investigation:
> > - Recent DPDK upstream change "eal: detach memsegs on cleanup" exposed
> >   failure at eal exit with "EAL: Could not unmap memory: No Error".
> >   Investigating KERNELBASE!UnmapViewOfFile. The issue will cause system
> >   crash. Currently temporarily remove cleanup at exit on Windows.
> >   Will revert after issue root caused and fixed
> > 
> > Future work:
> > - Some issues discovered at validation which need further investigations
> >   * Perf inconsistency issues: TPUT fluctuated significantly from runs
> >   * After traffic stop, port stats shows pps being 0 while bps not
> >   * Currently mempool allocation only succeed with native. Other methods
> >     failed at rte_mem_lock/VirtualLock. Thus currently only allow native
> > - Hot-plug not supported yet
> > 
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > 
> > ---
> > V2 changes:
> >     - Fix commit message log long line issue
> >     - Fix coding style issues of pointer location
> >     - Fix indentation issue
> >     - Fix FreeBSD2101 compilation issue of AF_INET undeclared
> > ---
> >  app/meson.build                             |  15 +-
> >  app/test-pmd/cmdline.c                      |  12 +-
> >  app/test-pmd/cmdline_flow.c                 | 440 ++++++++++----------
> >  app/test-pmd/config.c                       |  37 +-
> >  app/test-pmd/csumonly.c                     |   4 +
> >  app/test-pmd/icmpecho.c                     |   4 +-
> >  app/test-pmd/ieee1588fwd.c                  |  10 +-
> >  app/test-pmd/parameters.c                   |  18 +-
> >  app/test-pmd/testpmd.c                      |  38 +-
> >  app/test-pmd/testpmd.h                      |   6 +-
> >  lib/librte_eal/windows/include/netinet/in.h |   1 +
> >  lib/librte_eal/windows/include/rte_os.h     |   8 +
> >  lib/meson.build                             |   7 +
> >  13 files changed, 352 insertions(+), 248 deletions(-)
> > 
> > diff --git a/app/meson.build b/app/meson.build
> > index 87fc195db..00622933e 100644
> > --- a/app/meson.build
> > +++ b/app/meson.build
> > @@ -1,10 +1,6 @@
> >  # SPDX-License-Identifier: BSD-3-Clause
> >  # Copyright(c) 2017-2019 Intel Corporation
> > 
> > -if is_windows
> > -	subdir_done()
> > -endif
> > -
> >  apps = [
> >  	'pdump',
> >  	'proc-info',
> > @@ -21,6 +17,11 @@ apps = [
> >  	'test-regex',
> >  	'test-sad']
> > 
> > +if is_windows
> > +	apps = [
> > +		'test-pmd']
> > +endif
> > +
> 
> Please disable each unsupported app instead of adding this part, see how it was done in the PMDs enablement [b9d60b5434e9df46f5 ("drivers/net: build i40e and mlx5 on Windows")].  

Will do for all the instances. Thanks for the pointer!

> 
> >  # for BSD only
> >  lib_execinfo = cc.find_library('execinfo', required: false)
> > 
> > @@ -73,5 +74,7 @@ foreach app:apps
> >  	endif
> >  endforeach
> > 
> > -# special case the autotests
> > -subdir('test')
> > +if not(is_windows)
> > +	# special case the autotests
> > +	subdir('test')
> > +endif
> 
> Same, disable in ..\app\test\meson.build
> 
> <snip>
> 
> > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
> > index 6b4df335f..0fb03b9f9 100644
> > --- a/app/test-pmd/csumonly.c
> > +++ b/app/test-pmd/csumonly.c
> > @@ -696,7 +696,11 @@ pkt_copy_split(const struct rte_mbuf *pkt)
> >  	mp = current_fwd_lcore()->mbp;
> > 
> >  	if (tx_pkt_split == TX_PKT_SPLIT_RND)
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  		nb_seg = random() % tx_pkt_nb_segs + 1;
> > +#else
> > +		nb_seg = rand() % tx_pkt_nb_segs + 1;
> > +#endif
> 
> Can we use a common function for both OSs instead? Rte_rand()?
> 

You are right. Will address in the new version.

> >  	else
> >  		nb_seg = tx_pkt_nb_segs;
> >
> 
> <snip>
>  
> > -
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  	if (hot_plug) {
> >  		ret = rte_dev_event_monitor_stop();
> >  		if (ret) {
> > @@ -3096,6 +3118,7 @@ pmd_test_exit(void)
> >  			return;
> >  		}
> >  	}
> > +#endif
> 
> I think it's better to add stubs for Windows instead of ifndefs in the code if possible.
> 

Will add librte_eal\windows\eal_dev.c and stubs in it. Thanks.

> >  	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
> >  		if (mempools[i])
> >  			rte_mempool_free(mempools[i]);
> > @@ -3259,6 +3282,7 @@ register_eth_event_callback(void)
> >  	return 0;
> >  }
> > 
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  /* This function is used by the interrupt thread */
> >  static void
> >  dev_event_callback(const char *device_name, enum rte_dev_event_type
> > type,
> > @@ -3308,6 +3332,7 @@ dev_event_callback(const char *device_name,
> > enum rte_dev_event_type type,
> >  		break;
> >  	}
> >  }
> > +#endif
> > 
> >  static void
> >  rxtx_port_config(struct rte_port *port)
> > @@ -3759,7 +3784,9 @@ signal_handler(int signum)
> >  		f_quit = 1;
> >  		/* exit with the expected status */
> >  		signal(signum, SIG_DFL);
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  		kill(getpid(), signum);
> > +#endif
> >  	}
> >  }
> > 
> > @@ -3834,10 +3861,12 @@ main(int argc, char** argv)
> >  	if (argc > 1)
> >  		launch_args_parse(argc, argv);
> > 
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
> >  		TESTPMD_LOG(NOTICE, "mlockall() failed with error
> > \"%s\"\n",
> >  			strerror(errno));
> >  	}
> > +#endif
> > 
> >  	if (tx_first && interactive)
> >  		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
> > @@ -3859,6 +3888,7 @@ main(int argc, char** argv)
> > 
> >  	init_config();
> > 
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  	if (hot_plug) {
> >  		ret = rte_dev_hotplug_handle_enable();
> >  		if (ret) {
> > @@ -3882,6 +3912,7 @@ main(int argc, char** argv)
> >  			return -1;
> >  		}
> >  	}
> > +#endif
> 
> Same as above.
> 
> > 
> >  	if (!no_device_start && start_port(RTE_PORT_ALL) != 0)
> >  		rte_exit(EXIT_FAILURE, "Start ports failed\n");
> > @@ -3969,10 +4000,11 @@ main(int argc, char** argv)
> >  			return 1;
> >  	}
> > 
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  	ret = rte_eal_cleanup();
> >  	if (ret != 0)
> >  		rte_exit(EXIT_FAILURE,
> >  			 "EAL cleanup failed: %s\n", strerror(-ret));
> > -
> > +#endif
> >  	return EXIT_SUCCESS;
> >  }
> > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> > index af4085917..c56c813d6 100644
> > --- a/app/test-pmd/testpmd.h
> > +++ b/app/test-pmd/testpmd.h
> > @@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t
> > nb_tx)
> >  }
> > 
> >  /* Prototypes */
> > -unsigned int parse_item_list(char* str, const char* item_name,
> > +unsigned int parse_item_list(const char *str, const char *item_name,
> >  			unsigned int max_items,
> >  			unsigned int *parsed_items, int
> > check_unique_values);
> >  void launch_args_parse(int argc, char** argv);
> > @@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
> >  void set_tx_pkt_times(unsigned int *tx_times);
> >  void show_tx_pkt_times(void);
> >  void set_tx_pkt_split(const char *name);
> > -int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
> > +int parse_fec_mode(const char *name, uint32_t *fec_capa);
> >  void show_fec_capability(uint32_t num, struct rte_eth_fec_capa
> > *speed_fec_capa);
> >  void set_nb_pkt_per_burst(uint16_t pkt_burst);
> >  char *list_pkt_forwarding_modes(void);
> > @@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf,
> > uint16_t rate,
> > 
> >  void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
> >  void port_rss_hash_key_update(portid_t port_id, char rss_type[],
> > -			      uint8_t *hash_key, uint hash_key_len);
> > +			      uint8_t *hash_key, unsigned int hash_key_len);
> >  int rx_queue_id_is_invalid(queueid_t rxq_id);
> >  int tx_queue_id_is_invalid(queueid_t txq_id);
> >  void setup_gro(const char *onoff, portid_t port_id);
> > diff --git a/lib/librte_eal/windows/include/netinet/in.h
> > b/lib/librte_eal/windows/include/netinet/in.h
> > index 6455b9ba5..38268cf80 100644
> > --- a/lib/librte_eal/windows/include/netinet/in.h
> > +++ b/lib/librte_eal/windows/include/netinet/in.h
> > @@ -24,6 +24,7 @@
> >  #define IPPROTO_NONE      59
> >  #define IPPROTO_DSTOPTS   60
> >  #define IPPROTO_SCTP     132
> > +#define IPPROTO_RAW      255
> > 
> >  #define INET6_ADDRSTRLEN 46
> > 
> > diff --git a/lib/librte_eal/windows/include/rte_os.h
> > b/lib/librte_eal/windows/include/rte_os.h
> > index 7ef38ff06..f318a66b8 100644
> > --- a/lib/librte_eal/windows/include/rte_os.h
> > +++ b/lib/librte_eal/windows/include/rte_os.h
> > @@ -25,6 +25,14 @@ extern "C" {
> >  #define PATH_MAX _MAX_PATH
> >  #endif
> > 
> > +#define strcasecmp _stricmp
> > +#define open _open
> > +#define read _read
> > +
> > +#ifndef S_ISREG
> > +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
> > +#endif
> > +
> >  #ifndef sleep
> >  #define sleep(x) Sleep(1000 * (x))
> >  #endif
> > diff --git a/lib/meson.build b/lib/meson.build
> > index 7712aa497..295976a4d 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -46,6 +46,13 @@ if is_windows
> >  		'cmdline',
> >  		'hash',
> >  		'cfgfile',
> > +		'metrics',
> > +		'timer',
> > +		'gro',
> > +		'gso',
> > +		'pdump',
> > +		'bitratestats',
> > +		'latencystats',
> >  	] # only supported libraries for windows
> >  endif
> > 
> > --
> > 2.30.0.vfs.0.2

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-03-19 16:51 ` [dpdk-dev] [PATCH v2] " Jie Zhou
                     ` (2 preceding siblings ...)
  2021-04-01  8:44   ` Tal Shnaiderman
@ 2021-04-11 21:39   ` Dmitry Kozlyuk
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
  4 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-04-11 21:39 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Hi Jie,

General comment: try to avoid #ifdef RTE_EXEC_ENV_WINDOWS except for
inherently non-portable Unix code. It clutters the source and complicates
testing: unless you build on Linux you won't know something broke in code
under #ifdef.
Take device hot-plug for example. Since you disable parameter parsing with
#ifdef, hot_plug variable is always 0. You don't need to disable code guarded
by this variable until it only uses DPDK API. You may need to add stubs to
EAL in a separate commit.

2021-03-19 09:51 (UTC-0700), Jie Zhou:
[...]
> diff --git a/app/meson.build b/app/meson.build
> index 87fc195db..00622933e 100644
> --- a/app/meson.build
> +++ b/app/meson.build
> @@ -1,10 +1,6 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017-2019 Intel Corporation
>  
> -if is_windows
> -	subdir_done()
> -endif
> -
>  apps = [
>  	'pdump',
>  	'proc-info',
> @@ -21,6 +17,11 @@ apps = [
>  	'test-regex',
>  	'test-sad']
>  
> +if is_windows
> +	apps = [
> +		'test-pmd']
> +endif
> +

Can we disable individual apps instead of having two lists,
like Pallavi did in drivers/net directory?

[...]
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 14110eb2e..35a6dd0d3 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -8,12 +8,14 @@
>  #include <stdio.h>
>  #include <stdint.h>
>  #include <string.h>
> +
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  #include <termios.h>
> +#endif

This include is not needed at all: cmdline abstracts termios.


> +#ifdef RTE_EXEC_ENV_WINDOWS
> +#ifndef IPDEFTTL
> +#define IPDEFTTL 64
> +#endif
> +#endif
> +

[...]
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 576d5acab..af7570429 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -38,7 +38,6 @@
>  #include <rte_string_fns.h>
>  #include <rte_cycles.h>
>  #include <rte_flow.h>
> -#include <rte_errno.h>
>  #ifdef RTE_NET_IXGBE
>  #include <rte_pmd_ixgbe.h>
>  #endif
> @@ -170,6 +169,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
>  	printf("%s%s", name, buf);
>  }
>  
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +clock_gettime_monotonic(struct timespec *tp)
> +{
> +	LARGE_INTEGER pf, pc;
> +	LONGLONG nsec;
> +
> +	if (QueryPerformanceFrequency(&pf) == 0)
> +		return -1;
> +
> +	if (QueryPerformanceCounter(&pc) == 0)
> +		return -1;
> +
> +	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> +	tp->tv_sec = nsec / NS_PER_SEC;
> +	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> +
> +	return 0;
> +}
> +#endif
> +
>  void
>  nic_stats_display(portid_t port_id)
>  {
> @@ -182,6 +202,7 @@ nic_stats_display(portid_t port_id)
>  	uint64_t diff_pkts_rx, diff_pkts_tx, diff_bytes_rx, diff_bytes_tx,
>  								diff_ns;
>  	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
> +	int ret;
>  	struct rte_eth_stats stats;
>  
>  	static const char *nic_stats_border = "########################";
> @@ -202,7 +223,13 @@ nic_stats_display(portid_t port_id)
>  	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
>  
>  	diff_ns = 0;
> -	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
> +
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +	ret = clock_gettime_monotonic(&cur_time);
> +#else
> +	ret = clock_gettime(CLOCK_TYPE_ID, &cur_time);
> +#endif
> +	if (ret == 0) {

I suggest to use a single wrapped defined using #ifdef to avoid an #ifdef
each time it is called (although it's the only occurrence for now).

[...]
> diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
> index 6b4df335f..0fb03b9f9 100644
> --- a/app/test-pmd/csumonly.c
> +++ b/app/test-pmd/csumonly.c
> @@ -696,7 +696,11 @@ pkt_copy_split(const struct rte_mbuf *pkt)
>  	mp = current_fwd_lcore()->mbp;
>  
>  	if (tx_pkt_split == TX_PKT_SPLIT_RND)
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  		nb_seg = random() % tx_pkt_nb_segs + 1;
> +#else
> +		nb_seg = rand() % tx_pkt_nb_segs + 1;
> +#endif

Can rte_rand() be exported from EAL and used here?

[...]
>  
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  	ret = rte_eal_cleanup();
>  	if (ret != 0)
>  		rte_exit(EXIT_FAILURE,
>  			 "EAL cleanup failed: %s\n", strerror(-ret));
> -
> +#endif
>  	return EXIT_SUCCESS;
>  }

rte_eal_cleanup() is fixed, this can be removed.


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows
  2021-04-02 22:14     ` Jie Zhou
@ 2021-04-11 21:49       ` Dmitry Kozlyuk
  0 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-04-11 21:49 UTC (permalink / raw)
  To: Jie Zhou
  Cc: Kadam, Pallavi, dev, xiaoyun.li, roretzla, thomas,
	bruce.richardson, ferruh.yigit

2021-04-02 15:14 (UTC-0700), Jie Zhou:
> On Wed, Mar 31, 2021 at 12:10:03PM -0700, Kadam, Pallavi wrote:
> > 
> > On 3/19/2021 9:51 AM, Jie Zhou wrote:  
> > >From: Jie Zhou <jizh@microsoft.com>
[...]
> > >--- a/app/test-pmd/testpmd.c
> > >+++ b/app/test-pmd/testpmd.c
> > >@@ -9,7 +9,9 @@
> > >  #include <string.h>
> > >  #include <time.h>
> > >  #include <fcntl.h>
> > >+#ifndef RTE_EXEC_ENV_WINDOWS
> > >  #include <sys/mman.h>
> > >+#endif  
> > 
> > Can 'mmap' and 'munmap' be replaced with 'rte_mem_map' and
> > 'rte_mem_unmap'  and #include <rte_eal_paging.h> instead?
> >  
> Thanks Pallavi, will address in next version. 

Note that rte_mem_map() doesn't allow mapping hugepages of different sizes,
so xmemhuge will probably remain unsupported on Windows for now.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows
  2021-03-19 16:51 ` [dpdk-dev] [PATCH v2] " Jie Zhou
                     ` (3 preceding siblings ...)
  2021-04-11 21:39   ` Dmitry Kozlyuk
@ 2021-04-13 17:19   ` Jie Zhou
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 1/6] app/testpmd: build libraries that testpmd depends on Jie Zhou
                       ` (6 more replies)
  4 siblings, 7 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 17:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

This patch is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that TestPMD depends on
- Enable building testpmd on Windows
- Resolve name collisions with Windows types
- Add clock_gettime_monotic for testpmd on Windows
- Make printf format work for both Linux and Windows
- Add missing macros
- Add missing IPPROTO_RAW to in.h
- Replace htons with RTE_BE16
- Replace inet_aton with inet_pton
- Fix parse_fec_mode to return fec_capa to remove compilation warning
- ...

Issue under active investigation:
- Recent DPDK upstream change "eal: detach memsegs on cleanup" exposed
  failure at eal exit with "EAL: Could not unmap memory: No Error".
  Investigating KERNELBASE!UnmapViewOfFile. The issue will cause system
  crash. Currently temporarily remove cleanup at exit on Windows.
  Will revert after issue root caused and fixed

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet

---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---


Jie Zhou (6):
  app/testpmd: build libraries that testpmd depends on
  app/testpmd: define IPPROTO_RAW in in.h
  app/testpmd: add required Macros
  app/testpmd: add device event stubs on Windows
  app/testpmd: add rte_mem_lockall in librte_eal
  app/testpmd: enable testpmd on Windows

 app/meson.build                             |  10 +-
 app/pdump/meson.build                       |   6 +
 app/proc-info/meson.build                   |   6 +
 app/test-acl/meson.build                    |   6 +
 app/test-bbdev/meson.build                  |   6 +
 app/test-cmdline/meson.build                |   6 +
 app/test-compress-perf/meson.build          |   6 +
 app/test-crypto-perf/meson.build            |   6 +
 app/test-eventdev/meson.build               |   6 +
 app/test-fib/meson.build                    |   6 +
 app/test-flow-perf/meson.build              |   6 +
 app/test-pipeline/meson.build               |   6 +
 app/test-pmd/cmdline.c                      |  12 +-
 app/test-pmd/cmdline_flow.c                 | 440 ++++++++++----------
 app/test-pmd/config.c                       |  35 +-
 app/test-pmd/csumonly.c                     |   2 +-
 app/test-pmd/icmpecho.c                     |   4 +-
 app/test-pmd/ieee1588fwd.c                  |  10 +-
 app/test-pmd/meson.build                    |   4 +
 app/test-pmd/parameters.c                   |   8 +-
 app/test-pmd/testpmd.c                      |  44 +-
 app/test-pmd/testpmd.h                      |   4 +-
 app/test-regex/meson.build                  |   6 +
 app/test-sad/meson.build                    |   6 +
 app/test/meson.build                        |   6 +
 lib/librte_eal/include/rte_eal_paging.h     |  20 +
 lib/librte_eal/unix/eal_unix_memory.c       |  13 +
 lib/librte_eal/version.map                  |   1 +
 lib/librte_eal/windows/eal_dev.c            |  35 ++
 lib/librte_eal/windows/eal_memory.c         |  10 +
 lib/librte_eal/windows/include/netinet/in.h |   1 +
 lib/librte_eal/windows/include/rte_os.h     |  16 +
 lib/librte_eal/windows/meson.build          |   1 +
 lib/meson.build                             |   7 +
 34 files changed, 500 insertions(+), 261 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v3 1/6] app/testpmd: build libraries that testpmd depends on
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
@ 2021-04-13 17:19     ` Jie Zhou
  2021-04-13 18:49       ` Tal Shnaiderman
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 2/6] app/testpmd: define IPPROTO_RAW in in.h Jie Zhou
                       ` (5 subsequent siblings)
  6 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 17:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index 4eed83e57..2a6157418 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -46,6 +46,13 @@ if is_windows
 		'cmdline',
 		'hash',
 		'cfgfile',
+		'metrics',
+		'timer',
+		'gro',
+		'gso',
+		'pdump',
+		'bitratestats',
+		'latencystats',
 	] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v3 2/6] app/testpmd: define IPPROTO_RAW in in.h
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 1/6] app/testpmd: build libraries that testpmd depends on Jie Zhou
@ 2021-04-13 17:19     ` Jie Zhou
  2021-04-13 18:50       ` Tal Shnaiderman
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 3/6] app/testpmd: add required Macros Jie Zhou
                       ` (4 subsequent siblings)
  6 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 17:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/include/netinet/in.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/windows/include/netinet/in.h b/lib/librte_eal/windows/include/netinet/in.h
index 6455b9ba5..38268cf80 100644
--- a/lib/librte_eal/windows/include/netinet/in.h
+++ b/lib/librte_eal/windows/include/netinet/in.h
@@ -24,6 +24,7 @@
 #define IPPROTO_NONE      59
 #define IPPROTO_DSTOPTS   60
 #define IPPROTO_SCTP     132
+#define IPPROTO_RAW      255
 
 #define INET6_ADDRSTRLEN 46
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v3 3/6] app/testpmd: add required Macros
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 1/6] app/testpmd: build libraries that testpmd depends on Jie Zhou
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 2/6] app/testpmd: define IPPROTO_RAW in in.h Jie Zhou
@ 2021-04-13 17:19     ` Jie Zhou
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 4/6] app/testpmd: add device event stubs on Windows Jie Zhou
                       ` (3 subsequent siblings)
  6 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 17:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/include/rte_os.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index f0512f20a..60a623d4c 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -61,6 +61,14 @@ extern "C" {
 #define unlink _unlink
 #endif
 
+#define strcasecmp _stricmp
+#define open _open
+#define read _read
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 /* cpu_set macros implementation */
 #define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2)
 #define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2)
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v3 4/6] app/testpmd: add device event stubs on Windows
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
                       ` (2 preceding siblings ...)
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 3/6] app/testpmd: add required Macros Jie Zhou
@ 2021-04-13 17:19     ` Jie Zhou
  2021-04-13 20:10       ` Dmitry Kozlyuk
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 5/6] app/testpmd: add rte_mem_lockall in librte_eal Jie Zhou
                       ` (2 subsequent siblings)
  6 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 17:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add hot_plug related device event stubs in eal_dev.c on Windows.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/eal_dev.c   | 35 ++++++++++++++++++++++++++++++
 lib/librte_eal/windows/meson.build |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_dev.c

diff --git a/lib/librte_eal/windows/eal_dev.c b/lib/librte_eal/windows/eal_dev.c
new file mode 100644
index 000000000..4c51d07df
--- /dev/null
+++ b/lib/librte_eal/windows/eal_dev.c
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2018 Intel Corporation
+ */
+
+#include <rte_log.h>
+#include <rte_compat.h>
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 42ff5c2d5..9bd395a37 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
 	'eal.c',
 	'eal_alarm.c',
 	'eal_debug.c',
+	'eal_dev.c',
 	'eal_file.c',
 	'eal_hugepages.c',
 	'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v3 5/6] app/testpmd: add rte_mem_lockall in librte_eal
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
                       ` (3 preceding siblings ...)
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 4/6] app/testpmd: add device event stubs on Windows Jie Zhou
@ 2021-04-13 17:19     ` Jie Zhou
  2021-04-13 18:50       ` Tal Shnaiderman
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows Jie Zhou
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
  6 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 17:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

In order to replace POSIX mman APIs in testpmd, add rte_mem_lockall.
- On Unix, it is a wrapper of mlockall
- On Windows, it is just a stub

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/include/rte_eal_paging.h | 20 ++++++++++++++++++++
 lib/librte_eal/unix/eal_unix_memory.c   | 13 +++++++++++++
 lib/librte_eal/version.map              |  1 +
 lib/librte_eal/windows/eal_memory.c     | 10 ++++++++++
 4 files changed, 44 insertions(+)

diff --git a/lib/librte_eal/include/rte_eal_paging.h b/lib/librte_eal/include/rte_eal_paging.h
index ed98e70e9..959c2e135 100644
--- a/lib/librte_eal/include/rte_eal_paging.h
+++ b/lib/librte_eal/include/rte_eal_paging.h
@@ -37,6 +37,14 @@ enum rte_map_flags {
 	RTE_MAP_FORCE_ADDRESS = 1 << 3
 };
 
+/** Flags for memory lockall. */
+enum rte_mem_lockall_flags {
+	/** Lock all pages currently mapped into process's address space. */
+	RTE_MCL_CURRENT = 1 << 0,
+	/** Lock all pages mapped into process's address space in the future.*/
+	RTE_MCL_FUTURE = 1 << 1
+};
+
 /**
  * Map a portion of an opened file or the page file into memory.
  *
@@ -96,3 +104,15 @@ rte_mem_page_size(void);
 __rte_internal
 int
 rte_mem_lock(const void *virt, size_t size);
+
+/**
+ * locks all pages mapped into the address space of the calling process.
+ *
+ * @param flags
+ *  Memory lockall flags, a combination of rte_mem_lockall_flags.
+ * @return
+ *   0 on success, negative on error.
+ */
+__rte_internal
+int
+rte_mem_lockall(int flags);
diff --git a/lib/librte_eal/unix/eal_unix_memory.c b/lib/librte_eal/unix/eal_unix_memory.c
index ec7156df9..90e0c547a 100644
--- a/lib/librte_eal/unix/eal_unix_memory.c
+++ b/lib/librte_eal/unix/eal_unix_memory.c
@@ -150,3 +150,16 @@ rte_mem_lock(const void *virt, size_t size)
 		rte_errno = errno;
 	return ret;
 }
+
+int
+rte_mem_lockall(int flags)
+{
+	int mlockall_flags = 0;
+
+	if (flags & RTE_MCL_CURRENT)
+		mlockall_flags |= MCL_CURRENT;
+	if (flags & RTE_MCL_FUTURE)
+		mlockall_flags |= MCL_FUTURE;
+
+	return mlockall(mlockall_flags);
+}
diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
index e7217ae28..8dd8333e5 100644
--- a/lib/librte_eal/version.map
+++ b/lib/librte_eal/version.map
@@ -431,4 +431,5 @@ INTERNAL {
 	rte_mem_map;
 	rte_mem_page_size;
 	rte_mem_unmap;
+	rte_mem_lockall;
 };
diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
index 2cf5a5e64..4fe7e59a1 100644
--- a/lib/librte_eal/windows/eal_memory.c
+++ b/lib/librte_eal/windows/eal_memory.c
@@ -715,3 +715,13 @@ rte_eal_hugepage_attach(void)
 	EAL_LOG_NOT_IMPLEMENTED();
 	return -1;
 }
+
+int
+rte_mem_lockall(int flags)
+{
+	RTE_SET_USED(flags);
+
+	EAL_LOG_NOT_IMPLEMENTED();
+
+	return -1;
+}
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
                       ` (4 preceding siblings ...)
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 5/6] app/testpmd: add rte_mem_lockall in librte_eal Jie Zhou
@ 2021-04-13 17:19     ` Jie Zhou
  2021-04-13 18:58       ` Tal Shnaiderman
  2021-04-13 20:10       ` Dmitry Kozlyuk
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
  6 siblings, 2 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 17:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

From: Jie Zhou <jizh@microsoft.com>

This patch is to enable testpmd on windows. It mainly includes:
- Disable unsupported Apps on Windows under app\ except testpmd
- Resolve name collisions with Windows types
- Add clock_gettime_monotic for testpmd on Windows
- Make printf format work for both Linux and Windows
- Replace htons with RTE_BE16
- Replace inet_aton with inet_pton
- Fix parse_fec_mode to return fec_capa to remove compilation warning
- Replace mman.h POSIX APIs with rte_mem_xxx APIs
- Use OS independant rte_rand

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                         |  10 +-
 app/pdump/meson.build                   |   6 +
 app/proc-info/meson.build               |   6 +
 app/test-acl/meson.build                |   6 +
 app/test-bbdev/meson.build              |   6 +
 app/test-cmdline/meson.build            |   6 +
 app/test-compress-perf/meson.build      |   6 +
 app/test-crypto-perf/meson.build        |   6 +
 app/test-eventdev/meson.build           |   6 +
 app/test-fib/meson.build                |   6 +
 app/test-flow-perf/meson.build          |   6 +
 app/test-pipeline/meson.build           |   6 +
 app/test-pmd/cmdline.c                  |  12 +-
 app/test-pmd/cmdline_flow.c             | 440 ++++++++++++------------
 app/test-pmd/config.c                   |  35 +-
 app/test-pmd/csumonly.c                 |   2 +-
 app/test-pmd/icmpecho.c                 |   4 +-
 app/test-pmd/ieee1588fwd.c              |  10 +-
 app/test-pmd/meson.build                |   4 +
 app/test-pmd/parameters.c               |   8 +-
 app/test-pmd/testpmd.c                  |  44 ++-
 app/test-pmd/testpmd.h                  |   4 +-
 app/test-regex/meson.build              |   6 +
 app/test-sad/meson.build                |   6 +
 app/test/meson.build                    |   6 +
 lib/librte_eal/windows/include/rte_os.h |   8 +
 26 files changed, 404 insertions(+), 261 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 50a53dbde..b40b04ca7 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-	subdir_done()
-endif
-
 apps = [
 	'pdump',
 	'proc-info',
@@ -19,7 +15,11 @@ apps = [
 	'test-pipeline',
 	'test-pmd',
 	'test-regex',
-	'test-sad']
+	'test-sad'
+]
+
+# for BSD only
+lib_execinfo = cc.find_library('execinfo', required: false)
 
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
 default_ldflags = []
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 6d50e0339..b4b767d89 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c',
 		'test_bbdev.c',
 		'test_bbdev_perf.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index a1a484da9..6ff3c179e 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('comp_perf_options_parse.c',
 		'main.c',
 		'comp_perf_test_verify.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 558c64878..eef7708e0 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('cperf_ops.c',
 		'cperf_options_parsing.c',
 		'cperf_test_common.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 9e588d9ec..5af31fbb0 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('evt_main.c',
 		'evt_options.c',
 		'evt_test.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 6eaf83b41..5d5d70f18 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'actions_gen.c',
 	'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index d5eddaba9..5e43d7d69 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'config.c',
 	'init.c',
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f44116b08..335ed534d 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,12 +8,14 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
+
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <termios.h>
+#endif
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
@@ -3502,7 +3504,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
@@ -16458,17 +16460,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index fb7a3a8bd..9945adcf1 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -31,6 +31,12 @@
 
 #include "testpmd.h"
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+#endif
+
 /** Parser token indices. */
 enum index {
 	/* Special tokens. */
@@ -40,21 +46,21 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	SHARED_ACTION_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_SHARED_ACTION_ID,
 
 	/* Top-level command. */
 	SET,
@@ -125,7 +131,7 @@ enum index {
 	SHARED_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -860,7 +866,7 @@ static const enum index next_vc_attr[] = {
 	TRANSFER,
 	TUNNEL_SET,
 	TUNNEL_MATCH,
-	PATTERN,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -871,7 +877,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1841,104 +1847,104 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
-		.type = "HEX",
+		.type = "COMMON_HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[SHARED_ACTION_ID] = {
+	[COMMON_SHARED_ACTION_ID] = {
 		.name = "{shared_action_id}",
 		.type = "SHARED_ACTION_ID",
 		.help = "shared action id",
@@ -1969,7 +1975,7 @@ static const struct token token_list[] = {
 		.name = "shared_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage shared actions",
-		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_sa,
 	},
@@ -1984,7 +1990,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update shared action",
 		.next = NEXT(NEXT_ENTRY(SHARED_ACTION_SPEC),
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_sa,
 	},
@@ -1998,42 +2004,42 @@ static const struct token token_list[] = {
 	[SHARED_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query shared action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(SHARED_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.sa.action_id)),
 		.call = parse_sa,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump all flow rules to file",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
@@ -2042,8 +2048,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2052,22 +2058,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2084,14 +2090,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2099,21 +2105,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2121,7 +2127,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2137,7 +2143,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2151,14 +2157,14 @@ static const struct token token_list[] = {
 	[GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
 	[PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
@@ -2183,19 +2189,19 @@ static const struct token token_list[] = {
 	[TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	[TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2262,7 +2268,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2282,7 +2288,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2296,7 +2302,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2310,7 +2316,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2323,7 +2329,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2336,34 +2342,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2382,25 +2388,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2414,41 +2420,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2462,42 +2468,42 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2511,7 +2517,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2519,7 +2525,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2527,35 +2533,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2569,28 +2575,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2604,14 +2610,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2625,21 +2631,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2653,28 +2659,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2688,7 +2694,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2701,7 +2707,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2716,7 +2722,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2729,7 +2735,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2737,7 +2743,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2745,7 +2751,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2760,7 +2766,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2770,14 +2776,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2785,7 +2791,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2793,7 +2799,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2809,7 +2815,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2823,20 +2829,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2863,20 +2869,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2892,7 +2898,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -2907,7 +2913,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -2915,7 +2921,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -2923,7 +2929,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -2931,7 +2937,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -2947,7 +2953,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -2962,7 +2968,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -2970,7 +2976,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "Fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -2985,14 +2991,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3007,7 +3013,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3023,7 +3029,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3040,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3058,7 +3064,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3076,7 +3082,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3091,7 +3097,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3105,7 +3111,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3119,14 +3125,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3147,7 +3153,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3156,7 +3162,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3173,14 +3179,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3194,13 +3200,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3215,7 +3221,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3229,7 +3235,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3243,7 +3249,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3256,14 +3262,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3296,7 +3302,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3312,7 +3318,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3328,7 +3334,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3344,21 +3350,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3366,7 +3372,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3415,7 +3421,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3429,7 +3435,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3451,7 +3457,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3473,14 +3479,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3524,7 +3530,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3545,7 +3551,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3560,7 +3566,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3598,7 +3604,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3606,7 +3612,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3621,7 +3627,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3629,7 +3635,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3645,7 +3651,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3653,7 +3659,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3668,7 +3674,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3684,7 +3690,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3708,7 +3714,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3753,7 +3759,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3771,7 +3777,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3789,7 +3795,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3806,7 +3812,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3824,7 +3830,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -3932,7 +3938,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3949,7 +3955,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3966,7 +3972,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -3983,7 +3989,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4000,7 +4006,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4017,7 +4023,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4048,7 +4054,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4064,7 +4070,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4080,7 +4086,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4095,7 +4101,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4109,7 +4115,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4123,7 +4129,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4137,7 +4143,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4220,7 +4226,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4228,7 +4234,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4249,7 +4255,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4257,7 +4263,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4266,7 +4272,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4275,7 +4281,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4315,7 +4321,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4348,14 +4354,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4363,7 +4369,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4379,7 +4385,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4387,7 +4393,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4403,7 +4409,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4419,7 +4425,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4437,7 +4443,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4451,7 +4457,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4465,7 +4471,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4476,7 +4482,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to destroy",
 		.next = NEXT(next_sa_destroy_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.sa_destroy.action_id)),
 		.call = parse_sa_destroy,
@@ -4486,7 +4492,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to create",
 		.next = NEXT(next_sa_create_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_SHARED] = {
@@ -4866,7 +4872,7 @@ parse_vc(struct context *ctx, const struct token *token,
 	case TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -4947,7 +4953,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ef0b9784d..2dfb98ff1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -38,7 +38,6 @@
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_flow.h>
-#include <rte_errno.h>
 #ifdef RTE_NET_IXGBE
 #include <rte_pmd_ixgbe.h>
 #endif
@@ -170,6 +169,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 	printf("%s%s", name, buf);
 }
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+clock_gettime_monotonic(struct timespec* tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	if (QueryPerformanceFrequency(&pf) == 0)
+		return -1;
+
+	if (QueryPerformanceCounter(&pc) == 0)
+		return -1;
+
+	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+	tp->tv_sec = nsec / NS_PER_SEC;
+	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+
+	return 0;
+}
+#endif
+
 void
 nic_stats_display(portid_t port_id)
 {
@@ -182,6 +202,7 @@ nic_stats_display(portid_t port_id)
 	uint64_t diff_pkts_rx, diff_pkts_tx, diff_bytes_rx, diff_bytes_tx,
 								diff_ns;
 	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
+	int ret;
 	struct rte_eth_stats stats;
 
 	static const char *nic_stats_border = "########################";
@@ -202,7 +223,13 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
-	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+	ret = clock_gettime_monotonic(&cur_time);
+#else
+	ret = clock_gettime(CLOCK_TYPE_ID, &cur_time);
+#endif
+	if (ret == 0) {
 		uint64_t ns;
 
 		ns = cur_time.tv_sec * NS_PER_SEC;
@@ -3404,13 +3431,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..9ad04e992 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,9 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +84,10 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index 7e9c7bdd6..02aea0255 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -4,6 +4,10 @@
 # override default name to drop the hyphen
 name = 'testpmd'
 cflags += '-Wno-deprecated-declarations'
+
+# Enable using internal APIs in testpmd
+cflags += ['-DALLOW_INTERNAL_API']
+
 sources = files('5tswap.c',
 	'cmdline.c',
 	'cmdline_flow.c',
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..b2024efe5 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -15,6 +15,7 @@
 
 #include <sys/queue.h>
 #include <sys/stat.h>
+#include <sys/socket.h>
 
 #include <stdint.h>
 #include <unistd.h>
@@ -211,7 +212,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -723,13 +724,14 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 96d2e0fce..1322185a4 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,6 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
-#include <sys/mman.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +59,10 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#include <rte_eal_paging.h>
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -688,13 +691,11 @@ alloc_mem(size_t memsz, size_t pgsz, bool huge)
 	int flags;
 
 	/* allocate anonymous hugepages */
-	flags = MAP_ANONYMOUS | MAP_PRIVATE;
+	flags = RTE_MAP_ANONYMOUS | RTE_MAP_PRIVATE;
 	if (huge)
 		flags |= HUGE_FLAG | pagesz_flags(pgsz);
 
-	addr = mmap(NULL, memsz, PROT_READ | PROT_WRITE, flags, -1, 0);
-	if (addr == MAP_FAILED)
-		return NULL;
+	addr = rte_mem_map(NULL, memsz, RTE_PROT_READ | RTE_PROT_WRITE, flags, -1, 0);
 
 	return addr;
 }
@@ -728,7 +729,7 @@ create_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, struct extmem_param *param,
 
 		/* if we were told not to allocate hugepages, override */
 		if (!huge)
-			cur_pgsz = sysconf(_SC_PAGESIZE);
+			cur_pgsz = rte_mem_page_size();
 
 		ret = calc_mem_size(nb_mbufs, mbuf_sz, cur_pgsz, &mem_sz);
 		if (ret < 0) {
@@ -757,7 +758,7 @@ create_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, struct extmem_param *param,
 		}
 		/* lock memory if it's not huge pages */
 		if (!huge)
-			mlock(addr, mem_sz);
+			rte_mem_lock(addr, mem_sz);
 
 		/* populate IOVA addresses */
 		for (cur_page = 0; cur_page < n_pages; cur_page++) {
@@ -793,7 +794,7 @@ create_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, struct extmem_param *param,
 	if (iovas)
 		free(iovas);
 	if (addr)
-		munmap(addr, mem_sz);
+		rte_mem_unmap(addr, mem_sz);
 
 	return -1;
 }
@@ -835,7 +836,7 @@ setup_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, bool huge)
 
 	if (ret < 0) {
 		TESTPMD_LOG(ERR, "Cannot add memory to heap\n");
-		munmap(param.addr, param.len);
+		rte_mem_unmap(param.addr, param.len);
 		return -1;
 	}
 
@@ -846,6 +847,7 @@ setup_extmem(uint32_t nb_mbufs, uint32_t mbuf_sz, bool huge)
 
 	return 0;
 }
+
 static void
 dma_unmap_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 	     struct rte_mempool_memhdr *memhdr, unsigned mem_idx __rte_unused)
@@ -878,7 +880,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 	   struct rte_mempool_memhdr *memhdr, unsigned mem_idx __rte_unused)
 {
 	uint16_t pid = 0;
-	size_t page_size = sysconf(_SC_PAGESIZE);
+	size_t page_size = rte_mem_page_size();
 	int ret;
 
 	ret = rte_extmem_register(memhdr->addr, memhdr->len, NULL, 0,
@@ -1056,7 +1058,6 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 			rte_exit(EXIT_FAILURE, "Invalid mempool creation mode\n");
 		}
 	}
-
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -3061,6 +3062,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3074,7 +3076,6 @@ pmd_test_exit(void)
 			close_port(pt_id);
 		}
 	}
-
 	if (hot_plug) {
 		ret = rte_dev_event_monitor_stop();
 		if (ret) {
@@ -3761,7 +3762,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3824,8 +3827,8 @@ main(int argc, char** argv)
 	latencystats_enabled = 0;
 #endif
 
-	/* on FreeBSD, mlockall() is disabled by default */
-#ifdef RTE_EXEC_ENV_FREEBSD
+	/* on FreeBSD and Window, mlockall() is disabled by default */
+#if (defined(RTE_EXEC_ENV_FREEBSD) || defined (RTE_EXEC_ENV_WINDOWS))
 	do_mlockall = 0;
 #else
 	do_mlockall = 1;
@@ -3836,9 +3839,13 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
-	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
-		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
-			strerror(errno));
+	if (do_mlockall) {
+		ret = rte_mem_lockall(RTE_MCL_CURRENT | RTE_MCL_FUTURE);
+		if (ret) {
+			RTE_LOG(ERR, EAL,
+				"rte_mem_lockall() failed with error %d\n", ret);
+		}
+
 	}
 
 	if (tx_first && interactive)
@@ -3971,10 +3978,11 @@ main(int argc, char** argv)
 			return 1;
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	ret = rte_eal_cleanup();
 	if (ret != 0)
 		rte_exit(EXIT_FAILURE,
 			 "EAL cleanup failed: %s\n", strerror(-ret));
-
+#endif
 	return EXIT_SUCCESS;
 }
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a87ccb0f0..6a828583b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
@@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 76eaaea45..5de5a6fae 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
 	subdir_done()
 endif
diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index 60a623d4c..095f5f13b 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -24,6 +24,14 @@ extern "C" {
 #define PATH_MAX _MAX_PATH
 #endif
 
+#define strcasecmp _stricmp
+#define open _open
+#define read _read
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifndef sleep
 #define sleep(x) Sleep(1000 * (x))
 #endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 1/6] app/testpmd: build libraries that testpmd depends on
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 1/6] app/testpmd: build libraries that testpmd depends on Jie Zhou
@ 2021-04-13 18:49       ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-13 18:49 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

> Subject: [dpdk-dev] [PATCH v3 1/6] app/testpmd: build libraries that
> testpmd depends on
> 
> External email: Use caution opening links or attachments
> 
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/meson.build | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build index 4eed83e57..2a6157418
> 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -46,6 +46,13 @@ if is_windows
>                 'cmdline',
>                 'hash',
>                 'cfgfile',
> +               'metrics',
> +               'timer',
> +               'gro',
> +               'gso',
> +               'pdump',
> +               'bitratestats',
> +               'latencystats',
>         ] # only supported libraries for windows  endif

Please keep the same structure and order as the Unix library list.

> 
> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 2/6] app/testpmd: define IPPROTO_RAW in in.h
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 2/6] app/testpmd: define IPPROTO_RAW in in.h Jie Zhou
@ 2021-04-13 18:50       ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-13 18:50 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

> Subject: [dpdk-dev] [PATCH v3 2/6] app/testpmd: define IPPROTO_RAW in
> in.h
> 
> External email: Use caution opening links or attachments
> 
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/librte_eal/windows/include/netinet/in.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_eal/windows/include/netinet/in.h
> b/lib/librte_eal/windows/include/netinet/in.h
> index 6455b9ba5..38268cf80 100644
> --- a/lib/librte_eal/windows/include/netinet/in.h
> +++ b/lib/librte_eal/windows/include/netinet/in.h
> @@ -24,6 +24,7 @@
>  #define IPPROTO_NONE      59
>  #define IPPROTO_DSTOPTS   60
>  #define IPPROTO_SCTP     132
> +#define IPPROTO_RAW      255
> 
>  #define INET6_ADDRSTRLEN 46
> 

This patch can be dropped once Dmitry's patch removing POSIX symbols [1] will be merged.

[1] - http://patchwork.dpdk.org/project/dpdk/patch/20210407222249.6729-5-dmitry.kozliuk@gmail.com/

> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 5/6] app/testpmd: add rte_mem_lockall in librte_eal
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 5/6] app/testpmd: add rte_mem_lockall in librte_eal Jie Zhou
@ 2021-04-13 18:50       ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-13 18:50 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

> Subject: [dpdk-dev] [PATCH v3 5/6] app/testpmd: add rte_mem_lockall in
> librte_eal
> 
> External email: Use caution opening links or attachments
> 
> 
> In order to replace POSIX mman APIs in testpmd, add rte_mem_lockall.
> - On Unix, it is a wrapper of mlockall
> - On Windows, it is just a stub
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/librte_eal/include/rte_eal_paging.h | 20 ++++++++++++++++++++
>  lib/librte_eal/unix/eal_unix_memory.c   | 13 +++++++++++++
>  lib/librte_eal/version.map              |  1 +
>  lib/librte_eal/windows/eal_memory.c     | 10 ++++++++++
>  4 files changed, 44 insertions(+)
> 
> diff --git a/lib/librte_eal/include/rte_eal_paging.h
> b/lib/librte_eal/include/rte_eal_paging.h
> index ed98e70e9..959c2e135 100644
> --- a/lib/librte_eal/include/rte_eal_paging.h
> +++ b/lib/librte_eal/include/rte_eal_paging.h
> @@ -37,6 +37,14 @@ enum rte_map_flags {
>         RTE_MAP_FORCE_ADDRESS = 1 << 3
>  };
> 
> +/** Flags for memory lockall. */
> +enum rte_mem_lockall_flags {
> +       /** Lock all pages currently mapped into process's address space. */
> +       RTE_MCL_CURRENT = 1 << 0,
> +       /** Lock all pages mapped into process's address space in the future.*/
> +       RTE_MCL_FUTURE = 1 << 1
> +};
> +
>  /**
>   * Map a portion of an opened file or the page file into memory.
>   *
> @@ -96,3 +104,15 @@ rte_mem_page_size(void);  __rte_internal  int
> rte_mem_lock(const void *virt, size_t size);
> +
> +/**
> + * locks all pages mapped into the address space of the calling process.
> + *
> + * @param flags
> + *  Memory lockall flags, a combination of rte_mem_lockall_flags.
> + * @return
> + *   0 on success, negative on error.
> + */
> +__rte_internal
> +int
> +rte_mem_lockall(int flags);
> diff --git a/lib/librte_eal/unix/eal_unix_memory.c
> b/lib/librte_eal/unix/eal_unix_memory.c
> index ec7156df9..90e0c547a 100644
> --- a/lib/librte_eal/unix/eal_unix_memory.c
> +++ b/lib/librte_eal/unix/eal_unix_memory.c
> @@ -150,3 +150,16 @@ rte_mem_lock(const void *virt, size_t size)
>                 rte_errno = errno;
>         return ret;
>  }
> +
> +int
> +rte_mem_lockall(int flags)
> +{
> +       int mlockall_flags = 0;
> +
> +       if (flags & RTE_MCL_CURRENT)
> +               mlockall_flags |= MCL_CURRENT;
> +       if (flags & RTE_MCL_FUTURE)
> +               mlockall_flags |= MCL_FUTURE;
> +
> +       return mlockall(mlockall_flags); }
> diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map index
> e7217ae28..8dd8333e5 100644
> --- a/lib/librte_eal/version.map
> +++ b/lib/librte_eal/version.map
> @@ -431,4 +431,5 @@ INTERNAL {
>         rte_mem_map;
>         rte_mem_page_size;
>         rte_mem_unmap;
> +       rte_mem_lockall;

Please keep alphabetical order.

>  };
> diff --git a/lib/librte_eal/windows/eal_memory.c
> b/lib/librte_eal/windows/eal_memory.c
> index 2cf5a5e64..4fe7e59a1 100644
> --- a/lib/librte_eal/windows/eal_memory.c
> +++ b/lib/librte_eal/windows/eal_memory.c
> @@ -715,3 +715,13 @@ rte_eal_hugepage_attach(void)
>         EAL_LOG_NOT_IMPLEMENTED();
>         return -1;
>  }
> +
> +int
> +rte_mem_lockall(int flags)
> +{
> +       RTE_SET_USED(flags);
> +
> +       EAL_LOG_NOT_IMPLEMENTED();
> +
> +       return -1;
> +}
> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows Jie Zhou
@ 2021-04-13 18:58       ` Tal Shnaiderman
  2021-04-13 22:07         ` Jie Zhou
  2021-04-13 20:10       ` Dmitry Kozlyuk
  1 sibling, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-13 18:58 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

> Subject: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on
> Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Jie Zhou <jizh@microsoft.com>
> 

I think this patch can be split further since it contains different topics, I would've split it at least to the following:

1) Resolve name collisions with Windows types.
2) Add clock_gettime_monotic for testpmd on Windows.
3) Replace unix specific functions and code to OS independent.
4) build testpmd. 

> This patch is to enable testpmd on windows. It mainly includes:
> - Disable unsupported Apps on Windows under app\ except testpmd
Patch 4
> - Resolve name collisions with Windows types
Patch 1
> - Add clock_gettime_monotic for testpmd on Windows
Patch 2
> - Make printf format work for both Linux and Windows
Patch 3
> - Replace htons with RTE_BE16
Patch 3
> - Replace inet_aton with inet_pton
Patch 3, also explain why this change is needed
> - Fix parse_fec_mode to return fec_capa to remove compilation warning
Patch 3, unless this is a real fix and needs its own patch.
> - Replace mman.h POSIX APIs with rte_mem_xxx APIs
Patch 3
> - Use OS independant rte_rand
Patch 3
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows Jie Zhou
  2021-04-13 18:58       ` Tal Shnaiderman
@ 2021-04-13 20:10       ` Dmitry Kozlyuk
  2021-04-13 22:22         ` Jie Zhou
  1 sibling, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-04-13 20:10 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

2021-04-13 10:19 (UTC-0700), Jie Zhou:
[...]
> diff --git a/app/meson.build b/app/meson.build
> index 50a53dbde..b40b04ca7 100644
> --- a/app/meson.build
> +++ b/app/meson.build
> @@ -1,10 +1,6 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017-2019 Intel Corporation
>  
> -if is_windows
> -	subdir_done()
> -endif
> -
>  apps = [
>  	'pdump',
>  	'proc-info',
> @@ -19,7 +15,11 @@ apps = [
>  	'test-pipeline',
>  	'test-pmd',
>  	'test-regex',
> -	'test-sad']
> +	'test-sad'
> +]
> +
> +# for BSD only
> +lib_execinfo = cc.find_library('execinfo', required: false)

Why is this needed?

> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index f44116b08..335ed534d 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -8,12 +8,14 @@
>  #include <stdio.h>
>  #include <stdint.h>
>  #include <string.h>
> +
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  #include <termios.h>
> +#endif

You seem to have missed my comment to v2, that #include <termios.h> line can
just be removed, because <cmdline_*.h> provide everything necessary.

[...]
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index fb7a3a8bd..9945adcf1 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -31,6 +31,12 @@
>  
>  #include "testpmd.h"
>  
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +#ifndef IPDEFTTL
> +#define IPDEFTTL 64
> +#endif
> +#endif
> +
>  /** Parser token indices. */
>  enum index {
>  	/* Special tokens. */

IPDEFTTL is used in some other apps and examples.
If you follow Tal's advice and base your work on "Do not expose POSIX
symbols" series, then please move this to <rte_os_shim.h>.

> diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
> index 7e9c7bdd6..02aea0255 100644
> --- a/app/test-pmd/meson.build
> +++ b/app/test-pmd/meson.build
> @@ -4,6 +4,10 @@
>  # override default name to drop the hyphen
>  name = 'testpmd'
>  cflags += '-Wno-deprecated-declarations'
> +
> +# Enable using internal APIs in testpmd
> +cflags += ['-DALLOW_INTERNAL_API']

Apps except unit tests should not use internal API, which is for DPDK
components only. See below about memory mapping API.

[...]
> @@ -688,13 +691,11 @@ alloc_mem(size_t memsz, size_t pgsz, bool huge)
>  	int flags;
>  
>  	/* allocate anonymous hugepages */
> -	flags = MAP_ANONYMOUS | MAP_PRIVATE;
> +	flags = RTE_MAP_ANONYMOUS | RTE_MAP_PRIVATE;
>  	if (huge)
>  		flags |= HUGE_FLAG | pagesz_flags(pgsz);

It is incorrect to mix RTE_ and POSIX flags.
I suggest leaving "extmem" part Unix-only for now an not change it.

[...]
> @@ -3824,8 +3827,8 @@ main(int argc, char** argv)
>  	latencystats_enabled = 0;
>  #endif
>  
> -	/* on FreeBSD, mlockall() is disabled by default */
> -#ifdef RTE_EXEC_ENV_FREEBSD
> +	/* on FreeBSD and Window, mlockall() is disabled by default */
> +#if (defined(RTE_EXEC_ENV_FREEBSD) || defined (RTE_EXEC_ENV_WINDOWS))
>  	do_mlockall = 0;
>  #else
>  	do_mlockall = 1;

Redundant braces and a typo: "Window".

[...]
> @@ -3971,10 +3978,11 @@ main(int argc, char** argv)
>  			return 1;
>  	}
>  
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  	ret = rte_eal_cleanup();
>  	if (ret != 0)
>  		rte_exit(EXIT_FAILURE,
>  			 "EAL cleanup failed: %s\n", strerror(-ret));
> -
> +#endif

You seem to have missed my comment on v2 that bypassing cleanup is no longer
required after b2f24588b5 ("mem: fix cleanup when multi-process is disabled").

> diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
> index 60a623d4c..095f5f13b 100644
> --- a/lib/librte_eal/windows/include/rte_os.h
> +++ b/lib/librte_eal/windows/include/rte_os.h
> @@ -24,6 +24,14 @@ extern "C" {
>  #define PATH_MAX _MAX_PATH
>  #endif
>  
> +#define strcasecmp _stricmp
> +#define open _open
> +#define read _read
> +
> +#ifndef S_ISREG
> +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
> +#endif
> +
>  #ifndef sleep
>  #define sleep(x) Sleep(1000 * (x))
>  #endif

This duplicates patch 3/6, doesn't it?

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 4/6] app/testpmd: add device event stubs on Windows
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 4/6] app/testpmd: add device event stubs on Windows Jie Zhou
@ 2021-04-13 20:10       ` Dmitry Kozlyuk
  2021-04-13 22:08         ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-04-13 20:10 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Commit topic is incorrect, suggesting "eal/windows: add device event stubs".

2021-04-13 10:19 (UTC-0700), Jie Zhou:
> Add hot_plug related device event stubs in eal_dev.c on Windows.
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/librte_eal/windows/eal_dev.c   | 35 ++++++++++++++++++++++++++++++
>  lib/librte_eal/windows/meson.build |  1 +
>  2 files changed, 36 insertions(+)
>  create mode 100644 lib/librte_eal/windows/eal_dev.c
> 
> diff --git a/lib/librte_eal/windows/eal_dev.c b/lib/librte_eal/windows/eal_dev.c
> new file mode 100644
> index 000000000..4c51d07df
> --- /dev/null
> +++ b/lib/librte_eal/windows/eal_dev.c
> @@ -0,0 +1,35 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2018 Intel Corporation

2018 Intel?

> + */
> +
> +#include <rte_log.h>
> +#include <rte_compat.h>

Not needed.

[...]

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows
  2021-04-13 18:58       ` Tal Shnaiderman
@ 2021-04-13 22:07         ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 22:07 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

On Tue, Apr 13, 2021 at 06:58:16PM +0000, Tal Shnaiderman wrote:
> > Subject: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on
> > Windows
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> > From: Jie Zhou <jizh@microsoft.com>
> > 
> 
> I think this patch can be split further since it contains different topics, I would've split it at least to the following:
> 
> 1) Resolve name collisions with Windows types.
> 2) Add clock_gettime_monotic for testpmd on Windows.
> 3) Replace unix specific functions and code to OS independent.
> 4) build testpmd. 
> 
> > This patch is to enable testpmd on windows. It mainly includes:
> > - Disable unsupported Apps on Windows under app\ except testpmd
> Patch 4
> > - Resolve name collisions with Windows types
> Patch 1
> > - Add clock_gettime_monotic for testpmd on Windows
> Patch 2
> > - Make printf format work for both Linux and Windows
> Patch 3
> > - Replace htons with RTE_BE16
> Patch 3
> > - Replace inet_aton with inet_pton
> Patch 3, also explain why this change is needed
> > - Fix parse_fec_mode to return fec_capa to remove compilation warning
> Patch 3, unless this is a real fix and needs its own patch.
> > - Replace mman.h POSIX APIs with rte_mem_xxx APIs
> Patch 3
> > - Use OS independant rte_rand
> Patch 3
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---

Thanks Tal. Will have more granular patches in V4.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 4/6] app/testpmd: add device event stubs on Windows
  2021-04-13 20:10       ` Dmitry Kozlyuk
@ 2021-04-13 22:08         ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 22:08 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

On Tue, Apr 13, 2021 at 11:10:38PM +0300, Dmitry Kozlyuk wrote:
> Commit topic is incorrect, suggesting "eal/windows: add device event stubs".
> 
> 2021-04-13 10:19 (UTC-0700), Jie Zhou:
> > Add hot_plug related device event stubs in eal_dev.c on Windows.
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  lib/librte_eal/windows/eal_dev.c   | 35 ++++++++++++++++++++++++++++++
> >  lib/librte_eal/windows/meson.build |  1 +
> >  2 files changed, 36 insertions(+)
> >  create mode 100644 lib/librte_eal/windows/eal_dev.c
> > 
> > diff --git a/lib/librte_eal/windows/eal_dev.c b/lib/librte_eal/windows/eal_dev.c
> > new file mode 100644
> > index 000000000..4c51d07df
> > --- /dev/null
> > +++ b/lib/librte_eal/windows/eal_dev.c
> > @@ -0,0 +1,35 @@
> > +/* SPDX-License-Identifier: BSD-3-Clause
> > + * Copyright(c) 2018 Intel Corporation
> 
> 2018 Intel?
> 
> > + */
> > +
> > +#include <rte_log.h>
> > +#include <rte_compat.h>
> 
> Not needed.
> 
> [...]

Thanks Dmitry. Will fix all in V4.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows
  2021-04-13 20:10       ` Dmitry Kozlyuk
@ 2021-04-13 22:22         ` Jie Zhou
  2021-04-14 17:16           ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-13 22:22 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

On Tue, Apr 13, 2021 at 11:10:00PM +0300, Dmitry Kozlyuk wrote:
> 2021-04-13 10:19 (UTC-0700), Jie Zhou:
> [...]
> > diff --git a/app/meson.build b/app/meson.build
> > index 50a53dbde..b40b04ca7 100644
> > --- a/app/meson.build
> > +++ b/app/meson.build
> > @@ -1,10 +1,6 @@
> >  # SPDX-License-Identifier: BSD-3-Clause
> >  # Copyright(c) 2017-2019 Intel Corporation
> >  
> > -if is_windows
> > -	subdir_done()
> > -endif
> > -
> >  apps = [
> >  	'pdump',
> >  	'proc-info',
> > @@ -19,7 +15,11 @@ apps = [
> >  	'test-pipeline',
> >  	'test-pmd',
> >  	'test-regex',
> > -	'test-sad']
> > +	'test-sad'
> > +]
> > +
> > +# for BSD only
> > +lib_execinfo = cc.find_library('execinfo', required: false)
> 
> Why is this needed?

Seems the internal fork I worked on is out of sync with the upstream main. Did not add these but just being there. Will remove it.

> 
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> > index f44116b08..335ed534d 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -8,12 +8,14 @@
> >  #include <stdio.h>
> >  #include <stdint.h>
> >  #include <string.h>
> > +
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  #include <termios.h>
> > +#endif
> 
> You seem to have missed my comment to v2, that #include <termios.h> line can
> just be removed, because <cmdline_*.h> provide everything necessary.

Yeah, sorry, seems missed some of your comments. Thanks Dmitry. Will fix in V4.

> 
> [...]
> > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> > index fb7a3a8bd..9945adcf1 100644
> > --- a/app/test-pmd/cmdline_flow.c
> > +++ b/app/test-pmd/cmdline_flow.c
> > @@ -31,6 +31,12 @@
> >  
> >  #include "testpmd.h"
> >  
> > +#ifdef RTE_EXEC_ENV_WINDOWS
> > +#ifndef IPDEFTTL
> > +#define IPDEFTTL 64
> > +#endif
> > +#endif
> > +
> >  /** Parser token indices. */
> >  enum index {
> >  	/* Special tokens. */
> 
> IPDEFTTL is used in some other apps and examples.
> If you follow Tal's advice and base your work on "Do not expose POSIX
> symbols" series, then please move this to <rte_os_shim.h>.

I applied "eal/windows:do not expose POSIX symbols" per your and Tal's advices, but hit error LNK2019: unresolved external symbol strdup reference in function log_save_level". I am using clang version 10.0.0.


> 
> > diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
> > index 7e9c7bdd6..02aea0255 100644
> > --- a/app/test-pmd/meson.build
> > +++ b/app/test-pmd/meson.build
> > @@ -4,6 +4,10 @@
> >  # override default name to drop the hyphen
> >  name = 'testpmd'
> >  cflags += '-Wno-deprecated-declarations'
> > +
> > +# Enable using internal APIs in testpmd
> > +cflags += ['-DALLOW_INTERNAL_API']
> 
> Apps except unit tests should not use internal API, which is for DPDK
> components only. See below about memory mapping API.

Good to know. Thanks.

> 
> [...]
> > @@ -688,13 +691,11 @@ alloc_mem(size_t memsz, size_t pgsz, bool huge)
> >  	int flags;
> >  
> >  	/* allocate anonymous hugepages */
> > -	flags = MAP_ANONYMOUS | MAP_PRIVATE;
> > +	flags = RTE_MAP_ANONYMOUS | RTE_MAP_PRIVATE;
> >  	if (huge)
> >  		flags |= HUGE_FLAG | pagesz_flags(pgsz);
> 
> It is incorrect to mix RTE_ and POSIX flags.
> I suggest leaving "extmem" part Unix-only for now an not change it.

Thanks for the advice. I will exclude extmem part on Windows then. In this case, seems Patch 5/6 is unnecessary any more.


> 


> [...]
> > @@ -3824,8 +3827,8 @@ main(int argc, char** argv)
> >  	latencystats_enabled = 0;
> >  #endif
> >  
> > -	/* on FreeBSD, mlockall() is disabled by default */
> > -#ifdef RTE_EXEC_ENV_FREEBSD
> > +	/* on FreeBSD and Window, mlockall() is disabled by default */
> > +#if (defined(RTE_EXEC_ENV_FREEBSD) || defined (RTE_EXEC_ENV_WINDOWS))
> >  	do_mlockall = 0;
> >  #else
> >  	do_mlockall = 1;
> 
> Redundant braces and a typo: "Window".

Will fix in V4.

> 
> [...]
> > @@ -3971,10 +3978,11 @@ main(int argc, char** argv)
> >  			return 1;
> >  	}
> >  
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  	ret = rte_eal_cleanup();
> >  	if (ret != 0)
> >  		rte_exit(EXIT_FAILURE,
> >  			 "EAL cleanup failed: %s\n", strerror(-ret));
> > -
> > +#endif
> 
> You seem to have missed my comment on v2 that bypassing cleanup is no longer
> required after b2f24588b5 ("mem: fix cleanup when multi-process is disabled").

Missed this one as well. Will remove the bypassing cleanup in V4. Thanks.

> 
> > diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
> > index 60a623d4c..095f5f13b 100644
> > --- a/lib/librte_eal/windows/include/rte_os.h
> > +++ b/lib/librte_eal/windows/include/rte_os.h
> > @@ -24,6 +24,14 @@ extern "C" {
> >  #define PATH_MAX _MAX_PATH
> >  #endif
> >  
> > +#define strcasecmp _stricmp
> > +#define open _open
> > +#define read _read
> > +
> > +#ifndef S_ISREG
> > +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
> > +#endif
> > +
> >  #ifndef sleep
> >  #define sleep(x) Sleep(1000 * (x))
> >  #endif
> 
> This duplicates patch 3/6, doesn't it?

Yeah, seems messed this up at spliting the patch. Will fix in V4.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows
  2021-04-13 22:22         ` Jie Zhou
@ 2021-04-14 17:16           ` Jie Zhou
  2021-04-14 17:45             ` Dmitry Kozlyuk
  0 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-14 17:16 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

On Tue, Apr 13, 2021 at 03:22:57PM -0700, Jie Zhou wrote:
> On Tue, Apr 13, 2021 at 11:10:00PM +0300, Dmitry Kozlyuk wrote:
> > 2021-04-13 10:19 (UTC-0700), Jie Zhou:
> > [...]
> > > diff --git a/app/meson.build b/app/meson.build
> > > index 50a53dbde..b40b04ca7 100644
> > > --- a/app/meson.build
> > > +++ b/app/meson.build
> > > @@ -1,10 +1,6 @@
> > >  # SPDX-License-Identifier: BSD-3-Clause
> > >  # Copyright(c) 2017-2019 Intel Corporation
> > >  
> > > -if is_windows
> > > -	subdir_done()
> > > -endif
> > > -
> > >  apps = [
> > >  	'pdump',
> > >  	'proc-info',
> > > @@ -19,7 +15,11 @@ apps = [
> > >  	'test-pipeline',
> > >  	'test-pmd',
> > >  	'test-regex',
> > > -	'test-sad']
> > > +	'test-sad'
> > > +]
> > > +
> > > +# for BSD only
> > > +lib_execinfo = cc.find_library('execinfo', required: false)
> > 
> > Why is this needed?
> 
> Seems the internal fork I worked on is out of sync with the upstream main. Did not add these but just being there. Will remove it.
> 
> > 
> > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> > > index f44116b08..335ed534d 100644
> > > --- a/app/test-pmd/cmdline.c
> > > +++ b/app/test-pmd/cmdline.c
> > > @@ -8,12 +8,14 @@
> > >  #include <stdio.h>
> > >  #include <stdint.h>
> > >  #include <string.h>
> > > +
> > > +#ifndef RTE_EXEC_ENV_WINDOWS
> > >  #include <termios.h>
> > > +#endif
> > 
> > You seem to have missed my comment to v2, that #include <termios.h> line can
> > just be removed, because <cmdline_*.h> provide everything necessary.
> 
> Yeah, sorry, seems missed some of your comments. Thanks Dmitry. Will fix in V4.
> 
> > 
> > [...]
> > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> > > index fb7a3a8bd..9945adcf1 100644
> > > --- a/app/test-pmd/cmdline_flow.c
> > > +++ b/app/test-pmd/cmdline_flow.c
> > > @@ -31,6 +31,12 @@
> > >  
> > >  #include "testpmd.h"
> > >  
> > > +#ifdef RTE_EXEC_ENV_WINDOWS
> > > +#ifndef IPDEFTTL
> > > +#define IPDEFTTL 64
> > > +#endif
> > > +#endif
> > > +
> > >  /** Parser token indices. */
> > >  enum index {
> > >  	/* Special tokens. */
> > 
> > IPDEFTTL is used in some other apps and examples.
> > If you follow Tal's advice and base your work on "Do not expose POSIX
> > symbols" series, then please move this to <rte_os_shim.h>.
> 
> I applied "eal/windows:do not expose POSIX symbols" per your and Tal's advices, but hit error LNK2019: unresolved external symbol strdup reference in function log_save_level". I am using clang version 10.0.0.

[Update] Seems the problem is at applying the patch series, even though it showed all sucessfully applied, but somehow in eal_common_log.c the include of <rte_os_shim.h> was not added. After add include rte_os_shim.h, build completes.

> 
> 
> > 
> > > diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
> > > index 7e9c7bdd6..02aea0255 100644
> > > --- a/app/test-pmd/meson.build
> > > +++ b/app/test-pmd/meson.build
> > > @@ -4,6 +4,10 @@
> > >  # override default name to drop the hyphen
> > >  name = 'testpmd'
> > >  cflags += '-Wno-deprecated-declarations'
> > > +
> > > +# Enable using internal APIs in testpmd
> > > +cflags += ['-DALLOW_INTERNAL_API']
> > 
> > Apps except unit tests should not use internal API, which is for DPDK
> > components only. See below about memory mapping API.
> 
> Good to know. Thanks.
> 
> > 
> > [...]
> > > @@ -688,13 +691,11 @@ alloc_mem(size_t memsz, size_t pgsz, bool huge)
> > >  	int flags;
> > >  
> > >  	/* allocate anonymous hugepages */
> > > -	flags = MAP_ANONYMOUS | MAP_PRIVATE;
> > > +	flags = RTE_MAP_ANONYMOUS | RTE_MAP_PRIVATE;
> > >  	if (huge)
> > >  		flags |= HUGE_FLAG | pagesz_flags(pgsz);
> > 
> > It is incorrect to mix RTE_ and POSIX flags.
> > I suggest leaving "extmem" part Unix-only for now an not change it.
> 
> Thanks for the advice. I will exclude extmem part on Windows then. In this case, seems Patch 5/6 is unnecessary any more.
> 
> 
> > 
> 
> 
> > [...]
> > > @@ -3824,8 +3827,8 @@ main(int argc, char** argv)
> > >  	latencystats_enabled = 0;
> > >  #endif
> > >  
> > > -	/* on FreeBSD, mlockall() is disabled by default */
> > > -#ifdef RTE_EXEC_ENV_FREEBSD
> > > +	/* on FreeBSD and Window, mlockall() is disabled by default */
> > > +#if (defined(RTE_EXEC_ENV_FREEBSD) || defined (RTE_EXEC_ENV_WINDOWS))
> > >  	do_mlockall = 0;
> > >  #else
> > >  	do_mlockall = 1;
> > 
> > Redundant braces and a typo: "Window".
> 
> Will fix in V4.
> 
> > 
> > [...]
> > > @@ -3971,10 +3978,11 @@ main(int argc, char** argv)
> > >  			return 1;
> > >  	}
> > >  
> > > +#ifndef RTE_EXEC_ENV_WINDOWS
> > >  	ret = rte_eal_cleanup();
> > >  	if (ret != 0)
> > >  		rte_exit(EXIT_FAILURE,
> > >  			 "EAL cleanup failed: %s\n", strerror(-ret));
> > > -
> > > +#endif
> > 
> > You seem to have missed my comment on v2 that bypassing cleanup is no longer
> > required after b2f24588b5 ("mem: fix cleanup when multi-process is disabled").
> 
> Missed this one as well. Will remove the bypassing cleanup in V4. Thanks.
> 
> > 
> > > diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
> > > index 60a623d4c..095f5f13b 100644
> > > --- a/lib/librte_eal/windows/include/rte_os.h
> > > +++ b/lib/librte_eal/windows/include/rte_os.h
> > > @@ -24,6 +24,14 @@ extern "C" {
> > >  #define PATH_MAX _MAX_PATH
> > >  #endif
> > >  
> > > +#define strcasecmp _stricmp
> > > +#define open _open
> > > +#define read _read
> > > +
> > > +#ifndef S_ISREG
> > > +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
> > > +#endif
> > > +
> > >  #ifndef sleep
> > >  #define sleep(x) Sleep(1000 * (x))
> > >  #endif
> > 
> > This duplicates patch 3/6, doesn't it?
> 
> Yeah, seems messed this up at spliting the patch. Will fix in V4.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows
  2021-04-14 17:16           ` Jie Zhou
@ 2021-04-14 17:45             ` Dmitry Kozlyuk
  2021-04-14 18:25               ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-04-14 17:45 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

2021-04-14 10:16 (UTC-0700), Jie Zhou:
> On Tue, Apr 13, 2021 at 03:22:57PM -0700, Jie Zhou wrote:
> > On Tue, Apr 13, 2021 at 11:10:00PM +0300, Dmitry Kozlyuk wrote:  
> > > 2021-04-13 10:19 (UTC-0700), Jie Zhou:
> > > [...]  
> > > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> > > > index fb7a3a8bd..9945adcf1 100644
> > > > --- a/app/test-pmd/cmdline_flow.c
> > > > +++ b/app/test-pmd/cmdline_flow.c
> > > > @@ -31,6 +31,12 @@
> > > >  
> > > >  #include "testpmd.h"
> > > >  
> > > > +#ifdef RTE_EXEC_ENV_WINDOWS
> > > > +#ifndef IPDEFTTL
> > > > +#define IPDEFTTL 64
> > > > +#endif
> > > > +#endif
> > > > +
> > > >  /** Parser token indices. */
> > > >  enum index {
> > > >  	/* Special tokens. */  
> > > 
> > > IPDEFTTL is used in some other apps and examples.
> > > If you follow Tal's advice and base your work on "Do not expose POSIX
> > > symbols" series, then please move this to <rte_os_shim.h>.  
> > 
> > I applied "eal/windows:do not expose POSIX symbols" per your and Tal's advices, but hit error LNK2019: unresolved external symbol strdup reference in function log_save_level". I am using clang version 10.0.0.  
> 
> [Update] Seems the problem is at applying the patch series, even though it showed all sucessfully applied, but somehow in eal_common_log.c the include of <rte_os_shim.h> was not added. After add include rte_os_shim.h, build completes.

Are you applying v9? It includes this exact fix.


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows
  2021-04-14 17:45             ` Dmitry Kozlyuk
@ 2021-04-14 18:25               ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-14 18:25 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

On Wed, Apr 14, 2021 at 08:45:31PM +0300, Dmitry Kozlyuk wrote:
> 2021-04-14 10:16 (UTC-0700), Jie Zhou:
> > On Tue, Apr 13, 2021 at 03:22:57PM -0700, Jie Zhou wrote:
> > > On Tue, Apr 13, 2021 at 11:10:00PM +0300, Dmitry Kozlyuk wrote:  
> > > > 2021-04-13 10:19 (UTC-0700), Jie Zhou:
> > > > [...]  
> > > > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> > > > > index fb7a3a8bd..9945adcf1 100644
> > > > > --- a/app/test-pmd/cmdline_flow.c
> > > > > +++ b/app/test-pmd/cmdline_flow.c
> > > > > @@ -31,6 +31,12 @@
> > > > >  
> > > > >  #include "testpmd.h"
> > > > >  
> > > > > +#ifdef RTE_EXEC_ENV_WINDOWS
> > > > > +#ifndef IPDEFTTL
> > > > > +#define IPDEFTTL 64
> > > > > +#endif
> > > > > +#endif
> > > > > +
> > > > >  /** Parser token indices. */
> > > > >  enum index {
> > > > >  	/* Special tokens. */  
> > > > 
> > > > IPDEFTTL is used in some other apps and examples.
> > > > If you follow Tal's advice and base your work on "Do not expose POSIX
> > > > symbols" series, then please move this to <rte_os_shim.h>.  
> > > 
> > > I applied "eal/windows:do not expose POSIX symbols" per your and Tal's advices, but hit error LNK2019: unresolved external symbol strdup reference in function log_save_level". I am using clang version 10.0.0.  
> > 
> > [Update] Seems the problem is at applying the patch series, even though it showed all sucessfully applied, but somehow in eal_common_log.c the include of <rte_os_shim.h> was not added. After add include rte_os_shim.h, build completes.
> 
> Are you applying v9? It includes this exact fix.

Thanks. Applied V8 by mistake which has no this change. Now has no issue.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable testpmd on Windows
  2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
                       ` (5 preceding siblings ...)
  2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows Jie Zhou
@ 2021-04-16 17:34     ` Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 1/9] lib: build libraries that testpmd depends on Jie Zhou
                         ` (8 more replies)
  6 siblings, 9 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime_monotic in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---


Jie Zhou (9):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  app/testpmd: resolve name collisions
  app/testpmd: add clock_gettime_monotonic
  app/testpmd: fix parse_fec_mode return type
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: enable building testpmd on Windows

 app/meson.build                              |   4 -
 app/pdump/meson.build                        |   6 +
 app/proc-info/meson.build                    |   6 +
 app/test-acl/meson.build                     |   6 +
 app/test-bbdev/meson.build                   |   6 +
 app/test-cmdline/meson.build                 |   6 +
 app/test-compress-perf/meson.build           |   6 +
 app/test-crypto-perf/meson.build             |   6 +
 app/test-eventdev/meson.build                |   6 +
 app/test-fib/meson.build                     |   6 +
 app/test-flow-perf/meson.build               |   6 +
 app/test-pipeline/meson.build                |   6 +
 app/test-pmd/cmdline.c                       |  12 +-
 app/test-pmd/cmdline_flow.c                  | 496 +++++++++----------
 app/test-pmd/config.c                        |  37 +-
 app/test-pmd/csumonly.c                      |   2 +-
 app/test-pmd/icmpecho.c                      |   4 +-
 app/test-pmd/ieee1588fwd.c                   |   8 +-
 app/test-pmd/parameters.c                    |  11 +-
 app/test-pmd/testpmd.c                       |  21 +-
 app/test-pmd/testpmd.h                       |   5 +-
 app/test-regex/meson.build                   |   6 +
 app/test-sad/meson.build                     |   6 +
 app/test/meson.build                         |   6 +
 lib/librte_eal/windows/eal_dev.c             |  33 ++
 lib/librte_eal/windows/include/rte_os_shim.h |   9 +
 lib/librte_eal/windows/meson.build           |   1 +
 lib/meson.build                              |   7 +-
 28 files changed, 455 insertions(+), 279 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 1/9] lib: build libraries that testpmd depends on
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
@ 2021-04-16 17:34       ` Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 2/9] eal/windows: add necessary macros Jie Zhou
                         ` (7 subsequent siblings)
  8 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Enable building libraries that testpmd depends on

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/meson.build b/lib/meson.build
index 4eed83e57..3483570ac 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -44,8 +44,13 @@ if is_windows
 		'rcu',
 		'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci',
 		'cmdline',
+		'metrics',
 		'hash',
-		'cfgfile',
+		'timer',
+		'bitratestats', 'cfgfile',
+		'gro', 'gso',
+		'latencystats',
+		'pdump',
 	] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 2/9] eal/windows: add necessary macros
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 1/9] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-04-16 17:34       ` Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 3/9] eal/windows: add device event stubs Jie Zhou
                         ` (6 subsequent siblings)
  8 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_eal/windows/include/rte_os_shim.h b/lib/librte_eal/windows/include/rte_os_shim.h
index f40fb62d1..d0bb9e3b8 100644
--- a/lib/librte_eal/windows/include/rte_os_shim.h
+++ b/lib/librte_eal/windows/include/rte_os_shim.h
@@ -17,6 +17,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -33,4 +34,12 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 3/9] eal/windows: add device event stubs
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 1/9] lib: build libraries that testpmd depends on Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 2/9] eal/windows: add necessary macros Jie Zhou
@ 2021-04-16 17:34       ` Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 4/9] app/testpmd: resolve name collisions Jie Zhou
                         ` (5 subsequent siblings)
  8 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/eal_dev.c   | 33 ++++++++++++++++++++++++++++++
 lib/librte_eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_dev.c

diff --git a/lib/librte_eal/windows/eal_dev.c b/lib/librte_eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/librte_eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 42ff5c2d5..9bd395a37 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
 	'eal.c',
 	'eal_alarm.c',
 	'eal_debug.c',
+	'eal_dev.c',
 	'eal_file.c',
 	'eal_hugepages.c',
 	'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 4/9] app/testpmd: resolve name collisions
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
                         ` (2 preceding siblings ...)
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 3/9] eal/windows: add device event stubs Jie Zhou
@ 2021-04-16 17:34       ` Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 5/9] app/testpmd: add clock_gettime_monotonic Jie Zhou
                         ` (4 subsequent siblings)
  8 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline_flow.c | 494 ++++++++++++++++++------------------
 1 file changed, 247 insertions(+), 247 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index fb7a3a8bd..bbedd58c4 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,21 +40,21 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	SHARED_ACTION_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_SHARED_ACTION_ID,
 
 	/* Top-level command. */
 	SET,
@@ -100,13 +100,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Shared action arguments */
 	SHARED_ACTION_CREATE,
@@ -125,7 +125,7 @@ enum index {
 	SHARED_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -853,14 +853,14 @@ static const enum index next_sa_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -871,7 +871,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1841,104 +1841,104 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
-		.type = "HEX",
+		.type = "COMMON_HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[SHARED_ACTION_ID] = {
+	[COMMON_SHARED_ACTION_ID] = {
 		.name = "{shared_action_id}",
 		.type = "SHARED_ACTION_ID",
 		.help = "shared action id",
@@ -1969,7 +1969,7 @@ static const struct token token_list[] = {
 		.name = "shared_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage shared actions",
-		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_sa,
 	},
@@ -1984,7 +1984,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update shared action",
 		.next = NEXT(NEXT_ENTRY(SHARED_ACTION_SPEC),
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_sa,
 	},
@@ -1998,42 +1998,42 @@ static const struct token token_list[] = {
 	[SHARED_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query shared action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(SHARED_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.sa.action_id)),
 		.call = parse_sa,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump all flow rules to file",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
@@ -2042,8 +2042,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2052,22 +2052,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2084,14 +2084,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2099,21 +2099,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2121,7 +2121,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2137,7 +2137,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2148,54 +2148,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2262,7 +2262,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2282,7 +2282,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2296,7 +2296,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2310,7 +2310,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2323,7 +2323,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2336,34 +2336,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2382,25 +2382,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2414,41 +2414,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2462,42 +2462,42 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2511,7 +2511,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2519,7 +2519,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2527,35 +2527,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2569,28 +2569,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2604,14 +2604,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2625,21 +2625,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2653,28 +2653,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2688,7 +2688,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2701,7 +2701,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2716,7 +2716,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2729,7 +2729,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2737,7 +2737,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2745,7 +2745,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2760,7 +2760,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2770,14 +2770,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2785,7 +2785,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2793,7 +2793,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2809,7 +2809,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2823,20 +2823,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2863,20 +2863,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -2907,7 +2907,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -2915,7 +2915,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -2923,7 +2923,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -2931,7 +2931,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -2947,7 +2947,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -2962,7 +2962,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -2970,7 +2970,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "Fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -2985,14 +2985,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3007,7 +3007,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3023,7 +3023,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3040,7 +3040,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3058,7 +3058,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3076,7 +3076,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3091,7 +3091,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3105,7 +3105,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3119,14 +3119,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3156,7 +3156,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3173,14 +3173,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3194,13 +3194,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3215,7 +3215,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3229,7 +3229,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3243,7 +3243,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3256,14 +3256,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3296,7 +3296,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3312,7 +3312,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3328,7 +3328,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3344,21 +3344,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3366,7 +3366,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3415,7 +3415,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3429,7 +3429,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3451,7 +3451,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3473,14 +3473,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3524,7 +3524,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3545,7 +3545,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3560,7 +3560,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3598,7 +3598,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3606,7 +3606,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3621,7 +3621,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3629,7 +3629,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3645,7 +3645,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3653,7 +3653,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3668,7 +3668,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3684,7 +3684,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3708,7 +3708,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3753,7 +3753,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3771,7 +3771,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3806,7 +3806,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3824,7 +3824,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -3932,7 +3932,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3949,7 +3949,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3966,7 +3966,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -3983,7 +3983,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4000,7 +4000,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4017,7 +4017,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4048,7 +4048,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4064,7 +4064,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4080,7 +4080,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4095,7 +4095,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4109,7 +4109,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4123,7 +4123,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4137,7 +4137,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4220,7 +4220,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4228,7 +4228,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4249,7 +4249,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4257,7 +4257,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4266,7 +4266,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4275,7 +4275,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4315,7 +4315,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4348,14 +4348,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4363,7 +4363,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4379,7 +4379,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4387,7 +4387,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4403,7 +4403,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4419,7 +4419,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4437,7 +4437,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4465,7 +4465,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4476,7 +4476,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to destroy",
 		.next = NEXT(next_sa_destroy_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.sa_destroy.action_id)),
 		.call = parse_sa_destroy,
@@ -4486,7 +4486,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to create",
 		.next = NEXT(next_sa_create_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_SHARED] = {
@@ -4839,34 +4839,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -4947,7 +4947,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
                         ` (3 preceding siblings ...)
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 4/9] app/testpmd: resolve name collisions Jie Zhou
@ 2021-04-16 17:34       ` Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 6/9] app/testpmd: fix parse_fec_mode return type Jie Zhou
                         ` (3 subsequent siblings)
  8 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add clock_gettime_monotonic for testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ef0b9784d..018b75381 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -63,6 +63,12 @@
 
 #define NS_PER_SEC 1E9
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#define _clock_gettime_monotonic(cur_time) clock_gettime_monotonic(&cur_time);
+#else
+#define _clock_gettime_monotonic(cur_time) clock_gettime(CLOCK_TYPE_ID, &cur_time);
+#endif
+
 static char *flowtype_to_str(uint16_t flow_type);
 
 static const struct {
@@ -170,6 +176,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 	printf("%s%s", name, buf);
 }
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+clock_gettime_monotonic(struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	if (QueryPerformanceFrequency(&pf) == 0)
+		return -1;
+
+	if (QueryPerformanceCounter(&pc) == 0)
+		return -1;
+
+	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+	tp->tv_sec = nsec / NS_PER_SEC;
+	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+
+	return 0;
+}
+#endif
+
 void
 nic_stats_display(portid_t port_id)
 {
@@ -186,6 +213,8 @@ nic_stats_display(portid_t port_id)
 
 	static const char *nic_stats_border = "########################";
 
+	int ret;
+
 	if (port_id_is_invalid(port_id, ENABLED_WARN)) {
 		print_valid_ports();
 		return;
@@ -202,7 +231,9 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
-	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
+
+	ret = _clock_gettime_monotonic(cur_time);
+	if (ret == 0) {
 		uint64_t ns;
 
 		ns = cur_time.tv_sec * NS_PER_SEC;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 6/9] app/testpmd: fix parse_fec_mode return type
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
                         ` (4 preceding siblings ...)
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 5/9] app/testpmd: add clock_gettime_monotonic Jie Zhou
@ 2021-04-16 17:34       ` Jie Zhou
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 7/9] app/testpmd: replace POSIX specific code Jie Zhou
                         ` (2 subsequent siblings)
  8 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Fix parse_fec_mode to return fec_capa instead of mode

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f44116b08..3c3d79d77 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16458,17 +16458,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 018b75381..de17fd574 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3435,13 +3435,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a87ccb0f0..9c62ed69d 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 7/9] app/testpmd: replace POSIX specific code
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
                         ` (5 preceding siblings ...)
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 6/9] app/testpmd: fix parse_fec_mode return type Jie Zhou
@ 2021-04-16 17:34       ` Jie Zhou
  2021-04-16 17:35       ` [dpdk-dev] [PATCH v4 8/9] app/testpmd: fix headers inclusion Jie Zhou
  2021-04-16 17:35       ` [dpdk-dev] [PATCH v4 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
  8 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3c3d79d77..be0107e18 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3502,7 +3501,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 96d2e0fce..deea3f758 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,6 +1068,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3054,6 +3067,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3061,6 +3075,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3761,7 +3776,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3836,10 +3853,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3960,7 +3979,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(1000000);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 9c62ed69d..6a828583b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 8/9] app/testpmd: fix headers inclusion
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
                         ` (6 preceding siblings ...)
  2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 7/9] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-04-16 17:35       ` Jie Zhou
  2021-04-16 17:35       ` [dpdk-dev] [PATCH v4 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
  8 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:35 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index be0107e18..9eb731753 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index bbedd58c4..b577209fc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6a828583b..cd4ec3409 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v4 9/9] app/testpmd: enable building testpmd on Windows
  2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
                         ` (7 preceding siblings ...)
  2021-04-16 17:35       ` [dpdk-dev] [PATCH v4 8/9] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-04-16 17:35       ` Jie Zhou
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
  8 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:35 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 50a53dbde..8f9ece5f4 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-	subdir_done()
-endif
-
 apps = [
 	'pdump',
 	'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 6d50e0339..b4b767d89 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c',
 		'test_bbdev.c',
 		'test_bbdev_perf.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index a1a484da9..6ff3c179e 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('comp_perf_options_parse.c',
 		'main.c',
 		'comp_perf_test_verify.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 558c64878..eef7708e0 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('cperf_ops.c',
 		'cperf_options_parsing.c',
 		'cperf_test_common.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 9e588d9ec..5af31fbb0 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('evt_main.c',
 		'evt_options.c',
 		'evt_test.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 6eaf83b41..5d5d70f18 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'actions_gen.c',
 	'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index d5eddaba9..5e43d7d69 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'config.c',
 	'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 76eaaea45..5de5a6fae 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
 	subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable testpmd on Windows
  2021-04-16 17:35       ` [dpdk-dev] [PATCH v4 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-04-16 17:57         ` Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 1/9] lib: build libraries that testpmd depends on Jie Zhou
                             ` (9 more replies)
  0 siblings, 10 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime_monotic in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---

Jie Zhou (9):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  app/testpmd: resolve name collisions
  app/testpmd: add clock_gettime_monotonic
  app/testpmd: fix parse_fec_mode return type
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: enable building testpmd on Windows

 app/meson.build                              |   4 -
 app/pdump/meson.build                        |   6 +
 app/proc-info/meson.build                    |   6 +
 app/test-acl/meson.build                     |   6 +
 app/test-bbdev/meson.build                   |   6 +
 app/test-cmdline/meson.build                 |   6 +
 app/test-compress-perf/meson.build           |   6 +
 app/test-crypto-perf/meson.build             |   6 +
 app/test-eventdev/meson.build                |   6 +
 app/test-fib/meson.build                     |   6 +
 app/test-flow-perf/meson.build               |   6 +
 app/test-pipeline/meson.build                |   6 +
 app/test-pmd/cmdline.c                       |  12 +-
 app/test-pmd/cmdline_flow.c                  | 496 +++++++++----------
 app/test-pmd/config.c                        |  37 +-
 app/test-pmd/csumonly.c                      |   2 +-
 app/test-pmd/icmpecho.c                      |   4 +-
 app/test-pmd/ieee1588fwd.c                   |   8 +-
 app/test-pmd/parameters.c                    |  11 +-
 app/test-pmd/testpmd.c                       |  21 +-
 app/test-pmd/testpmd.h                       |   5 +-
 app/test-regex/meson.build                   |   6 +
 app/test-sad/meson.build                     |   6 +
 app/test/meson.build                         |   6 +
 lib/librte_eal/windows/eal_dev.c             |  33 ++
 lib/librte_eal/windows/include/rte_os_shim.h |   9 +
 lib/librte_eal/windows/meson.build           |   1 +
 lib/meson.build                              |   7 +-
 28 files changed, 455 insertions(+), 279 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 1/9] lib: build libraries that testpmd depends on
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 2/9] eal/windows: add necessary macros Jie Zhou
                             ` (8 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Enable building libraries that testpmd depends on

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/meson.build b/lib/meson.build
index 4eed83e57..3483570ac 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -44,8 +44,13 @@ if is_windows
 		'rcu',
 		'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci',
 		'cmdline',
+		'metrics',
 		'hash',
-		'cfgfile',
+		'timer',
+		'bitratestats', 'cfgfile',
+		'gro', 'gso',
+		'latencystats',
+		'pdump',
 	] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 2/9] eal/windows: add necessary macros
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 1/9] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 3/9] eal/windows: add device event stubs Jie Zhou
                             ` (7 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_eal/windows/include/rte_os_shim.h b/lib/librte_eal/windows/include/rte_os_shim.h
index f40fb62d1..d0bb9e3b8 100644
--- a/lib/librte_eal/windows/include/rte_os_shim.h
+++ b/lib/librte_eal/windows/include/rte_os_shim.h
@@ -17,6 +17,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -33,4 +34,12 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 3/9] eal/windows: add device event stubs
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 1/9] lib: build libraries that testpmd depends on Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 2/9] eal/windows: add necessary macros Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 4/9] app/testpmd: resolve name collisions Jie Zhou
                             ` (6 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/eal_dev.c   | 33 ++++++++++++++++++++++++++++++
 lib/librte_eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_dev.c

diff --git a/lib/librte_eal/windows/eal_dev.c b/lib/librte_eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/librte_eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 42ff5c2d5..9bd395a37 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
 	'eal.c',
 	'eal_alarm.c',
 	'eal_debug.c',
+	'eal_dev.c',
 	'eal_file.c',
 	'eal_hugepages.c',
 	'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 4/9] app/testpmd: resolve name collisions
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
                             ` (2 preceding siblings ...)
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 3/9] eal/windows: add device event stubs Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic Jie Zhou
                             ` (5 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline_flow.c | 494 ++++++++++++++++++------------------
 1 file changed, 247 insertions(+), 247 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index fb7a3a8bd..bbedd58c4 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,21 +40,21 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	SHARED_ACTION_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_SHARED_ACTION_ID,
 
 	/* Top-level command. */
 	SET,
@@ -100,13 +100,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Shared action arguments */
 	SHARED_ACTION_CREATE,
@@ -125,7 +125,7 @@ enum index {
 	SHARED_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -853,14 +853,14 @@ static const enum index next_sa_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -871,7 +871,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1841,104 +1841,104 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
-		.type = "HEX",
+		.type = "COMMON_HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[SHARED_ACTION_ID] = {
+	[COMMON_SHARED_ACTION_ID] = {
 		.name = "{shared_action_id}",
 		.type = "SHARED_ACTION_ID",
 		.help = "shared action id",
@@ -1969,7 +1969,7 @@ static const struct token token_list[] = {
 		.name = "shared_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage shared actions",
-		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_sa,
 	},
@@ -1984,7 +1984,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update shared action",
 		.next = NEXT(NEXT_ENTRY(SHARED_ACTION_SPEC),
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_sa,
 	},
@@ -1998,42 +1998,42 @@ static const struct token token_list[] = {
 	[SHARED_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query shared action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(SHARED_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.sa.action_id)),
 		.call = parse_sa,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump all flow rules to file",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
@@ -2042,8 +2042,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2052,22 +2052,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2084,14 +2084,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2099,21 +2099,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2121,7 +2121,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2137,7 +2137,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2148,54 +2148,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2262,7 +2262,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2282,7 +2282,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2296,7 +2296,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2310,7 +2310,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2323,7 +2323,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2336,34 +2336,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2382,25 +2382,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2414,41 +2414,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2462,42 +2462,42 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2511,7 +2511,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2519,7 +2519,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2527,35 +2527,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2569,28 +2569,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2604,14 +2604,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2625,21 +2625,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2653,28 +2653,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2688,7 +2688,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2701,7 +2701,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2716,7 +2716,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2729,7 +2729,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2737,7 +2737,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2745,7 +2745,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2760,7 +2760,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2770,14 +2770,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2785,7 +2785,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2793,7 +2793,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2809,7 +2809,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2823,20 +2823,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2863,20 +2863,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -2907,7 +2907,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -2915,7 +2915,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -2923,7 +2923,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -2931,7 +2931,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -2947,7 +2947,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -2962,7 +2962,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -2970,7 +2970,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "Fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -2985,14 +2985,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3007,7 +3007,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3023,7 +3023,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3040,7 +3040,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3058,7 +3058,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3076,7 +3076,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3091,7 +3091,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3105,7 +3105,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3119,14 +3119,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3156,7 +3156,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3173,14 +3173,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3194,13 +3194,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3215,7 +3215,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3229,7 +3229,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3243,7 +3243,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3256,14 +3256,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3296,7 +3296,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3312,7 +3312,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3328,7 +3328,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3344,21 +3344,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3366,7 +3366,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3415,7 +3415,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3429,7 +3429,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3451,7 +3451,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3473,14 +3473,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3524,7 +3524,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3545,7 +3545,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3560,7 +3560,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3598,7 +3598,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3606,7 +3606,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3621,7 +3621,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3629,7 +3629,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3645,7 +3645,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3653,7 +3653,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3668,7 +3668,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3684,7 +3684,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3708,7 +3708,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3753,7 +3753,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3771,7 +3771,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3806,7 +3806,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3824,7 +3824,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -3932,7 +3932,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3949,7 +3949,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3966,7 +3966,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -3983,7 +3983,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4000,7 +4000,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4017,7 +4017,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4048,7 +4048,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4064,7 +4064,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4080,7 +4080,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4095,7 +4095,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4109,7 +4109,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4123,7 +4123,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4137,7 +4137,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4220,7 +4220,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4228,7 +4228,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4249,7 +4249,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4257,7 +4257,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4266,7 +4266,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4275,7 +4275,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4315,7 +4315,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4348,14 +4348,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4363,7 +4363,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4379,7 +4379,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4387,7 +4387,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4403,7 +4403,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4419,7 +4419,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4437,7 +4437,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4465,7 +4465,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4476,7 +4476,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to destroy",
 		.next = NEXT(next_sa_destroy_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.sa_destroy.action_id)),
 		.call = parse_sa_destroy,
@@ -4486,7 +4486,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to create",
 		.next = NEXT(next_sa_create_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_SHARED] = {
@@ -4839,34 +4839,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -4947,7 +4947,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
                             ` (3 preceding siblings ...)
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 4/9] app/testpmd: resolve name collisions Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-18 17:20             ` Tal Shnaiderman
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 6/9] app/testpmd: fix parse_fec_mode return type Jie Zhou
                             ` (4 subsequent siblings)
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add clock_gettime_monotonic for testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ef0b9784d..a5f8fec5b 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -63,6 +63,12 @@
 
 #define NS_PER_SEC 1E9
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#define _clock_gettime_monotonic(cur_time) clock_gettime_monotonic(&cur_time)
+#else
+#define _clock_gettime_monotonic(cur_time) clock_gettime(CLOCK_TYPE_ID, &cur_time)
+#endif
+
 static char *flowtype_to_str(uint16_t flow_type);
 
 static const struct {
@@ -170,6 +176,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 	printf("%s%s", name, buf);
 }
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+clock_gettime_monotonic(struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	if (QueryPerformanceFrequency(&pf) == 0)
+		return -1;
+
+	if (QueryPerformanceCounter(&pc) == 0)
+		return -1;
+
+	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+	tp->tv_sec = nsec / NS_PER_SEC;
+	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+
+	return 0;
+}
+#endif
+
 void
 nic_stats_display(portid_t port_id)
 {
@@ -186,6 +213,8 @@ nic_stats_display(portid_t port_id)
 
 	static const char *nic_stats_border = "########################";
 
+	int ret;
+
 	if (port_id_is_invalid(port_id, ENABLED_WARN)) {
 		print_valid_ports();
 		return;
@@ -202,7 +231,9 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
-	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
+
+	ret = _clock_gettime_monotonic(cur_time);
+	if (ret == 0) {
 		uint64_t ns;
 
 		ns = cur_time.tv_sec * NS_PER_SEC;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 6/9] app/testpmd: fix parse_fec_mode return type
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
                             ` (4 preceding siblings ...)
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 7/9] app/testpmd: replace POSIX specific code Jie Zhou
                             ` (3 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Fix parse_fec_mode to return fec_capa instead of mode

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f44116b08..3c3d79d77 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16458,17 +16458,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a5f8fec5b..d2b9f11a3 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3435,13 +3435,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a87ccb0f0..9c62ed69d 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 7/9] app/testpmd: replace POSIX specific code
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
                             ` (5 preceding siblings ...)
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 6/9] app/testpmd: fix parse_fec_mode return type Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 8/9] app/testpmd: fix headers inclusion Jie Zhou
                             ` (2 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3c3d79d77..be0107e18 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3502,7 +3501,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 96d2e0fce..deea3f758 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,6 +1068,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3054,6 +3067,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3061,6 +3075,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3761,7 +3776,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3836,10 +3853,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3960,7 +3979,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(1000000);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 9c62ed69d..6a828583b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 8/9] app/testpmd: fix headers inclusion
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
                             ` (6 preceding siblings ...)
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 7/9] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index be0107e18..9eb731753 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index bbedd58c4..b577209fc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6a828583b..cd4ec3409 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
                             ` (7 preceding siblings ...)
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 8/9] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-04-16 17:57           ` Jie Zhou
  2021-04-18 17:21             ` Tal Shnaiderman
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-16 17:57 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 50a53dbde..8f9ece5f4 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-	subdir_done()
-endif
-
 apps = [
 	'pdump',
 	'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 6d50e0339..b4b767d89 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c',
 		'test_bbdev.c',
 		'test_bbdev_perf.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index a1a484da9..6ff3c179e 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('comp_perf_options_parse.c',
 		'main.c',
 		'comp_perf_test_verify.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 558c64878..eef7708e0 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('cperf_ops.c',
 		'cperf_options_parsing.c',
 		'cperf_test_common.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 9e588d9ec..5af31fbb0 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('evt_main.c',
 		'evt_options.c',
 		'evt_test.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 6eaf83b41..5d5d70f18 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'actions_gen.c',
 	'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index d5eddaba9..5e43d7d69 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'config.c',
 	'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 76eaaea45..5de5a6fae 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
 	subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic Jie Zhou
@ 2021-04-18 17:20             ` Tal Shnaiderman
  2021-04-19 18:04               ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-18 17:20 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

> Subject: [dpdk-dev] [PATCH v5 5/9] app/testpmd: add
> clock_gettime_monotonic
> 
> External email: Use caution opening links or attachments
> 
> 
> Add clock_gettime_monotonic for testpmd on Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/config.c | 33 ++++++++++++++++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> ef0b9784d..a5f8fec5b 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -63,6 +63,12 @@
> 
>  #define NS_PER_SEC 1E9
> 
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +#define _clock_gettime_monotonic(cur_time)
> +clock_gettime_monotonic(&cur_time)
> +#else
> +#define _clock_gettime_monotonic(cur_time)
> clock_gettime(CLOCK_TYPE_ID,
> +&cur_time) #endif
> +

I think this change should be in EAL:
rte_get_time_monotonic(&cur_time)

Windows implementation in windows\eal_timer.c
Unix implementation in unix\eal_unix_timer.c

>  static char *flowtype_to_str(uint16_t flow_type);
> 
>  static const struct {
> @@ -170,6 +176,27 @@ print_ethaddr(const char *name, struct
> rte_ether_addr *eth_addr)
>         printf("%s%s", name, buf);
>  }
> 
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +static int
> +clock_gettime_monotonic(struct timespec *tp) {
> +       LARGE_INTEGER pf, pc;
> +       LONGLONG nsec;
> +
> +       if (QueryPerformanceFrequency(&pf) == 0)
> +               return -1;
> +
> +       if (QueryPerformanceCounter(&pc) == 0)
> +               return -1;
> +
> +       nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> +       tp->tv_sec = nsec / NS_PER_SEC;
> +       tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> +
> +       return 0;
> +}
> +#endif
> +
>  void
>  nic_stats_display(portid_t port_id)
>  {
> @@ -186,6 +213,8 @@ nic_stats_display(portid_t port_id)
> 
>         static const char *nic_stats_border = "########################";
> 
> +       int ret;
> +
>         if (port_id_is_invalid(port_id, ENABLED_WARN)) {
>                 print_valid_ports();
>                 return;
> @@ -202,7 +231,9 @@ nic_stats_display(portid_t port_id)
>                "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
> 
>         diff_ns = 0;
> -       if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
> +
> +       ret = _clock_gettime_monotonic(cur_time);
> +       if (ret == 0) {
>                 uint64_t ns;
> 
>                 ns = cur_time.tv_sec * NS_PER_SEC;
> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-04-18 17:21             ` Tal Shnaiderman
  2021-04-18 18:17               ` Thomas Monjalon
  0 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-18 17:21 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

> Subject: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd
> on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Jie Zhou <jizh@microsoft.com>
> 
> - Disable unsupported Apps on Windows
> - Enable building of testpmd on Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/meson.build                    | 4 ----
>  app/pdump/meson.build              | 6 ++++++
>  app/proc-info/meson.build          | 6 ++++++
>  app/test-acl/meson.build           | 6 ++++++
>  app/test-bbdev/meson.build         | 6 ++++++
>  app/test-cmdline/meson.build       | 6 ++++++
>  app/test-compress-perf/meson.build | 6 ++++++
>  app/test-crypto-perf/meson.build   | 6 ++++++
>  app/test-eventdev/meson.build      | 6 ++++++
>  app/test-fib/meson.build           | 6 ++++++
>  app/test-flow-perf/meson.build     | 6 ++++++
>  app/test-pipeline/meson.build      | 6 ++++++
>  app/test-regex/meson.build         | 6 ++++++
>  app/test-sad/meson.build           | 6 ++++++
>  app/test/meson.build               | 6 ++++++
>  15 files changed, 84 insertions(+), 4 deletions(-)
> 

Building testpmd results in 2 warnings in clang:

../app/test-pmd/config.c:4254:1: warning: unused function 'print_fdir_mask' [-Wunused-function]
print_fdir_mask(struct rte_eth_fdir_masks *mask)
^
../app/test-pmd/config.c:4289:1: warning: unused function 'print_fdir_flex_payload' [-Wunused-function]
print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
^
2 warnings generated.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows
  2021-04-18 17:21             ` Tal Shnaiderman
@ 2021-04-18 18:17               ` Thomas Monjalon
  2021-04-18 19:11                 ` Tal Shnaiderman
  0 siblings, 1 reply; 232+ messages in thread
From: Thomas Monjalon @ 2021-04-18 18:17 UTC (permalink / raw)
  To: Jie Zhou, dev, Tal Shnaiderman
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	bruce.richardson, ferruh.yigit

18/04/2021 19:21, Tal Shnaiderman:
> Building testpmd results in 2 warnings in clang:
> 
> ../app/test-pmd/config.c:4254:1: warning: unused function 'print_fdir_mask' [-Wunused-function]
> print_fdir_mask(struct rte_eth_fdir_masks *mask)
> ^
> ../app/test-pmd/config.c:4289:1: warning: unused function 'print_fdir_flex_payload' [-Wunused-function]
> print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
> ^
> 2 warnings generated.

Why all tests are passing in the CI?
I feel there is something wrong. We must test with -werror.



^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows
  2021-04-18 18:17               ` Thomas Monjalon
@ 2021-04-18 19:11                 ` Tal Shnaiderman
  2021-04-18 19:20                   ` Tal Shnaiderman
  0 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-18 19:11 UTC (permalink / raw)
  To: NBU-Contact-Thomas Monjalon, Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	bruce.richardson, ferruh.yigit

> Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> testpmd on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> 18/04/2021 19:21, Tal Shnaiderman:
> > Building testpmd results in 2 warnings in clang:
> >
> > ../app/test-pmd/config.c:4254:1: warning: unused function
> > 'print_fdir_mask' [-Wunused-function] print_fdir_mask(struct
> > rte_eth_fdir_masks *mask) ^
> > ../app/test-pmd/config.c:4289:1: warning: unused function
> > 'print_fdir_flex_payload' [-Wunused-function]
> > print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf,
> > uint32_t num) ^
> > 2 warnings generated.
> 
> Why all tests are passing in the CI?
> I feel there is something wrong. We must test with -werror.

I know that the UNH Windows CI runs with -werror however the test didn't run on clang yet [1].
This patch passed Intel compilation test on Windows, however I don't know if -werror is used there [2].

[1] - https://lab.dpdk.org/results/dashboard/patchsets/16593/
[2] - http://mails.dpdk.org/archives/test-report/2021-April/188796.html

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows
  2021-04-18 19:11                 ` Tal Shnaiderman
@ 2021-04-18 19:20                   ` Tal Shnaiderman
  2021-04-19 17:37                     ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-04-18 19:20 UTC (permalink / raw)
  To: Tal Shnaiderman, NBU-Contact-Thomas Monjalon, Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	bruce.richardson, ferruh.yigit

> Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> testpmd on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> > Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> > testpmd on Windows
> >
> > External email: Use caution opening links or attachments
> >
> >
> > 18/04/2021 19:21, Tal Shnaiderman:
> > > Building testpmd results in 2 warnings in clang:
> > >
> > > ../app/test-pmd/config.c:4254:1: warning: unused function
> > > 'print_fdir_mask' [-Wunused-function] print_fdir_mask(struct
> > > rte_eth_fdir_masks *mask) ^
> > > ../app/test-pmd/config.c:4289:1: warning: unused function
> > > 'print_fdir_flex_payload' [-Wunused-function]
> > > print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf,
> > > uint32_t num) ^
> > > 2 warnings generated.
> >
> > Why all tests are passing in the CI?
> > I feel there is something wrong. We must test with -werror.
> 
> I know that the UNH Windows CI runs with -werror however the test didn't
> run on clang yet [1].
> This patch passed Intel compilation test on Windows, however I don't know if
> -werror is used there [2].
> 
> [1] - https://lab.dpdk.org/results/dashboard/patchsets/16593/
> [2] - http://mails.dpdk.org/archives/test-report/2021-April/188796.html

Update: the UNH test run a few minutes ago and as expected, failed with the compilation warnings.
For some reason however the test appears as 'passed' in patchwork.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows
  2021-04-18 19:20                   ` Tal Shnaiderman
@ 2021-04-19 17:37                     ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 17:37 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: NBU-Contact-Thomas Monjalon, dev, dmitry.kozliuk, xiaoyun.li,
	roretzla, pallavi.kadam, bruce.richardson, ferruh.yigit

On Sun, Apr 18, 2021 at 07:20:18PM +0000, Tal Shnaiderman wrote:
> > Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> > testpmd on Windows
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> > > Subject: Re: [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building
> > > testpmd on Windows
> > >
> > > External email: Use caution opening links or attachments
> > >
> > >
> > > 18/04/2021 19:21, Tal Shnaiderman:
> > > > Building testpmd results in 2 warnings in clang:
> > > >
> > > > ../app/test-pmd/config.c:4254:1: warning: unused function
> > > > 'print_fdir_mask' [-Wunused-function] print_fdir_mask(struct
> > > > rte_eth_fdir_masks *mask) ^
> > > > ../app/test-pmd/config.c:4289:1: warning: unused function
> > > > 'print_fdir_flex_payload' [-Wunused-function]
> > > > print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf,
> > > > uint32_t num) ^
> > > > 2 warnings generated.
> > >
> > > Why all tests are passing in the CI?
> > > I feel there is something wrong. We must test with -werror.
> > 
> > I know that the UNH Windows CI runs with -werror however the test didn't
> > run on clang yet [1].
> > This patch passed Intel compilation test on Windows, however I don't know if
> > -werror is used there [2].
> > 
> > [1] - https://lab.dpdk.org/results/dashboard/patchsets/16593/
> > [2] - http://mails.dpdk.org/archives/test-report/2021-April/188796.html
> 
> Update: the UNH test run a few minutes ago and as expected, failed with the compilation warnings.
> For some reason however the test appears as 'passed' in patchwork.

This cannot be repro'd on my Win10 + clang 10 system. Notice that the UNH is using Win2019 + clang 9. These two functions print_fdir_mask and print_fdir_flex_payload triggered "unused function" warning are both called in fdir_get_infos, and fdir_get_infos is called under "#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)".

I can add #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) for the print_fdir_mask and prting_fdir_flex_payload as well, but it's not clear to me why fdir_get_infos is not called when i40e is already enabled on Windows.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-18 17:20             ` Tal Shnaiderman
@ 2021-04-19 18:04               ` Jie Zhou
  2021-04-19 18:13                 ` Thomas Monjalon
  0 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 18:04 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit

On Sun, Apr 18, 2021 at 05:20:42PM +0000, Tal Shnaiderman wrote:
> > Subject: [dpdk-dev] [PATCH v5 5/9] app/testpmd: add
> > clock_gettime_monotonic
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> > Add clock_gettime_monotonic for testpmd on Windows
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  app/test-pmd/config.c | 33 ++++++++++++++++++++++++++++++++-
> >  1 file changed, 32 insertions(+), 1 deletion(-)
> > 
> > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> > ef0b9784d..a5f8fec5b 100644
> > --- a/app/test-pmd/config.c
> > +++ b/app/test-pmd/config.c
> > @@ -63,6 +63,12 @@
> > 
> >  #define NS_PER_SEC 1E9
> > 
> > +#ifdef RTE_EXEC_ENV_WINDOWS
> > +#define _clock_gettime_monotonic(cur_time)
> > +clock_gettime_monotonic(&cur_time)
> > +#else
> > +#define _clock_gettime_monotonic(cur_time)
> > clock_gettime(CLOCK_TYPE_ID,
> > +&cur_time) #endif
> > +
> 
> I think this change should be in EAL:
> rte_get_time_monotonic(&cur_time)
> 
> Windows implementation in windows\eal_timer.c
> Unix implementation in unix\eal_unix_timer.c

Originally and internally, the function was added into eal. But then restricted the functionality just inside testpmd to avoid currently seems unnecessary version change, per a discussion in community meeting several weeks back. If we believe eal support of clock_gettime for windows will benefit other drivers/apps now instead of future when real need comes up, I can move it back into eal. DmitryK and Tyler, any conern or inputs here?

> 
> >  static char *flowtype_to_str(uint16_t flow_type);
> > 
> >  static const struct {
> > @@ -170,6 +176,27 @@ print_ethaddr(const char *name, struct
> > rte_ether_addr *eth_addr)
> >         printf("%s%s", name, buf);
> >  }
> > 
> > +#ifdef RTE_EXEC_ENV_WINDOWS
> > +static int
> > +clock_gettime_monotonic(struct timespec *tp) {
> > +       LARGE_INTEGER pf, pc;
> > +       LONGLONG nsec;
> > +
> > +       if (QueryPerformanceFrequency(&pf) == 0)
> > +               return -1;
> > +
> > +       if (QueryPerformanceCounter(&pc) == 0)
> > +               return -1;
> > +
> > +       nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> > +       tp->tv_sec = nsec / NS_PER_SEC;
> > +       tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> > +
> > +       return 0;
> > +}
> > +#endif
> > +
> >  void
> >  nic_stats_display(portid_t port_id)
> >  {
> > @@ -186,6 +213,8 @@ nic_stats_display(portid_t port_id)
> > 
> >         static const char *nic_stats_border = "########################";
> > 
> > +       int ret;
> > +
> >         if (port_id_is_invalid(port_id, ENABLED_WARN)) {
> >                 print_valid_ports();
> >                 return;
> > @@ -202,7 +231,9 @@ nic_stats_display(portid_t port_id)
> >                "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
> > 
> >         diff_ns = 0;
> > -       if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
> > +
> > +       ret = _clock_gettime_monotonic(cur_time);
> > +       if (ret == 0) {
> >                 uint64_t ns;
> > 
> >                 ns = cur_time.tv_sec * NS_PER_SEC;
> > --
> > 2.30.0.vfs.0.2

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-19 18:04               ` Jie Zhou
@ 2021-04-19 18:13                 ` Thomas Monjalon
  2021-04-19 18:34                   ` [dpdk-dev] [EXTERNAL] " Tyler Retzlaff
  0 siblings, 1 reply; 232+ messages in thread
From: Thomas Monjalon @ 2021-04-19 18:13 UTC (permalink / raw)
  To: Jie Zhou
  Cc: Tal Shnaiderman, dev, dmitry.kozliuk, xiaoyun.li, roretzla,
	pallavi.kadam, bruce.richardson, ferruh.yigit, david.marchand

19/04/2021 20:04, Jie Zhou:
> On Sun, Apr 18, 2021 at 05:20:42PM +0000, Tal Shnaiderman wrote:
> > > --- a/app/test-pmd/config.c
> > > +++ b/app/test-pmd/config.c
> > > @@ -63,6 +63,12 @@
> > > 
> > >  #define NS_PER_SEC 1E9
> > > 
> > > +#ifdef RTE_EXEC_ENV_WINDOWS
> > > +#define _clock_gettime_monotonic(cur_time)
> > > +clock_gettime_monotonic(&cur_time)
> > > +#else
> > > +#define _clock_gettime_monotonic(cur_time)
> > > clock_gettime(CLOCK_TYPE_ID,
> > > +&cur_time) #endif
> > > +
> > 
> > I think this change should be in EAL:
> > rte_get_time_monotonic(&cur_time)
> > 
> > Windows implementation in windows\eal_timer.c
> > Unix implementation in unix\eal_unix_timer.c
> 
> Originally and internally, the function was added into eal. But then restricted the functionality just inside testpmd to avoid currently seems unnecessary version change, per a discussion in community meeting several weeks back. If we believe eal support of clock_gettime for windows will benefit other drivers/apps now instead of future when real need comes up, I can move it back into eal. DmitryK and Tyler, any conern or inputs here?

My point of view:
A test application is also testing the API availability.
Here it shows something is missing in EAL.
Instead of workarounding in the test application,
it should direct you to fixing EAL.

I don't know who decided to take this shortcut,
but it should be considered as an exception,
and accepted only if improving EAL is really difficult.




^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [EXTERNAL] Re: [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-19 18:13                 ` Thomas Monjalon
@ 2021-04-19 18:34                   ` Tyler Retzlaff
  2021-04-19 19:41                     ` Thomas Monjalon
  0 siblings, 1 reply; 232+ messages in thread
From: Tyler Retzlaff @ 2021-04-19 18:34 UTC (permalink / raw)
  To: thomas, Jie Zhou, Dmitry Kozlyuk
  Cc: Tal Shnaiderman, dev, xiaoyun.li, Kadam, Pallavi,
	bruce.richardson, ferruh.yigit, david.marchand

-----Original Message-----
From: Thomas Monjalon <thomas@monjalon.net> 
Sent: Monday, April 19, 2021 11:14 AM

\eal_timer.c Unix implementation in 
> > unix\eal_unix_timer.c
> 
> Originally and internally, the function was added into eal. But then restricted the functionality just inside testpmd to avoid currently seems unnecessary version change, per a discussion in community meeting several weeks back. If we believe eal support of clock_gettime for windows will benefit other drivers/apps now instead of future when real need comes up, I can move it back into eal. DmitryK and Tyler, any conern or inputs here?

My point of view:
A test application is also testing the API availability.
Here it shows something is missing in EAL.
Instead of workarounding in the test application, it should direct you to fixing EAL.

I think we have discussed to some degree in other threads but the more POSIX interfaces that get integrated into eal with an 'rte_' namespace pasted on to the front of them causes the scale of making DPDK portable grows.  If individual applications need portable/cross platform APIs like they should look to other packages tailored for the job instead of trying to put everything into DPDK.  Threads is an example of where this has gone wrong, I don't think doing more of it is going to be beneficial.

Shouldn't EAL be in the business of being DPDK and do it well instead of an all encompassing cross-platform application development kit?




^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [EXTERNAL] Re: [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-19 18:34                   ` [dpdk-dev] [EXTERNAL] " Tyler Retzlaff
@ 2021-04-19 19:41                     ` Thomas Monjalon
  2021-04-28  8:45                       ` Dmitry Kozlyuk
  0 siblings, 1 reply; 232+ messages in thread
From: Thomas Monjalon @ 2021-04-19 19:41 UTC (permalink / raw)
  To: Tyler Retzlaff
  Cc: Jie Zhou, Dmitry Kozlyuk, Tal Shnaiderman, dev, xiaoyun.li,
	Kadam, Pallavi, bruce.richardson, ferruh.yigit, david.marchand

19/04/2021 20:34, Tyler Retzlaff:
> > > Originally and internally, the function was added into eal. But then
> > > restricted the functionality just inside testpmd to avoid currently
> > > seems unnecessary version change, per a discussion in community meeting
> > > several weeks back. If we believe eal support of clock_gettime for
> > > windows will benefit other drivers/apps now instead of future when real
> > > need comes up, I can move it back into eal. DmitryK and Tyler, any
> > > conern or inputs here?
> > 
> > My point of view:
> > A test application is also testing the API availability.
> > Here it shows something is missing in EAL.
> > Instead of workarounding in the test application, it should direct you to
> > fixing EAL.
> 
> I think we have discussed to some degree in other threads but the more POSIX interfaces that get integrated into eal with an 'rte_' namespace pasted on to the front of them causes the scale of making DPDK portable grows.  If individual applications need portable/cross platform APIs like they should look to other packages tailored for the job instead of trying to put everything into DPDK.  Threads is an example of where this has gone wrong, I don't think doing more of it is going to be beneficial.
> 
> Shouldn't EAL be in the business of being DPDK and do it well instead of an all encompassing cross-platform application development kit?

Yes good point.



^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable testpmd on Windows
  2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
                             ` (8 preceding siblings ...)
  2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-04-19 23:19           ` Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 01/10] lib: build libraries that testpmd depends on Jie Zhou
                               ` (10 more replies)
  9 siblings, 11 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime_monotic in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---

Jie Zhou (10):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  app/testpmd: resolve name collisions
  app/testpmd: add clock_gettime_monotonic
  app/testpmd: fix parse_fec_mode return type
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                              |   4 -
 app/pdump/meson.build                        |   6 +
 app/proc-info/meson.build                    |   6 +
 app/test-acl/meson.build                     |   6 +
 app/test-bbdev/meson.build                   |   6 +
 app/test-cmdline/meson.build                 |   6 +
 app/test-compress-perf/meson.build           |   6 +
 app/test-crypto-perf/meson.build             |   6 +
 app/test-eventdev/meson.build                |   6 +
 app/test-fib/meson.build                     |   6 +
 app/test-flow-perf/meson.build               |   6 +
 app/test-pipeline/meson.build                |   6 +
 app/test-pmd/cmdline.c                       |  12 +-
 app/test-pmd/cmdline_flow.c                  | 496 +++++++++----------
 app/test-pmd/config.c                        | 119 +++--
 app/test-pmd/csumonly.c                      |   2 +-
 app/test-pmd/icmpecho.c                      |   4 +-
 app/test-pmd/ieee1588fwd.c                   |   8 +-
 app/test-pmd/parameters.c                    |  11 +-
 app/test-pmd/testpmd.c                       |  21 +-
 app/test-pmd/testpmd.h                       |   5 +-
 app/test-regex/meson.build                   |   6 +
 app/test-sad/meson.build                     |   6 +
 app/test/meson.build                         |   6 +
 lib/librte_eal/windows/eal_dev.c             |  33 ++
 lib/librte_eal/windows/include/rte_os_shim.h |   9 +
 lib/librte_eal/windows/meson.build           |   1 +
 lib/meson.build                              |   7 +-
 28 files changed, 496 insertions(+), 320 deletions(-)
 create mode 100644 lib/librte_eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 01/10] lib: build libraries that testpmd depends on
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 02/10] eal/windows: add necessary macros Jie Zhou
                               ` (9 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Enable building libraries that testpmd depends on

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/meson.build b/lib/meson.build
index 4eed83e57..3483570ac 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -44,8 +44,13 @@ if is_windows
 		'rcu',
 		'mempool', 'mbuf', 'net', 'meter', 'ethdev', 'pci',
 		'cmdline',
+		'metrics',
 		'hash',
-		'cfgfile',
+		'timer',
+		'bitratestats', 'cfgfile',
+		'gro', 'gso',
+		'latencystats',
+		'pdump',
 	] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 02/10] eal/windows: add necessary macros
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 03/10] eal/windows: add device event stubs Jie Zhou
                               ` (8 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_eal/windows/include/rte_os_shim.h b/lib/librte_eal/windows/include/rte_os_shim.h
index f40fb62d1..d0bb9e3b8 100644
--- a/lib/librte_eal/windows/include/rte_os_shim.h
+++ b/lib/librte_eal/windows/include/rte_os_shim.h
@@ -17,6 +17,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -33,4 +34,12 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 03/10] eal/windows: add device event stubs
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 01/10] lib: build libraries that testpmd depends on Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 04/10] app/testpmd: resolve name collisions Jie Zhou
                               ` (7 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/librte_eal/windows/eal_dev.c   | 33 ++++++++++++++++++++++++++++++
 lib/librte_eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/librte_eal/windows/eal_dev.c

diff --git a/lib/librte_eal/windows/eal_dev.c b/lib/librte_eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/librte_eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build
index 42ff5c2d5..9bd395a37 100644
--- a/lib/librte_eal/windows/meson.build
+++ b/lib/librte_eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
 	'eal.c',
 	'eal_alarm.c',
 	'eal_debug.c',
+	'eal_dev.c',
 	'eal_file.c',
 	'eal_hugepages.c',
 	'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 04/10] app/testpmd: resolve name collisions
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
                               ` (2 preceding siblings ...)
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 05/10] app/testpmd: add clock_gettime_monotonic Jie Zhou
                               ` (6 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline_flow.c | 494 ++++++++++++++++++------------------
 1 file changed, 247 insertions(+), 247 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index fb7a3a8bd..bbedd58c4 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,21 +40,21 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	SHARED_ACTION_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_SHARED_ACTION_ID,
 
 	/* Top-level command. */
 	SET,
@@ -100,13 +100,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Shared action arguments */
 	SHARED_ACTION_CREATE,
@@ -125,7 +125,7 @@ enum index {
 	SHARED_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -853,14 +853,14 @@ static const enum index next_sa_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -871,7 +871,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1841,104 +1841,104 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
-		.type = "HEX",
+		.type = "COMMON_HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[SHARED_ACTION_ID] = {
+	[COMMON_SHARED_ACTION_ID] = {
 		.name = "{shared_action_id}",
 		.type = "SHARED_ACTION_ID",
 		.help = "shared action id",
@@ -1969,7 +1969,7 @@ static const struct token token_list[] = {
 		.name = "shared_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage shared actions",
-		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_sa_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_sa,
 	},
@@ -1984,7 +1984,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update shared action",
 		.next = NEXT(NEXT_ENTRY(SHARED_ACTION_SPEC),
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_sa,
 	},
@@ -1998,42 +1998,42 @@ static const struct token token_list[] = {
 	[SHARED_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query shared action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(SHARED_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.sa.action_id)),
 		.call = parse_sa,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump all flow rules to file",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
@@ -2042,8 +2042,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2052,22 +2052,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2084,14 +2084,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2099,21 +2099,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2121,7 +2121,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2137,7 +2137,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2148,54 +2148,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2262,7 +2262,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2282,7 +2282,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2296,7 +2296,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2310,7 +2310,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2323,7 +2323,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2336,34 +2336,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2382,25 +2382,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2414,41 +2414,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2462,42 +2462,42 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2511,7 +2511,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2519,7 +2519,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2527,35 +2527,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2569,28 +2569,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2604,14 +2604,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2625,21 +2625,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2653,28 +2653,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2688,7 +2688,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2701,7 +2701,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2716,7 +2716,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2729,7 +2729,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2737,7 +2737,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2745,7 +2745,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2760,7 +2760,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2770,14 +2770,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2785,7 +2785,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2793,7 +2793,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2809,7 +2809,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2823,20 +2823,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2863,20 +2863,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -2907,7 +2907,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -2915,7 +2915,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -2923,7 +2923,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -2931,7 +2931,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -2947,7 +2947,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -2962,7 +2962,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -2970,7 +2970,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "Fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -2985,14 +2985,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3007,7 +3007,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3023,7 +3023,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3040,7 +3040,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3058,7 +3058,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3076,7 +3076,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3091,7 +3091,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3105,7 +3105,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3119,14 +3119,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3156,7 +3156,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3173,14 +3173,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3194,13 +3194,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3215,7 +3215,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3229,7 +3229,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3243,7 +3243,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3256,14 +3256,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3296,7 +3296,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3312,7 +3312,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3328,7 +3328,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3344,21 +3344,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3366,7 +3366,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3415,7 +3415,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3429,7 +3429,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3451,7 +3451,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3473,14 +3473,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3524,7 +3524,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3545,7 +3545,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3560,7 +3560,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3598,7 +3598,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3606,7 +3606,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3621,7 +3621,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3629,7 +3629,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3645,7 +3645,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3653,7 +3653,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3668,7 +3668,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3684,7 +3684,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3708,7 +3708,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3753,7 +3753,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3771,7 +3771,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3806,7 +3806,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3824,7 +3824,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -3932,7 +3932,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3949,7 +3949,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -3966,7 +3966,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -3983,7 +3983,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4000,7 +4000,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4017,7 +4017,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4048,7 +4048,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4064,7 +4064,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4080,7 +4080,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4095,7 +4095,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4109,7 +4109,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4123,7 +4123,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4137,7 +4137,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4220,7 +4220,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4228,7 +4228,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4249,7 +4249,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4257,7 +4257,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4266,7 +4266,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4275,7 +4275,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4315,7 +4315,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4348,14 +4348,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4363,7 +4363,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4379,7 +4379,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4387,7 +4387,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4403,7 +4403,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4419,7 +4419,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4437,7 +4437,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4465,7 +4465,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4476,7 +4476,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to destroy",
 		.next = NEXT(next_sa_destroy_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.sa_destroy.action_id)),
 		.call = parse_sa_destroy,
@@ -4486,7 +4486,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a shared action id to create",
 		.next = NEXT(next_sa_create_attr,
-			     NEXT_ENTRY(SHARED_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_SHARED_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_SHARED] = {
@@ -4839,34 +4839,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -4947,7 +4947,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 05/10] app/testpmd: add clock_gettime_monotonic
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
                               ` (3 preceding siblings ...)
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 04/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-20  9:09               ` Ananyev, Konstantin
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
                               ` (5 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Add clock_gettime_monotonic for testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index ef0b9784d..a5f8fec5b 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -63,6 +63,12 @@
 
 #define NS_PER_SEC 1E9
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+#define _clock_gettime_monotonic(cur_time) clock_gettime_monotonic(&cur_time)
+#else
+#define _clock_gettime_monotonic(cur_time) clock_gettime(CLOCK_TYPE_ID, &cur_time)
+#endif
+
 static char *flowtype_to_str(uint16_t flow_type);
 
 static const struct {
@@ -170,6 +176,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 	printf("%s%s", name, buf);
 }
 
+#ifdef RTE_EXEC_ENV_WINDOWS
+static int
+clock_gettime_monotonic(struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	if (QueryPerformanceFrequency(&pf) == 0)
+		return -1;
+
+	if (QueryPerformanceCounter(&pc) == 0)
+		return -1;
+
+	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+	tp->tv_sec = nsec / NS_PER_SEC;
+	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+
+	return 0;
+}
+#endif
+
 void
 nic_stats_display(portid_t port_id)
 {
@@ -186,6 +213,8 @@ nic_stats_display(portid_t port_id)
 
 	static const char *nic_stats_border = "########################";
 
+	int ret;
+
 	if (port_id_is_invalid(port_id, ENABLED_WARN)) {
 		print_valid_ports();
 		return;
@@ -202,7 +231,9 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
-	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
+
+	ret = _clock_gettime_monotonic(cur_time);
+	if (ret == 0) {
 		uint64_t ns;
 
 		ns = cur_time.tv_sec * NS_PER_SEC;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 06/10] app/testpmd: fix parse_fec_mode return type
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
                               ` (4 preceding siblings ...)
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 05/10] app/testpmd: add clock_gettime_monotonic Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 07/10] app/testpmd: replace POSIX specific code Jie Zhou
                               ` (4 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Fix parse_fec_mode to return fec_capa instead of mode

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f44116b08..3c3d79d77 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16458,17 +16458,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index a5f8fec5b..d2b9f11a3 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3435,13 +3435,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a87ccb0f0..9c62ed69d 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -881,7 +881,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 07/10] app/testpmd: replace POSIX specific code
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
                               ` (5 preceding siblings ...)
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 08/10] app/testpmd: fix headers inclusion Jie Zhou
                               ` (3 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 3c3d79d77..be0107e18 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3502,7 +3501,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 96d2e0fce..deea3f758 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,6 +1068,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3054,6 +3067,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3061,6 +3075,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3761,7 +3776,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3836,10 +3853,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3960,7 +3979,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(1000000);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 9c62ed69d..6a828583b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -761,7 +761,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 08/10] app/testpmd: fix headers inclusion
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
                               ` (6 preceding siblings ...)
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 09/10] app/testpmd: fix unused function warnings Jie Zhou
                               ` (2 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index be0107e18..9eb731753 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index bbedd58c4..b577209fc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6a828583b..cd4ec3409 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 09/10] app/testpmd: fix unused function warnings
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
                               ` (7 preceding siblings ...)
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-04-19 23:19             ` Jie Zhou
  2021-04-19 23:20             ` [dpdk-dev] [PATCH v6 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:19 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-Off-By: jizh@microsoft.com
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index d2b9f11a3..1ab981b4e 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4251,6 +4251,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4310,47 +4351,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v6 10/10] app/testpmd: enable building testpmd on Windows
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
                               ` (8 preceding siblings ...)
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-04-19 23:20             ` Jie Zhou
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-19 23:20 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 50a53dbde..8f9ece5f4 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-	subdir_done()
-endif
-
 apps = [
 	'pdump',
 	'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 6d50e0339..b4b767d89 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c',
 		'test_bbdev.c',
 		'test_bbdev_perf.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index a1a484da9..6ff3c179e 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('comp_perf_options_parse.c',
 		'main.c',
 		'comp_perf_test_verify.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 558c64878..eef7708e0 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('cperf_ops.c',
 		'cperf_options_parsing.c',
 		'cperf_test_common.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 9e588d9ec..5af31fbb0 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('evt_main.c',
 		'evt_options.c',
 		'evt_test.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 6eaf83b41..5d5d70f18 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'actions_gen.c',
 	'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index d5eddaba9..5e43d7d69 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
 	'config.c',
 	'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 76eaaea45..5de5a6fae 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
 	subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v6 05/10] app/testpmd: add clock_gettime_monotonic
  2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 05/10] app/testpmd: add clock_gettime_monotonic Jie Zhou
@ 2021-04-20  9:09               ` Ananyev, Konstantin
  2021-04-22 21:54                 ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Ananyev, Konstantin @ 2021-04-20  9:09 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, Li, Xiaoyun, roretzla, Kadam, Pallavi, thomas,
	Richardson, Bruce, Yigit, Ferruh



> 
> Add clock_gettime_monotonic for testpmd on Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/config.c | 33 ++++++++++++++++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index ef0b9784d..a5f8fec5b 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -63,6 +63,12 @@
> 
>  #define NS_PER_SEC 1E9
> 
> +#ifdef RTE_EXEC_ENV_WINDOWS
> +#define _clock_gettime_monotonic(cur_time) clock_gettime_monotonic(&cur_time)
> +#else
> +#define _clock_gettime_monotonic(cur_time) clock_gettime(CLOCK_TYPE_ID, &cur_time)
> +#endif
> +
>  static char *flowtype_to_str(uint16_t flow_type);
> 
>  static const struct {
> @@ -170,6 +176,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
>  	printf("%s%s", name, buf);
>  }
> 
> +#ifdef RTE_EXEC_ENV_WINDOWS

Do we really need to pollute testpmd code with all these ifdefs?
Might be better to move it into a separate .h?

> +static int
> +clock_gettime_monotonic(struct timespec *tp)
> +{
> +	LARGE_INTEGER pf, pc;
> +	LONGLONG nsec;
> +
> +	if (QueryPerformanceFrequency(&pf) == 0)
> +		return -1;
> +
> +	if (QueryPerformanceCounter(&pc) == 0)
> +		return -1;
> +
> +	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> +	tp->tv_sec = nsec / NS_PER_SEC;
> +	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> +
> +	return 0;
> +}
> +#endif
> +

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v6 05/10] app/testpmd: add clock_gettime_monotonic
  2021-04-20  9:09               ` Ananyev, Konstantin
@ 2021-04-22 21:54                 ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-22 21:54 UTC (permalink / raw)
  To: Ananyev, Konstantin
  Cc: dev, dmitry.kozliuk, Li, Xiaoyun, roretzla, Kadam, Pallavi,
	thomas, Richardson, Bruce, Yigit, Ferruh

On Tue, Apr 20, 2021 at 09:09:52AM +0000, Ananyev, Konstantin wrote:
> 
> 
> > 
> > Add clock_gettime_monotonic for testpmd on Windows
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  app/test-pmd/config.c | 33 ++++++++++++++++++++++++++++++++-
> >  1 file changed, 32 insertions(+), 1 deletion(-)
> > 
> > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> > index ef0b9784d..a5f8fec5b 100644
> > --- a/app/test-pmd/config.c
> > +++ b/app/test-pmd/config.c
> > @@ -63,6 +63,12 @@
> > 
> >  #define NS_PER_SEC 1E9
> > 
> > +#ifdef RTE_EXEC_ENV_WINDOWS
> > +#define _clock_gettime_monotonic(cur_time) clock_gettime_monotonic(&cur_time)
> > +#else
> > +#define _clock_gettime_monotonic(cur_time) clock_gettime(CLOCK_TYPE_ID, &cur_time)
> > +#endif
> > +
> >  static char *flowtype_to_str(uint16_t flow_type);
> > 
> >  static const struct {
> > @@ -170,6 +176,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
> >  	printf("%s%s", name, buf);
> >  }
> > 
> > +#ifdef RTE_EXEC_ENV_WINDOWS
> 
> Do we really need to pollute testpmd code with all these ifdefs?
> Might be better to move it into a separate .h?

Thanks Konstantin for the suggestion. In V7 move this into config.h, together with the NS_PER_SEC def etc.

> 
> > +static int
> > +clock_gettime_monotonic(struct timespec *tp)
> > +{
> > +	LARGE_INTEGER pf, pc;
> > +	LONGLONG nsec;
> > +
> > +	if (QueryPerformanceFrequency(&pf) == 0)
> > +		return -1;
> > +
> > +	if (QueryPerformanceCounter(&pc) == 0)
> > +		return -1;
> > +
> > +	nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> > +	tp->tv_sec = nsec / NS_PER_SEC;
> > +	tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> > +
> > +	return 0;
> > +}
> > +#endif
> > +

^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable testpmd on Windows
  2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
                               ` (9 preceding siblings ...)
  2021-04-19 23:20             ` [dpdk-dev] [PATCH v6 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-04-23  0:31             ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 01/10] lib: build libraries that testpmd depends on Jie Zhou
                                 ` (10 more replies)
  10 siblings, 11 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---

Jie Zhou (10):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  app/testpmd: resolve name collisions
  app/testpmd: add clock_gettime on Windows
  app/testpmd: fix parse_fec_mode return type
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  96 +++--
 app/test-pmd/config.h                 |  66 ++++
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |   9 +
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 29 files changed, 542 insertions(+), 335 deletions(-)
 create mode 100644 app/test-pmd/config.h
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 01/10] lib: build libraries that testpmd depends on
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 02/10] eal/windows: add necessary macros Jie Zhou
                                 ` (9 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

Enable building libraries that testpmd depends on

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index c9a20f65b..2d499b238 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 02/10] eal/windows: add necessary macros
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 03/10] eal/windows: add device event stubs Jie Zhou
                                 ` (8 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 433fa02c4..e60f27400 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -20,6 +20,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -36,6 +37,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 03/10] eal/windows: add device event stubs
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 01/10] lib: build libraries that testpmd depends on Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 04/10] app/testpmd: resolve name collisions Jie Zhou
                                 ` (7 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec41..fc12fefd0 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 04/10] app/testpmd: resolve name collisions
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
                                 ` (2 preceding siblings ...)
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 05/10] app/testpmd: add clock_gettime on Windows Jie Zhou
                                 ` (6 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 594734199..888b9179b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -890,14 +890,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -908,7 +908,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1911,111 +1911,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2046,7 +2046,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2061,7 +2061,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2075,42 +2075,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2118,8 +2118,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2128,22 +2128,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2160,14 +2160,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2175,21 +2175,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2197,7 +2197,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2212,7 +2212,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2229,7 +2229,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2240,54 +2240,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2354,7 +2354,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2374,7 +2374,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2388,7 +2388,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2402,7 +2402,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2415,7 +2415,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2428,34 +2428,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2474,25 +2474,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2506,41 +2506,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2554,49 +2554,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2610,7 +2610,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2618,7 +2618,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2626,35 +2626,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2668,28 +2668,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2703,14 +2703,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2724,21 +2724,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2752,28 +2752,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2787,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2800,7 +2800,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2815,7 +2815,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2828,7 +2828,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2836,7 +2836,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2859,7 +2859,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2869,14 +2869,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2884,7 +2884,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2922,20 +2922,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2962,20 +2962,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2991,7 +2991,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3006,7 +3006,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3014,7 +3014,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3061,7 +3061,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3069,7 +3069,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3092,14 +3092,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3114,7 +3114,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3165,7 +3165,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3183,7 +3183,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3198,7 +3198,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3212,7 +3212,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3226,14 +3226,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3254,7 +3254,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3263,7 +3263,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3280,14 +3280,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3301,13 +3301,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3322,7 +3322,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3336,7 +3336,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3350,7 +3350,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3363,14 +3363,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3403,7 +3403,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3451,21 +3451,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3473,7 +3473,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3491,21 +3491,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3551,7 +3551,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3565,7 +3565,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3587,7 +3587,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3609,14 +3609,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3660,7 +3660,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3681,7 +3681,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3696,7 +3696,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3734,7 +3734,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3742,7 +3742,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3757,7 +3757,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3765,7 +3765,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3804,7 +3804,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3820,7 +3820,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3844,7 +3844,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3889,7 +3889,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3907,7 +3907,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3925,7 +3925,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3942,7 +3942,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3960,7 +3960,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4068,7 +4068,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4085,7 +4085,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4102,7 +4102,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4119,7 +4119,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4136,7 +4136,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4153,7 +4153,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4184,7 +4184,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4216,7 +4216,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4245,7 +4245,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4259,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4273,7 +4273,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4356,7 +4356,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4364,7 +4364,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4385,7 +4385,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4393,7 +4393,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4402,7 +4402,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4484,14 +4484,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4499,7 +4499,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4515,7 +4515,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4523,7 +4523,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4539,7 +4539,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4555,7 +4555,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4573,7 +4573,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4587,7 +4587,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4601,7 +4601,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4640,7 +4640,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4650,7 +4650,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4734,8 +4734,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5092,34 +5092,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5200,7 +5200,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 05/10] app/testpmd: add clock_gettime on Windows
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
                                 ` (3 preceding siblings ...)
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 04/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
                                 ` (5 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

Add clock_gettime for testpmd on Windows in config.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 10 ++-----
 app/test-pmd/config.h | 66 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 8 deletions(-)
 create mode 100644 app/test-pmd/config.h

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e189062ef..9fbf2f5f7 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -54,17 +54,10 @@
 
 #include "testpmd.h"
 #include "cmdline_mtr.h"
+#include "config.h"
 
 #define ETHDEV_FWVERS_LEN 32
 
-#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
-#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW
-#else
-#define CLOCK_TYPE_ID CLOCK_MONOTONIC
-#endif
-
-#define NS_PER_SEC 1E9
-
 static char *flowtype_to_str(uint16_t flow_type);
 
 static const struct {
@@ -205,6 +198,7 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
+
 	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
 		uint64_t ns;
 
diff --git a/app/test-pmd/config.h b/app/test-pmd/config.h
new file mode 100644
index 000000000..e21bed576
--- /dev/null
+++ b/app/test-pmd/config.h
@@ -0,0 +1,66 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#ifndef _CONFIG_H_
+#define _CONFIG_H_
+
+#include <rte_os_shim.h>
+
+#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
+#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW
+#else
+#define CLOCK_TYPE_ID CLOCK_MONOTONIC
+#endif
+
+#define NS_PER_SEC 1E9
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME			0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC			1
+/* High-resolution timer from the CPU. */
+#define CLOCK_PROCESS_CPUTIME_ID	2
+/* Thread-specific CPU-time clock. */
+#define CLOCK_THREAD_CPUTIME_ID		3
+
+typedef int clockid_t;
+
+#ifndef clock_gettime
+#define clock_gettime _clock_gettime
+#endif
+
+static int
+_clock_gettime(clockid_t clock_id, struct timespec* tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+
+		return 0;
+	case CLOCK_MONOTONIC:
+		if (QueryPerformanceFrequency(&pf) == 0)
+			return -1;
+
+		if (QueryPerformanceCounter(&pc) == 0)
+			return -1;
+
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+
+		return 0;
+	default:
+		return -1;
+	}
+}
+
+#endif /* RTE_EXEC_ENV_WINDOWS */
+
+#endif /* _CONFIG_H_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 06/10] app/testpmd: fix parse_fec_mode return type
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
                                 ` (4 preceding siblings ...)
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 05/10] app/testpmd: add clock_gettime on Windows Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 07/10] app/testpmd: replace POSIX specific code Jie Zhou
                                 ` (4 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

Fix parse_fec_mode to return fec_capa instead of mode

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 12efbc0ca..d804ee233 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 9fbf2f5f7..dadc44031 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3542,13 +3542,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6ca872db8..1d104213b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 07/10] app/testpmd: replace POSIX specific code
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
                                 ` (5 preceding siblings ...)
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 08/10] app/testpmd: fix headers inclusion Jie Zhou
                                 ` (3 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

- Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code on Windows for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d804ee233..f0636ca9b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3601,7 +3600,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d4be23f8f..24a23dbd6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,6 +1068,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3055,6 +3068,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3062,6 +3076,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3762,7 +3777,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3837,10 +3854,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3961,7 +3980,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(1000000);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d104213b..a4115861b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -763,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 08/10] app/testpmd: fix headers inclusion
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
                                 ` (6 preceding siblings ...)
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 09/10] app/testpmd: fix unused function warnings Jie Zhou
                                 ` (2 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f0636ca9b..2fbef3320 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 888b9179b..a3cd4773a 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a4115861b..f96eec71a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 09/10] app/testpmd: fix unused function warnings
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
                                 ` (7 preceding siblings ...)
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-04-23  0:31               ` Jie Zhou
  2021-04-23  0:32               ` [dpdk-dev] [PATCH v7 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:31 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index dadc44031..e7edad216 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4358,6 +4358,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4417,47 +4458,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v7 10/10] app/testpmd: enable building testpmd on Windows
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
                                 ` (8 preceding siblings ...)
  2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-04-23  0:32               ` Jie Zhou
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-23  0:32 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861b..4c6049807 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f..edb9deef8 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9..f29c6ee86 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b791..ef3582a87 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 04117dbe4..08a3ba78a 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036..a33cad907 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f8323..7d123e32f 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 08c82d3d2..2953afc8b 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable testpmd on Windows
  2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
                                 ` (9 preceding siblings ...)
  2021-04-23  0:32               ` [dpdk-dev] [PATCH v7 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-04-27 20:01               ` Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 01/10] lib: build libraries that testpmd depends on Jie Zhou
                                   ` (10 more replies)
  10 siblings, 11 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---


Jie Zhou (10):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  app/testpmd: resolve name collisions
  app/testpmd: add clock_gettime on Windows
  app/testpmd: fix parse_fec_mode return type
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  96 +++--
 app/test-pmd/config.h                 |  66 ++++
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |   9 +
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 29 files changed, 542 insertions(+), 335 deletions(-)
 create mode 100644 app/test-pmd/config.h
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 01/10] lib: build libraries that testpmd depends on
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
@ 2021-04-27 20:01                 ` Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 02/10] eal/windows: add necessary macros Jie Zhou
                                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Enable building libraries that testpmd depends on

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index c9a20f65b..2d499b238 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 02/10] eal/windows: add necessary macros
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-04-27 20:01                 ` Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 03/10] eal/windows: add device event stubs Jie Zhou
                                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 433fa02c4..e60f27400 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -20,6 +20,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -36,6 +37,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 03/10] eal/windows: add device event stubs
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 01/10] lib: build libraries that testpmd depends on Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-04-27 20:01                 ` Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 04/10] app/testpmd: resolve name collisions Jie Zhou
                                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec41..fc12fefd0 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 04/10] app/testpmd: resolve name collisions
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
                                   ` (2 preceding siblings ...)
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-04-27 20:01                 ` Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 05/10] app/testpmd: add clock_gettime on Windows Jie Zhou
                                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 594734199..888b9179b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -890,14 +890,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -908,7 +908,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1911,111 +1911,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2046,7 +2046,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2061,7 +2061,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2075,42 +2075,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2118,8 +2118,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2128,22 +2128,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2160,14 +2160,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2175,21 +2175,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2197,7 +2197,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2212,7 +2212,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2229,7 +2229,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2240,54 +2240,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2354,7 +2354,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2374,7 +2374,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2388,7 +2388,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2402,7 +2402,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2415,7 +2415,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2428,34 +2428,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2474,25 +2474,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2506,41 +2506,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2554,49 +2554,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2610,7 +2610,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2618,7 +2618,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2626,35 +2626,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2668,28 +2668,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2703,14 +2703,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2724,21 +2724,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2752,28 +2752,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2787,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2800,7 +2800,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2815,7 +2815,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2828,7 +2828,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2836,7 +2836,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2859,7 +2859,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2869,14 +2869,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2884,7 +2884,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2922,20 +2922,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2962,20 +2962,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2991,7 +2991,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3006,7 +3006,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3014,7 +3014,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3061,7 +3061,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3069,7 +3069,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3092,14 +3092,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3114,7 +3114,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3165,7 +3165,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3183,7 +3183,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3198,7 +3198,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3212,7 +3212,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3226,14 +3226,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3254,7 +3254,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3263,7 +3263,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3280,14 +3280,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3301,13 +3301,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3322,7 +3322,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3336,7 +3336,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3350,7 +3350,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3363,14 +3363,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3403,7 +3403,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3451,21 +3451,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3473,7 +3473,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3491,21 +3491,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3551,7 +3551,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3565,7 +3565,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3587,7 +3587,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3609,14 +3609,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3660,7 +3660,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3681,7 +3681,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3696,7 +3696,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3734,7 +3734,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3742,7 +3742,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3757,7 +3757,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3765,7 +3765,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3804,7 +3804,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3820,7 +3820,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3844,7 +3844,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3889,7 +3889,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3907,7 +3907,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3925,7 +3925,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3942,7 +3942,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3960,7 +3960,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4068,7 +4068,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4085,7 +4085,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4102,7 +4102,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4119,7 +4119,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4136,7 +4136,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4153,7 +4153,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4184,7 +4184,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4216,7 +4216,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4245,7 +4245,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4259,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4273,7 +4273,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4356,7 +4356,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4364,7 +4364,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4385,7 +4385,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4393,7 +4393,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4402,7 +4402,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4484,14 +4484,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4499,7 +4499,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4515,7 +4515,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4523,7 +4523,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4539,7 +4539,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4555,7 +4555,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4573,7 +4573,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4587,7 +4587,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4601,7 +4601,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4640,7 +4640,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4650,7 +4650,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4734,8 +4734,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5092,34 +5092,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5200,7 +5200,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 05/10] app/testpmd: add clock_gettime on Windows
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
                                   ` (3 preceding siblings ...)
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 04/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-04-27 20:01                 ` Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
                                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Add clock_gettime for testpmd on Windows in config.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 10 ++-----
 app/test-pmd/config.h | 66 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 8 deletions(-)
 create mode 100644 app/test-pmd/config.h

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e189062ef..9fbf2f5f7 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -54,17 +54,10 @@
 
 #include "testpmd.h"
 #include "cmdline_mtr.h"
+#include "config.h"
 
 #define ETHDEV_FWVERS_LEN 32
 
-#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
-#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW
-#else
-#define CLOCK_TYPE_ID CLOCK_MONOTONIC
-#endif
-
-#define NS_PER_SEC 1E9
-
 static char *flowtype_to_str(uint16_t flow_type);
 
 static const struct {
@@ -205,6 +198,7 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
+
 	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
 		uint64_t ns;
 
diff --git a/app/test-pmd/config.h b/app/test-pmd/config.h
new file mode 100644
index 000000000..16599c9d5
--- /dev/null
+++ b/app/test-pmd/config.h
@@ -0,0 +1,66 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#ifndef _CONFIG_H_
+#define _CONFIG_H_
+
+#include <rte_os_shim.h>
+
+#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
+#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW
+#else
+#define CLOCK_TYPE_ID CLOCK_MONOTONIC
+#endif
+
+#define NS_PER_SEC 1E9
+
+#ifdef RTE_EXEC_ENV_WINDOWS
+
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME			0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC			1
+/* High-resolution timer from the CPU. */
+#define CLOCK_PROCESS_CPUTIME_ID	2
+/* Thread-specific CPU-time clock. */
+#define CLOCK_THREAD_CPUTIME_ID		3
+
+typedef int clockid_t;
+
+#ifndef clock_gettime
+#define clock_gettime _clock_gettime
+#endif
+
+static int
+_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+
+		return 0;
+	case CLOCK_MONOTONIC:
+		if (QueryPerformanceFrequency(&pf) == 0)
+			return -1;
+
+		if (QueryPerformanceCounter(&pc) == 0)
+			return -1;
+
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+
+		return 0;
+	default:
+		return -1;
+	}
+}
+
+#endif /* RTE_EXEC_ENV_WINDOWS */
+
+#endif /* _CONFIG_H_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 06/10] app/testpmd: fix parse_fec_mode return type
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
                                   ` (4 preceding siblings ...)
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 05/10] app/testpmd: add clock_gettime on Windows Jie Zhou
@ 2021-04-27 20:01                 ` Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 07/10] app/testpmd: replace POSIX specific code Jie Zhou
                                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Fix parse_fec_mode to return fec_capa instead of mode

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 12efbc0ca..d804ee233 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 9fbf2f5f7..dadc44031 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3542,13 +3542,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6ca872db8..1d104213b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 07/10] app/testpmd: replace POSIX specific code
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
                                   ` (5 preceding siblings ...)
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
@ 2021-04-27 20:01                 ` Jie Zhou
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 08/10] app/testpmd: fix headers inclusion Jie Zhou
                                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

- Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d804ee233..f0636ca9b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3601,7 +3600,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d4be23f8f..24a23dbd6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,6 +1068,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3055,6 +3068,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3062,6 +3076,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3762,7 +3777,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3837,10 +3854,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3961,7 +3980,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(1000000);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d104213b..a4115861b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -763,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 08/10] app/testpmd: fix headers inclusion
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
                                   ` (6 preceding siblings ...)
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-04-27 20:01                 ` Jie Zhou
  2021-04-27 20:02                 ` [dpdk-dev] [PATCH v8 09/10] app/testpmd: fix unused function warnings Jie Zhou
                                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:01 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f0636ca9b..2fbef3320 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 888b9179b..a3cd4773a 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a4115861b..f96eec71a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 09/10] app/testpmd: fix unused function warnings
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
                                   ` (7 preceding siblings ...)
  2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-04-27 20:02                 ` Jie Zhou
  2021-04-27 20:02                 ` [dpdk-dev] [PATCH v8 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:02 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-Off-By: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index dadc44031..e7edad216 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4358,6 +4358,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4417,47 +4458,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v8 10/10] app/testpmd: enable building testpmd on Windows
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
                                   ` (8 preceding siblings ...)
  2021-04-27 20:02                 ` [dpdk-dev] [PATCH v8 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-04-27 20:02                 ` Jie Zhou
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-27 20:02 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861b..4c6049807 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f..edb9deef8 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9..f29c6ee86 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b791..ef3582a87 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 04117dbe4..08a3ba78a 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036..a33cad907 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f8323..7d123e32f 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 08c82d3d2..2953afc8b 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [EXTERNAL] Re: [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-19 19:41                     ` Thomas Monjalon
@ 2021-04-28  8:45                       ` Dmitry Kozlyuk
  2021-04-29 19:52                         ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-04-28  8:45 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Tyler Retzlaff, Jie Zhou, Tal Shnaiderman, dev, xiaoyun.li,
	Kadam, Pallavi, bruce.richardson, ferruh.yigit, david.marchand

2021-04-19 21:41 (UTC+0200), Thomas Monjalon:
> 19/04/2021 20:34, Tyler Retzlaff:
> > > > Originally and internally, the function was added into eal. But then
> > > > restricted the functionality just inside testpmd to avoid currently
> > > > seems unnecessary version change, per a discussion in community meeting
> > > > several weeks back. If we believe eal support of clock_gettime for
> > > > windows will benefit other drivers/apps now instead of future when real
> > > > need comes up, I can move it back into eal. DmitryK and Tyler, any
> > > > conern or inputs here?  
> > > 
> > > My point of view:
> > > A test application is also testing the API availability.
> > > Here it shows something is missing in EAL.
> > > Instead of workarounding in the test application, it should direct you to
> > > fixing EAL.  
> > 
> > I think we have discussed to some degree in other threads but the more POSIX interfaces that get integrated into eal with an 'rte_' namespace pasted on to the front of them causes the scale of making DPDK portable grows.  If individual applications need portable/cross platform APIs like they should look to other packages tailored for the job instead of trying to put everything into DPDK.  Threads is an example of where this has gone wrong, I don't think doing more of it is going to be beneficial.
> > 
> > Shouldn't EAL be in the business of being DPDK and do it well instead of an all encompassing cross-platform application development kit?  
> 
> Yes good point.

While Tyler's point is valid in general, monotonic time is something required
in many PMDs for timeouts. App networking code often deals with timeouts, too.

There's already a patch adding clock_gettime():

http://patchwork.dpdk.org/project/dpdk/patch/1619597563-56716-1-git-send-email-humin29@huawei.com/

Luckily EAL only needs this in multiprocess part, disabled on Windows;
but PMDs do require it in portable code. Even Unices would benefit a little
from not having #ifdef CLOCK_MONOTONIC_RAW in several files.

I'm for moving this to EAL.

P.S. Not all gettimeofday() are subject to replacement with new API: for
example, in PCAP we (arguably) need a realtime stamp in packets.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [EXTERNAL] Re: [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic
  2021-04-28  8:45                       ` Dmitry Kozlyuk
@ 2021-04-29 19:52                         ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-29 19:52 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: Thomas Monjalon, Tyler Retzlaff, Tal Shnaiderman, dev,
	xiaoyun.li, Kadam, Pallavi, bruce.richardson, ferruh.yigit,
	david.marchand

On Wed, Apr 28, 2021 at 11:45:40AM +0300, Dmitry Kozlyuk wrote:
> 2021-04-19 21:41 (UTC+0200), Thomas Monjalon:
> > 19/04/2021 20:34, Tyler Retzlaff:
> > > > > Originally and internally, the function was added into eal. But then
> > > > > restricted the functionality just inside testpmd to avoid currently
> > > > > seems unnecessary version change, per a discussion in community meeting
> > > > > several weeks back. If we believe eal support of clock_gettime for
> > > > > windows will benefit other drivers/apps now instead of future when real
> > > > > need comes up, I can move it back into eal. DmitryK and Tyler, any
> > > > > conern or inputs here?  
> > > > 
> > > > My point of view:
> > > > A test application is also testing the API availability.
> > > > Here it shows something is missing in EAL.
> > > > Instead of workarounding in the test application, it should direct you to
> > > > fixing EAL.  
> > > 
> > > I think we have discussed to some degree in other threads but the more POSIX interfaces that get integrated into eal with an 'rte_' namespace pasted on to the front of them causes the scale of making DPDK portable grows.  If individual applications need portable/cross platform APIs like they should look to other packages tailored for the job instead of trying to put everything into DPDK.  Threads is an example of where this has gone wrong, I don't think doing more of it is going to be beneficial.
> > > 
> > > Shouldn't EAL be in the business of being DPDK and do it well instead of an all encompassing cross-platform application development kit?  
> > 
> > Yes good point.
> 
> While Tyler's point is valid in general, monotonic time is something required
> in many PMDs for timeouts. App networking code often deals with timeouts, too.
> 
> There's already a patch adding clock_gettime():
> 
> http://patchwork.dpdk.org/project/dpdk/patch/1619597563-56716-1-git-send-email-humin29@huawei.com/
> 
> Luckily EAL only needs this in multiprocess part, disabled on Windows;
> but PMDs do require it in portable code. Even Unices would benefit a little
> from not having #ifdef CLOCK_MONOTONIC_RAW in several files.
> 
> I'm for moving this to EAL.
> 
> P.S. Not all gettimeofday() are subject to replacement with new API: for
> example, in PCAP we (arguably) need a realtime stamp in packets.

I will move this into EAL in V9. Thanks.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable testpmd on Windows
  2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
                                   ` (9 preceding siblings ...)
  2021-04-27 20:02                 ` [dpdk-dev] [PATCH v8 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-04-30 17:52                 ` Jie Zhou
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 01/10] lib: build libraries that testpmd depends on Jie Zhou
                                     ` (10 more replies)
  10 siblings, 11 replies; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

---
V9 changes:
    - Add clock_gettime for Windows into eal in rte_os_shim.h

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---

Jie Zhou (10):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  eal/Windows: add clock_gettime on Windows
  app/testpmd: resolve name collisions
  app/testpmd: fix parse_fec_mode return type
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  87 ++---
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |  47 +++
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 28 files changed, 513 insertions(+), 327 deletions(-)
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 01/10] lib: build libraries that testpmd depends on
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:36                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 02/10] eal/windows: add necessary macros Jie Zhou
                                     ` (9 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Enable building libraries that testpmd depends on

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index c9a20f65b..2d499b238 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 02/10] eal/windows: add necessary macros
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:36                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 03/10] eal/windows: add device event stubs Jie Zhou
                                     ` (8 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 433fa02c4..e60f27400 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -20,6 +20,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -36,6 +37,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 03/10] eal/windows: add device event stubs
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 01/10] lib: build libraries that testpmd depends on Jie Zhou
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:43                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
                                     ` (7 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec41..fc12fefd0 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 04/10] eal/Windows: add clock_gettime on Windows
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
                                     ` (2 preceding siblings ...)
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:37                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 05/10] app/testpmd: resolve name collisions Jie Zhou
                                     ` (6 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Add clock_gettime on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c                 |  1 +
 lib/eal/windows/include/rte_os_shim.h | 38 +++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e189062ef..0e86ed02f 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -205,6 +205,7 @@ nic_stats_display(portid_t port_id)
 	       "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
 
 	diff_ns = 0;
+
 	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
 		uint64_t ns;
 
diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index e60f27400..ec1087290 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -75,4 +75,42 @@ rte_timespec_get(struct timespec *now, int base)
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME                  0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC                 1
+/* High-resolution timer from the CPU. */
+#define CLOCK_PROCESS_CPUTIME_ID        2
+/* Thread-specific CPU-time clock. */
+#define CLOCK_THREAD_CPUTIME_ID         3
+
+#define NS_PER_SEC 1E9
+
+typedef int clockid_t;
+
+static inline int
+rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+		return 0;
+	case CLOCK_MONOTONIC:
+		if (QueryPerformanceFrequency(&pf) == 0)
+			return -1;
+		if (QueryPerformanceCounter(&pc) == 0)
+			return -1;
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+		return 0;
+	default:
+		return -1;
+	}
+}
+#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 05/10] app/testpmd: resolve name collisions
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
                                     ` (3 preceding siblings ...)
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:37                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
                                     ` (5 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 594734199..888b9179b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -890,14 +890,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -908,7 +908,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1911,111 +1911,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2046,7 +2046,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2061,7 +2061,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2075,42 +2075,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2118,8 +2118,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2128,22 +2128,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2160,14 +2160,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2175,21 +2175,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2197,7 +2197,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2212,7 +2212,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2229,7 +2229,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2240,54 +2240,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2354,7 +2354,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2374,7 +2374,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2388,7 +2388,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2402,7 +2402,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2415,7 +2415,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2428,34 +2428,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2474,25 +2474,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2506,41 +2506,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2554,49 +2554,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2610,7 +2610,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2618,7 +2618,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2626,35 +2626,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2668,28 +2668,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2703,14 +2703,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2724,21 +2724,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2752,28 +2752,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2787,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2800,7 +2800,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2815,7 +2815,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2828,7 +2828,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2836,7 +2836,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2859,7 +2859,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2869,14 +2869,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2884,7 +2884,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2922,20 +2922,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2962,20 +2962,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2991,7 +2991,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3006,7 +3006,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3014,7 +3014,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3061,7 +3061,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3069,7 +3069,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3092,14 +3092,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3114,7 +3114,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3165,7 +3165,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3183,7 +3183,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3198,7 +3198,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3212,7 +3212,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3226,14 +3226,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3254,7 +3254,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3263,7 +3263,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3280,14 +3280,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3301,13 +3301,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3322,7 +3322,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3336,7 +3336,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3350,7 +3350,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3363,14 +3363,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3403,7 +3403,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3451,21 +3451,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3473,7 +3473,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3491,21 +3491,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3551,7 +3551,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3565,7 +3565,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3587,7 +3587,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3609,14 +3609,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3660,7 +3660,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3681,7 +3681,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3696,7 +3696,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3734,7 +3734,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3742,7 +3742,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3757,7 +3757,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3765,7 +3765,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3804,7 +3804,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3820,7 +3820,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3844,7 +3844,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3889,7 +3889,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3907,7 +3907,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3925,7 +3925,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3942,7 +3942,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3960,7 +3960,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4068,7 +4068,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4085,7 +4085,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4102,7 +4102,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4119,7 +4119,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4136,7 +4136,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4153,7 +4153,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4184,7 +4184,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4216,7 +4216,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4245,7 +4245,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4259,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4273,7 +4273,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4356,7 +4356,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4364,7 +4364,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4385,7 +4385,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4393,7 +4393,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4402,7 +4402,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4484,14 +4484,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4499,7 +4499,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4515,7 +4515,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4523,7 +4523,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4539,7 +4539,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4555,7 +4555,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4573,7 +4573,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4587,7 +4587,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4601,7 +4601,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4640,7 +4640,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4650,7 +4650,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4734,8 +4734,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5092,34 +5092,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5200,7 +5200,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
                                     ` (4 preceding siblings ...)
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 05/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:38                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 07/10] app/testpmd: replace POSIX specific code Jie Zhou
                                     ` (4 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Fix parse_fec_mode to return fec_capa instead of mode

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 12efbc0ca..d804ee233 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 0e86ed02f..c626d5ce8 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3549,13 +3549,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6ca872db8..1d104213b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 07/10] app/testpmd: replace POSIX specific code
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
                                     ` (5 preceding siblings ...)
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:37                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 08/10] app/testpmd: fix headers inclusion Jie Zhou
                                     ` (3 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

- Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d804ee233..f0636ca9b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3601,7 +3600,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d4be23f8f..24a23dbd6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,6 +1068,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3055,6 +3068,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3062,6 +3076,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3762,7 +3777,9 @@ signal_handler(int signum)
 		f_quit = 1;
 		/* exit with the expected status */
 		signal(signum, SIG_DFL);
+#ifndef RTE_EXEC_ENV_WINDOWS
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3837,10 +3854,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3961,7 +3980,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(1000000);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d104213b..a4115861b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -763,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 08/10] app/testpmd: fix headers inclusion
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
                                     ` (6 preceding siblings ...)
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:44                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 09/10] app/testpmd: fix unused function warnings Jie Zhou
                                     ` (2 subsequent siblings)
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f0636ca9b..2fbef3320 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 888b9179b..a3cd4773a 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a4115861b..f96eec71a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 09/10] app/testpmd: fix unused function warnings
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
                                     ` (7 preceding siblings ...)
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:43                     ` Tal Shnaiderman
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index c626d5ce8..4eecad38f 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4365,6 +4365,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4424,47 +4465,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v9 10/10] app/testpmd: enable building testpmd on Windows
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
                                     ` (8 preceding siblings ...)
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-04-30 17:52                   ` Jie Zhou
  2021-05-03 17:38                     ` Tal Shnaiderman
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-04-30 17:52 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861b..4c6049807 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f..edb9deef8 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9..f29c6ee86 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b791..ef3582a87 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 04117dbe4..08a3ba78a 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036..a33cad907 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f8323..7d123e32f 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 08c82d3d2..2953afc8b 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 01/10] lib: build libraries that testpmd depends on
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-05-03 17:36                     ` Tal Shnaiderman
  2021-05-03 21:38                       ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:36 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 01/10] lib: build libraries that testpmd depends on
> 
> External email: Use caution opening links or attachments
> 
> 
> Enable building libraries that testpmd depends on
> 

You should mention the change is for Windows only.

> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/meson.build | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build index c9a20f65b..2d499b238
> 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -76,8 +76,15 @@ if is_windows
>              'ethdev',
>              'pci',
>              'cmdline',
> +            'metrics',
>              'hash',
> +            'timer',
> +            'bitratestats',
>              'cfgfile',
> +            'gro',
> +            'gso',
> +            'latencystats',
> +            'pdump',
>      ] # only supported libraries for windows  endif
> 
> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 02/10] eal/windows: add necessary macros
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-05-03 17:36                     ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:36 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 02/10] eal/windows: add necessary macros
> 
> External email: Use caution opening links or attachments
> 
> 
> Add required macros by testpmd on Windows in rte_os_shim.h
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/lib/eal/windows/include/rte_os_shim.h
> b/lib/eal/windows/include/rte_os_shim.h
> index 433fa02c4..e60f27400 100644
> --- a/lib/eal/windows/include/rte_os_shim.h
> +++ b/lib/eal/windows/include/rte_os_shim.h
> @@ -20,6 +20,7 @@
> 
>  #define strdup(str) _strdup(str)
>  #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
> +#define strcasecmp _stricmp
>  #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
> 
>  #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__) @@ -
> 36,6 +37,14 @@
>  #define IPPROTO_SCTP   132
>  #endif
> 
> +#ifndef IPDEFTTL
> +#define IPDEFTTL 64
> +#endif
> +
> +#ifndef S_ISREG
> +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG) #endif
> +
>  #ifdef RTE_TOOLCHAIN_GCC
> 
>  #define TIME_UTC 1
> --
> 2.30.0.vfs.0.2

Acked-by: Tal Shnaiderman <talshn@nvidia.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 04/10] eal/Windows: add clock_gettime on Windows
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-05-03 17:37                     ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:37 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 04/10] eal/Windows: add clock_gettime on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> Add clock_gettime on Windows in rte_os_shim.h
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/config.c                 |  1 +

Unneeded change

>  lib/eal/windows/include/rte_os_shim.h | 38
> +++++++++++++++++++++++++++
>  2 files changed, 39 insertions(+)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> e189062ef..0e86ed02f 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -205,6 +205,7 @@ nic_stats_display(portid_t port_id)
>                "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes);
> 
>         diff_ns = 0;
> +
>         if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
>                 uint64_t ns;
> 
> diff --git a/lib/eal/windows/include/rte_os_shim.h
> b/lib/eal/windows/include/rte_os_shim.h
> index e60f27400..ec1087290 100644
> --- a/lib/eal/windows/include/rte_os_shim.h
> +++ b/lib/eal/windows/include/rte_os_shim.h
> @@ -75,4 +75,42 @@ rte_timespec_get(struct timespec *now, int base)
> 
>  #endif /* RTE_TOOLCHAIN_GCC */
> 
> +/* Identifier for system-wide realtime clock. */
> +#define CLOCK_REALTIME                  0
> +/* Monotonic system-wide clock. */
> +#define CLOCK_MONOTONIC                 1
> +/* High-resolution timer from the CPU. */
> +#define CLOCK_PROCESS_CPUTIME_ID        2
> +/* Thread-specific CPU-time clock. */
> +#define CLOCK_THREAD_CPUTIME_ID         3
> +
> +#define NS_PER_SEC 1E9
> +
> +typedef int clockid_t;
> +
> +static inline int
> +rte_clock_gettime(clockid_t clock_id, struct timespec *tp) {
> +       LARGE_INTEGER pf, pc;
> +       LONGLONG nsec;
> +       switch (clock_id) {
> +       case CLOCK_REALTIME:
> +               if (timespec_get(tp, TIME_UTC) != TIME_UTC)
> +                       return -1;
> +               return 0;
> +       case CLOCK_MONOTONIC:
> +               if (QueryPerformanceFrequency(&pf) == 0)
> +                       return -1;
> +               if (QueryPerformanceCounter(&pc) == 0)
> +                       return -1;
> +               nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> +               tp->tv_sec = nsec / NS_PER_SEC;
> +               tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> +               return 0;
> +       default:
> +               return -1;
> +       }
> +}
> +#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
> +
>  #endif /* _RTE_OS_SHIM_ */
> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 05/10] app/testpmd: resolve name collisions
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 05/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-05-03 17:37                     ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:37 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 05/10] app/testpmd: resolve name collisions
> 
> External email: Use caution opening links or attachments
> 
> 
> Resolve name collisions with Windows types
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
>  1 file changed, 256 insertions(+), 256 deletions(-)
> 
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 07/10] app/testpmd: replace POSIX specific code
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-05-03 17:37                     ` Tal Shnaiderman
  2021-05-03 21:41                       ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:37 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 07/10] app/testpmd: replace POSIX specific code
> 
> External email: Use caution opening links or attachments
> 
> 
> - Make printf format OS independent
>  - Replace htons with RTE_BE16
>  - Replace POSIX specific inet_aton with OS independent inet_pton
>  - Replace sleep with rte_delay_us_sleep
>  - Repalce random with rte_rand
>  - #ifndef mman related code for now
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/cmdline.c     |  3 +--
>  app/test-pmd/csumonly.c    |  2 +-
>  app/test-pmd/icmpecho.c    |  4 ++--
>  app/test-pmd/ieee1588fwd.c |  8 ++++----  app/test-pmd/parameters.c  |
> 10 +++++++---
>  app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
>  app/test-pmd/testpmd.h     |  2 +-
>  7 files changed, 36 insertions(+), 14 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> d804ee233..f0636ca9b 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c

<snip>

> @@ -8,7 +8,6 @@
> @@ pmd_test_exit(void)
>                                                      NULL);
>                 }
>         }
> +#endif
>         if (ports != NULL) {
>                 no_link_check = 1;
>                 RTE_ETH_FOREACH_DEV(pt_id) { @@ -3762,7 +3777,9 @@
> signal_handler(int signum)
>                 f_quit = 1;
>                 /* exit with the expected status */
>                 signal(signum, SIG_DFL);
> +#ifndef RTE_EXEC_ENV_WINDOWS
>                 kill(getpid(), signum);
> +#endif

signal() doesn't need to be inside the ifndef?

>         }
>  }
> 
> @@ -3837,10 +3854,12 @@ main(int argc, char** argv)
>         if (argc > 1)
>                 launch_args_parse(argc, argv);
> 
> +#ifndef RTE_EXEC_ENV_WINDOWS
>         if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
>                 TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
>                         strerror(errno));
>         }
> +#endif
> 
>         if (tx_first && interactive)
>                 rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
> @@ -3961,7 +3980,7 @@ main(int argc, char** argv)
>                                 }
>                                 /* Sleep to avoid unnecessary checks */
>                                 prev_time = cur_time;
> -                               sleep(1);
> +                               rte_delay_us_sleep(1000000);

Please use US_PER_S

>                         }
>                 }
> 
> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index
> 1d104213b..a4115861b 100644
> --- a/app/test-pmd/testpmd.h
> +++ b/app/test-pmd/testpmd.h
> @@ -763,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t
> nb_tx)  }
> 
>  /* Prototypes */
> -unsigned int parse_item_list(char* str, const char* item_name,
> +unsigned int parse_item_list(const char *str, const char *item_name,
>                         unsigned int max_items,
>                         unsigned int *parsed_items, int check_unique_values);  void
> launch_args_parse(int argc, char** argv);
> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
@ 2021-05-03 17:38                     ` Tal Shnaiderman
  2021-05-03 21:43                       ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:38 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type
> 

I think you should name this patch " app/testpmd: fix parse_fec_mode misleading return type name"

Do we need a fixes/CC stable tags here?

> External email: Use caution opening links or attachments
> 
> 
> Fix parse_fec_mode to return fec_capa instead of mode
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/cmdline.c | 6 +++---
>  app/test-pmd/config.c  | 4 ++--
>  app/test-pmd/testpmd.h | 2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> 12efbc0ca..d804ee233 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(  {
>         struct cmd_set_port_fec_mode *res = parsed_result;
>         uint16_t port_id = res->port_id;
> -       uint32_t mode;
> +       uint32_t fec_capa;
>         int ret;
> 
> -       ret = parse_fec_mode(res->fec_value, &mode);
> +       ret = parse_fec_mode(res->fec_value, &fec_capa);
>         if (ret < 0) {
>                 printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
>                         port_id);
>                 return;
>         }
> 
> -       ret = rte_eth_fec_set(port_id, mode);
> +       ret = rte_eth_fec_set(port_id, fec_capa);
>         if (ret == -ENOTSUP) {
>                 printf("Function not implemented\n");
>                 return;
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> 0e86ed02f..c626d5ce8 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -3549,13 +3549,13 @@ set_tx_pkt_split(const char *name)  }
> 
>  int
> -parse_fec_mode(const char *name, uint32_t *mode)
> +parse_fec_mode(const char *name, uint32_t *fec_capa)
>  {
>         uint8_t i;
> 
>         for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
>                 if (strcmp(fec_mode_name[i].name, name) == 0) {
> -                       *mode =
> RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
> +                       *fec_capa =
> + RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
>                         return 0;
>                 }
>         }
> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index
> 6ca872db8..1d104213b 100644
> --- a/app/test-pmd/testpmd.h
> +++ b/app/test-pmd/testpmd.h
> @@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);  void
> set_tx_pkt_times(unsigned int *tx_times);  void show_tx_pkt_times(void);
> void set_tx_pkt_split(const char *name); -int parse_fec_mode(const char
> *name, enum rte_eth_fec_mode *mode);
> +int parse_fec_mode(const char *name, uint32_t *fec_capa);
>  void show_fec_capability(uint32_t num, struct rte_eth_fec_capa
> *speed_fec_capa);  void set_nb_pkt_per_burst(uint16_t pkt_burst);  char
> *list_pkt_forwarding_modes(void);
> --
> 2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 10/10] app/testpmd: enable building testpmd on Windows
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-05-03 17:38                     ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:38 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 10/10] app/testpmd: enable building testpmd on
> Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> From: Jie Zhou <jizh@microsoft.com>
> 
> - Disable unsupported Apps on Windows
> - Enable building of testpmd on Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/meson.build                    | 4 ----
>  app/pdump/meson.build              | 6 ++++++
>  app/proc-info/meson.build          | 6 ++++++
>  app/test-acl/meson.build           | 6 ++++++
>  app/test-bbdev/meson.build         | 6 ++++++
>  app/test-cmdline/meson.build       | 6 ++++++
>  app/test-compress-perf/meson.build | 6 ++++++
>  app/test-crypto-perf/meson.build   | 6 ++++++
>  app/test-eventdev/meson.build      | 6 ++++++
>  app/test-fib/meson.build           | 6 ++++++
>  app/test-flow-perf/meson.build     | 6 ++++++
>  app/test-pipeline/meson.build      | 6 ++++++
>  app/test-regex/meson.build         | 6 ++++++
>  app/test-sad/meson.build           | 6 ++++++
>  app/test/meson.build               | 6 ++++++
>  15 files changed, 84 insertions(+), 4 deletions(-)
> 

Acked-by: Tal Shnaiderman <talshn@nvidia.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 09/10] app/testpmd: fix unused function warnings
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-05-03 17:43                     ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:43 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 09/10] app/testpmd: fix unused function warnings
> 
> External email: Use caution opening links or attachments
> 
> 
> Function print_fdir_mask and print_fdir_flex_payload is only called when
> either i40e or ixgbe presents. Add #if defined to remove "unused function"
> compilation warning.
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
>  1 file changed, 41 insertions(+), 41 deletions(-)
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> c626d5ce8..4eecad38f 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -4365,6 +4365,47 @@ set_record_burst_stats(uint8_t on_off)
>         record_burst_stats = on_off;
>  }
> 
> +static char*
> +flowtype_to_str(uint16_t flow_type)
> +{
> +       struct flow_type_info {
> +               char str[32];
> +               uint16_t ftype;
> +       };
> +
> +       uint8_t i;
> +       static struct flow_type_info flowtype_str_table[] = {
> +               {"raw", RTE_ETH_FLOW_RAW},
> +               {"ipv4", RTE_ETH_FLOW_IPV4},
> +               {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
> +               {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
> +               {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
> +               {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
> +               {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
> +               {"ipv6", RTE_ETH_FLOW_IPV6},
> +               {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
> +               {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
> +               {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
> +               {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
> +               {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
> +               {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
> +               {"port", RTE_ETH_FLOW_PORT},
> +               {"vxlan", RTE_ETH_FLOW_VXLAN},
> +               {"geneve", RTE_ETH_FLOW_GENEVE},
> +               {"nvgre", RTE_ETH_FLOW_NVGRE},
> +               {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
> +       };
> +
> +       for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
> +               if (flowtype_str_table[i].ftype == flow_type)
> +                       return flowtype_str_table[i].str;
> +       }
> +
> +       return NULL;
> +}
> +
> +#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
> +
>  static inline void
>  print_fdir_mask(struct rte_eth_fdir_masks *mask)  { @@ -4424,47 +4465,6
> @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf,
> uint32_t num)
>         printf("\n");
>  }
> 
> -static char *
> -flowtype_to_str(uint16_t flow_type)
> -{
> -       struct flow_type_info {
> -               char str[32];
> -               uint16_t ftype;
> -       };
> -
> -       uint8_t i;
> -       static struct flow_type_info flowtype_str_table[] = {
> -               {"raw", RTE_ETH_FLOW_RAW},
> -               {"ipv4", RTE_ETH_FLOW_IPV4},
> -               {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
> -               {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
> -               {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
> -               {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
> -               {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
> -               {"ipv6", RTE_ETH_FLOW_IPV6},
> -               {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
> -               {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
> -               {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
> -               {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
> -               {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
> -               {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
> -               {"port", RTE_ETH_FLOW_PORT},
> -               {"vxlan", RTE_ETH_FLOW_VXLAN},
> -               {"geneve", RTE_ETH_FLOW_GENEVE},
> -               {"nvgre", RTE_ETH_FLOW_NVGRE},
> -               {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
> -       };
> -
> -       for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
> -               if (flowtype_str_table[i].ftype == flow_type)
> -                       return flowtype_str_table[i].str;
> -       }
> -
> -       return NULL;
> -}
> -
> -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
> -
>  static inline void
>  print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t
> num)  {
> --
> 2.30.0.vfs.0.2

Acked-by: Tal Shnaiderman <talshn@nvidia.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 03/10] eal/windows: add device event stubs
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-05-03 17:43                     ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:43 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 03/10] eal/windows: add device event stubs
> 
> External email: Use caution opening links or attachments
> 
> 
> Add device event stubs in eal_dev.c for Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
>  lib/eal/windows/meson.build |  1 +
>  2 files changed, 34 insertions(+)
>  create mode 100644 lib/eal/windows/eal_dev.c
> 
> diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c new file
> mode 100644 index 000000000..35191056f
> --- /dev/null
> +++ b/lib/eal/windows/eal_dev.c
> @@ -0,0 +1,33 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2021 Microsoft Corporation  */
> +
> +#include <rte_dev.h>
> +
> +int
> +rte_dev_event_monitor_start(void)
> +{
> +       RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
> +       return -1;
> +}
> +
> +int
> +rte_dev_event_monitor_stop(void)
> +{
> +       RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
> +       return -1;
> +}
> +
> +int
> +rte_dev_hotplug_handle_enable(void)
> +{
> +       RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
> +       return -1;
> +}
> +
> +int
> +rte_dev_hotplug_handle_disable(void)
> +{
> +       RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
> +       return -1;
> +}
> diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
> index ff9cbec41..fc12fefd0 100644
> --- a/lib/eal/windows/meson.build
> +++ b/lib/eal/windows/meson.build
> @@ -7,6 +7,7 @@ sources += files(
>          'eal.c',
>          'eal_alarm.c',
>          'eal_debug.c',
> +        'eal_dev.c',
>          'eal_file.c',
>          'eal_hugepages.c',
>          'eal_interrupts.c',
> --
> 2.30.0.vfs.0.2

Acked-by: Tal Shnaiderman <talshn@nvidia.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 08/10] app/testpmd: fix headers inclusion
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-05-03 17:44                     ` Tal Shnaiderman
  0 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-03 17:44 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

> Subject: [PATCH v9 08/10] app/testpmd: fix headers inclusion
> 
> External email: Use caution opening links or attachments
> 
> 
> - Include rte_os_shim.h in testpmd.h
> - Remove redundant headers
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/cmdline.c      | 3 ---
>  app/test-pmd/cmdline_flow.c | 2 --
>  app/test-pmd/parameters.c   | 1 -
>  app/test-pmd/testpmd.h      | 1 +
>  4 files changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> f0636ca9b..2fbef3320 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -10,9 +10,6 @@
>  #include <string.h>
>  #include <unistd.h>
>  #include <inttypes.h>
> -#include <sys/socket.h>
> -#include <netinet/in.h>
> -
>  #include <sys/queue.h>
> 
>  #include <rte_common.h>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 888b9179b..a3cd4773a 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -10,8 +10,6 @@
>  #include <errno.h>
>  #include <ctype.h>
>  #include <string.h>
> -#include <arpa/inet.h>
> -#include <sys/socket.h>
> 
>  #include <rte_string_fns.h>
>  #include <rte_common.h>
> diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index
> 4c3cbbac3..5e69d2aa8 100644
> --- a/app/test-pmd/parameters.c
> +++ b/app/test-pmd/parameters.c
> @@ -19,7 +19,6 @@
>  #include <stdint.h>
>  #include <unistd.h>
>  #include <inttypes.h>
> -#include <arpa/inet.h>
> 
>  #include <rte_common.h>
>  #include <rte_byteorder.h>
> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index
> a4115861b..f96eec71a 100644
> --- a/app/test-pmd/testpmd.h
> +++ b/app/test-pmd/testpmd.h
> @@ -11,6 +11,7 @@
>  #include <rte_bus_pci.h>
>  #include <rte_gro.h>
>  #include <rte_gso.h>
> +#include <rte_os_shim.h>
>  #include <cmdline.h>
>  #include <sys/queue.h>
> 
> --
> 2.30.0.vfs.0.2

Acked-by: Tal Shnaiderman <talshn@nvidia.com>


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 01/10] lib: build libraries that testpmd depends on
  2021-05-03 17:36                     ` Tal Shnaiderman
@ 2021-05-03 21:38                       ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-03 21:38 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

On Mon, May 03, 2021 at 05:36:30PM +0000, Tal Shnaiderman wrote:
> > Subject: [PATCH v9 01/10] lib: build libraries that testpmd depends on
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> > Enable building libraries that testpmd depends on
> > 
> 
> You should mention the change is for Windows only.

Will explicitly mention the change is for Windows only in V10.

> 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  lib/meson.build | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/lib/meson.build b/lib/meson.build index c9a20f65b..2d499b238
> > 100644
> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -76,8 +76,15 @@ if is_windows
> >              'ethdev',
> >              'pci',
> >              'cmdline',
> > +            'metrics',
> >              'hash',
> > +            'timer',
> > +            'bitratestats',
> >              'cfgfile',
> > +            'gro',
> > +            'gso',
> > +            'latencystats',
> > +            'pdump',
> >      ] # only supported libraries for windows  endif
> > 
> > --
> > 2.30.0.vfs.0.2

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 07/10] app/testpmd: replace POSIX specific code
  2021-05-03 17:37                     ` Tal Shnaiderman
@ 2021-05-03 21:41                       ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-03 21:41 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

On Mon, May 03, 2021 at 05:37:52PM +0000, Tal Shnaiderman wrote:
> > Subject: [PATCH v9 07/10] app/testpmd: replace POSIX specific code
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> > - Make printf format OS independent
> >  - Replace htons with RTE_BE16
> >  - Replace POSIX specific inet_aton with OS independent inet_pton
> >  - Replace sleep with rte_delay_us_sleep
> >  - Repalce random with rte_rand
> >  - #ifndef mman related code for now
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  app/test-pmd/cmdline.c     |  3 +--
> >  app/test-pmd/csumonly.c    |  2 +-
> >  app/test-pmd/icmpecho.c    |  4 ++--
> >  app/test-pmd/ieee1588fwd.c |  8 ++++----  app/test-pmd/parameters.c  |
> > 10 +++++++---
> >  app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
> >  app/test-pmd/testpmd.h     |  2 +-
> >  7 files changed, 36 insertions(+), 14 deletions(-)
> > 
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > d804ee233..f0636ca9b 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> 
> <snip>
> 
> > @@ -8,7 +8,6 @@
> > @@ pmd_test_exit(void)
> >                                                      NULL);
> >                 }
> >         }
> > +#endif
> >         if (ports != NULL) {
> >                 no_link_check = 1;
> >                 RTE_ETH_FOREACH_DEV(pt_id) { @@ -3762,7 +3777,9 @@
> > signal_handler(int signum)
> >                 f_quit = 1;
> >                 /* exit with the expected status */
> >                 signal(signum, SIG_DFL);
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >                 kill(getpid(), signum);
> > +#endif
> 
> signal() doesn't need to be inside the ifndef?

Should be. Thanks for spotting that.

> 
> >         }
> >  }
> > 
> > @@ -3837,10 +3854,12 @@ main(int argc, char** argv)
> >         if (argc > 1)
> >                 launch_args_parse(argc, argv);
> > 
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >         if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
> >                 TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
> >                         strerror(errno));
> >         }
> > +#endif
> > 
> >         if (tx_first && interactive)
> >                 rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
> > @@ -3961,7 +3980,7 @@ main(int argc, char** argv)
> >                                 }
> >                                 /* Sleep to avoid unnecessary checks */
> >                                 prev_time = cur_time;
> > -                               sleep(1);
> > +                               rte_delay_us_sleep(1000000);
> 
> Please use US_PER_S

Fix is V10. Thanks.

> 
> >                         }
> >                 }
> > 
> > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index
> > 1d104213b..a4115861b 100644
> > --- a/app/test-pmd/testpmd.h
> > +++ b/app/test-pmd/testpmd.h
> > @@ -763,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t
> > nb_tx)  }
> > 
> >  /* Prototypes */
> > -unsigned int parse_item_list(char* str, const char* item_name,
> > +unsigned int parse_item_list(const char *str, const char *item_name,
> >                         unsigned int max_items,
> >                         unsigned int *parsed_items, int check_unique_values);  void
> > launch_args_parse(int argc, char** argv);
> > --
> > 2.30.0.vfs.0.2

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type
  2021-05-03 17:38                     ` Tal Shnaiderman
@ 2021-05-03 21:43                       ` Jie Zhou
  2021-05-03 22:53                         ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-03 21:43 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

On Mon, May 03, 2021 at 05:38:21PM +0000, Tal Shnaiderman wrote:
> > Subject: [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type
> > 
> 
> I think you should name this patch " app/testpmd: fix parse_fec_mode misleading return type name"
> 
> Do we need a fixes/CC stable tags here?

Will add CC stable, but not sure how to find the original patch which introduced this.

> 
> > External email: Use caution opening links or attachments
> > 
> > 
> > Fix parse_fec_mode to return fec_capa instead of mode
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  app/test-pmd/cmdline.c | 6 +++---
> >  app/test-pmd/config.c  | 4 ++--
> >  app/test-pmd/testpmd.h | 2 +-
> >  3 files changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > 12efbc0ca..d804ee233 100644
> > --- a/app/test-pmd/cmdline.c
> > +++ b/app/test-pmd/cmdline.c
> > @@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(  {
> >         struct cmd_set_port_fec_mode *res = parsed_result;
> >         uint16_t port_id = res->port_id;
> > -       uint32_t mode;
> > +       uint32_t fec_capa;
> >         int ret;
> > 
> > -       ret = parse_fec_mode(res->fec_value, &mode);
> > +       ret = parse_fec_mode(res->fec_value, &fec_capa);
> >         if (ret < 0) {
> >                 printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
> >                         port_id);
> >                 return;
> >         }
> > 
> > -       ret = rte_eth_fec_set(port_id, mode);
> > +       ret = rte_eth_fec_set(port_id, fec_capa);
> >         if (ret == -ENOTSUP) {
> >                 printf("Function not implemented\n");
> >                 return;
> > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> > 0e86ed02f..c626d5ce8 100644
> > --- a/app/test-pmd/config.c
> > +++ b/app/test-pmd/config.c
> > @@ -3549,13 +3549,13 @@ set_tx_pkt_split(const char *name)  }
> > 
> >  int
> > -parse_fec_mode(const char *name, uint32_t *mode)
> > +parse_fec_mode(const char *name, uint32_t *fec_capa)
> >  {
> >         uint8_t i;
> > 
> >         for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
> >                 if (strcmp(fec_mode_name[i].name, name) == 0) {
> > -                       *mode =
> > RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
> > +                       *fec_capa =
> > + RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
> >                         return 0;
> >                 }
> >         }
> > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index
> > 6ca872db8..1d104213b 100644
> > --- a/app/test-pmd/testpmd.h
> > +++ b/app/test-pmd/testpmd.h
> > @@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);  void
> > set_tx_pkt_times(unsigned int *tx_times);  void show_tx_pkt_times(void);
> > void set_tx_pkt_split(const char *name); -int parse_fec_mode(const char
> > *name, enum rte_eth_fec_mode *mode);
> > +int parse_fec_mode(const char *name, uint32_t *fec_capa);
> >  void show_fec_capability(uint32_t num, struct rte_eth_fec_capa
> > *speed_fec_capa);  void set_nb_pkt_per_burst(uint16_t pkt_burst);  char
> > *list_pkt_forwarding_modes(void);
> > --
> > 2.30.0.vfs.0.2

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type
  2021-05-03 21:43                       ` Jie Zhou
@ 2021-05-03 22:53                         ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-03 22:53 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev

On Mon, May 03, 2021 at 02:43:32PM -0700, Jie Zhou wrote:
> On Mon, May 03, 2021 at 05:38:21PM +0000, Tal Shnaiderman wrote:
> > > Subject: [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type
> > > 
> > 
> > I think you should name this patch " app/testpmd: fix parse_fec_mode misleading return type name"
> > 
> > Do we need a fixes/CC stable tags here?
> 
> Will add CC stable, but not sure how to find the original patch which introduced this.

Found the patch which introduced this. Will add the Fixes and Cc in V10.
> 
> > 
> > > External email: Use caution opening links or attachments
> > > 
> > > 
> > > Fix parse_fec_mode to return fec_capa instead of mode
> > > 
> > > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > > ---
> > >  app/test-pmd/cmdline.c | 6 +++---
> > >  app/test-pmd/config.c  | 4 ++--
> > >  app/test-pmd/testpmd.h | 2 +-
> > >  3 files changed, 6 insertions(+), 6 deletions(-)
> > > 
> > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> > > 12efbc0ca..d804ee233 100644
> > > --- a/app/test-pmd/cmdline.c
> > > +++ b/app/test-pmd/cmdline.c
> > > @@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(  {
> > >         struct cmd_set_port_fec_mode *res = parsed_result;
> > >         uint16_t port_id = res->port_id;
> > > -       uint32_t mode;
> > > +       uint32_t fec_capa;
> > >         int ret;
> > > 
> > > -       ret = parse_fec_mode(res->fec_value, &mode);
> > > +       ret = parse_fec_mode(res->fec_value, &fec_capa);
> > >         if (ret < 0) {
> > >                 printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
> > >                         port_id);
> > >                 return;
> > >         }
> > > 
> > > -       ret = rte_eth_fec_set(port_id, mode);
> > > +       ret = rte_eth_fec_set(port_id, fec_capa);
> > >         if (ret == -ENOTSUP) {
> > >                 printf("Function not implemented\n");
> > >                 return;
> > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index
> > > 0e86ed02f..c626d5ce8 100644
> > > --- a/app/test-pmd/config.c
> > > +++ b/app/test-pmd/config.c
> > > @@ -3549,13 +3549,13 @@ set_tx_pkt_split(const char *name)  }
> > > 
> > >  int
> > > -parse_fec_mode(const char *name, uint32_t *mode)
> > > +parse_fec_mode(const char *name, uint32_t *fec_capa)
> > >  {
> > >         uint8_t i;
> > > 
> > >         for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
> > >                 if (strcmp(fec_mode_name[i].name, name) == 0) {
> > > -                       *mode =
> > > RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
> > > +                       *fec_capa =
> > > + RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
> > >                         return 0;
> > >                 }
> > >         }
> > > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index
> > > 6ca872db8..1d104213b 100644
> > > --- a/app/test-pmd/testpmd.h
> > > +++ b/app/test-pmd/testpmd.h
> > > @@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);  void
> > > set_tx_pkt_times(unsigned int *tx_times);  void show_tx_pkt_times(void);
> > > void set_tx_pkt_split(const char *name); -int parse_fec_mode(const char
> > > *name, enum rte_eth_fec_mode *mode);
> > > +int parse_fec_mode(const char *name, uint32_t *fec_capa);
> > >  void show_fec_capability(uint32_t num, struct rte_eth_fec_capa
> > > *speed_fec_capa);  void set_nb_pkt_per_burst(uint16_t pkt_burst);  char
> > > *list_pkt_forwarding_modes(void);
> > > --
> > > 2.30.0.vfs.0.2

^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable testpmd on Windows
  2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
                                     ` (9 preceding siblings ...)
  2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-05-04  0:33                   ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 01/10] lib: build libraries that testpmd depends on Jie Zhou
                                       ` (12 more replies)
  10 siblings, 13 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:33 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

---
V10 changes:
    - Remove unneeded newline in config.c
    - Add Fixes: and Cc: Stable for parse_fec_mode fix
    - More appropriate and granular commit messages
    - Use US_PER_S
    - Put signal inside ifndef

---
V9 changes:
    - Add clock_gettime for Windows into eal in rte_os_shim.h

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---

Jie Zhou (10):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  eal/Windows: add clock_gettime on Windows
  app/testpmd: resolve name collisions
  app/testpmd: fix parse_fec_mode return type name
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  86 ++---
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |  47 +++
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 28 files changed, 512 insertions(+), 327 deletions(-)
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 01/10] lib: build libraries that testpmd depends on
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 02/10] eal/windows: add necessary macros Jie Zhou
                                       ` (11 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Enable building libraries that testpmd depends on for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index c9a20f65b..2d499b238 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 02/10] eal/windows: add necessary macros
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 03/10] eal/windows: add device event stubs Jie Zhou
                                       ` (10 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 433fa02c4..e60f27400 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -20,6 +20,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -36,6 +37,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 03/10] eal/windows: add device event stubs
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 01/10] lib: build libraries that testpmd depends on Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
                                       ` (9 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec41..fc12fefd0 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 04/10] eal/Windows: add clock_gettime on Windows
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (2 preceding siblings ...)
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 05/10] app/testpmd: resolve name collisions Jie Zhou
                                       ` (8 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add clock_gettime on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 38 +++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index e60f27400..ec1087290 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -75,4 +75,42 @@ rte_timespec_get(struct timespec *now, int base)
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME                  0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC                 1
+/* High-resolution timer from the CPU. */
+#define CLOCK_PROCESS_CPUTIME_ID        2
+/* Thread-specific CPU-time clock. */
+#define CLOCK_THREAD_CPUTIME_ID         3
+
+#define NS_PER_SEC 1E9
+
+typedef int clockid_t;
+
+static inline int
+rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+		return 0;
+	case CLOCK_MONOTONIC:
+		if (QueryPerformanceFrequency(&pf) == 0)
+			return -1;
+		if (QueryPerformanceCounter(&pc) == 0)
+			return -1;
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+		return 0;
+	default:
+		return -1;
+	}
+}
+#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 05/10] app/testpmd: resolve name collisions
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (3 preceding siblings ...)
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
                                       ` (7 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 594734199..888b9179b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -890,14 +890,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -908,7 +908,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1911,111 +1911,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2046,7 +2046,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2061,7 +2061,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2075,42 +2075,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2118,8 +2118,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2128,22 +2128,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2160,14 +2160,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2175,21 +2175,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2197,7 +2197,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2212,7 +2212,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2229,7 +2229,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2240,54 +2240,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2354,7 +2354,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2374,7 +2374,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2388,7 +2388,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2402,7 +2402,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2415,7 +2415,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2428,34 +2428,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2474,25 +2474,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2506,41 +2506,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2554,49 +2554,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2610,7 +2610,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2618,7 +2618,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2626,35 +2626,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2668,28 +2668,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2703,14 +2703,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2724,21 +2724,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2752,28 +2752,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2787,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2800,7 +2800,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2815,7 +2815,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2828,7 +2828,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2836,7 +2836,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2859,7 +2859,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2869,14 +2869,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2884,7 +2884,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2922,20 +2922,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2962,20 +2962,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2991,7 +2991,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3006,7 +3006,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3014,7 +3014,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3061,7 +3061,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3069,7 +3069,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3092,14 +3092,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3114,7 +3114,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3165,7 +3165,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3183,7 +3183,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3198,7 +3198,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3212,7 +3212,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3226,14 +3226,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3254,7 +3254,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3263,7 +3263,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3280,14 +3280,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3301,13 +3301,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3322,7 +3322,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3336,7 +3336,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3350,7 +3350,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3363,14 +3363,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3403,7 +3403,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3451,21 +3451,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3473,7 +3473,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3491,21 +3491,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3551,7 +3551,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3565,7 +3565,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3587,7 +3587,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3609,14 +3609,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3660,7 +3660,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3681,7 +3681,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3696,7 +3696,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3734,7 +3734,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3742,7 +3742,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3757,7 +3757,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3765,7 +3765,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3804,7 +3804,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3820,7 +3820,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3844,7 +3844,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3889,7 +3889,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3907,7 +3907,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3925,7 +3925,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3942,7 +3942,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3960,7 +3960,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4068,7 +4068,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4085,7 +4085,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4102,7 +4102,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4119,7 +4119,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4136,7 +4136,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4153,7 +4153,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4184,7 +4184,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4216,7 +4216,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4245,7 +4245,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4259,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4273,7 +4273,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4356,7 +4356,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4364,7 +4364,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4385,7 +4385,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4393,7 +4393,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4402,7 +4402,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4484,14 +4484,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4499,7 +4499,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4515,7 +4515,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4523,7 +4523,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4539,7 +4539,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4555,7 +4555,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4573,7 +4573,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4587,7 +4587,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4601,7 +4601,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4640,7 +4640,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4650,7 +4650,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4734,8 +4734,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5092,34 +5092,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5200,7 +5200,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 06/10] app/testpmd: fix parse_fec_mode return type name
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (4 preceding siblings ...)
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 05/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code Jie Zhou
                                       ` (6 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Replace parse_fec_mode misleading return type name mode with fec_capa

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 12efbc0ca..d804ee233 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e189062ef..099bfa3c9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3548,13 +3548,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6ca872db8..1d104213b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (5 preceding siblings ...)
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-05  8:34                       ` Tal Shnaiderman
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 08/10] app/testpmd: fix headers inclusion Jie Zhou
                                       ` (5 subsequent siblings)
  12 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d804ee233..f0636ca9b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3601,7 +3600,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d4be23f8f..d4a9f5b6b 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,6 +1068,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
@@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 	} else if (verbose_level > 0) {
 		rte_mempool_dump(stdout, rte_mp);
 	}
+#endif
 	return rte_mp;
 }
 
@@ -3055,6 +3068,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3062,6 +3076,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3761,8 +3776,10 @@ signal_handler(int signum)
 		/* Set flag to indicate the force termination. */
 		f_quit = 1;
 		/* exit with the expected status */
+#ifndef RTE_EXEC_ENV_WINDOWS
 		signal(signum, SIG_DFL);
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3837,10 +3854,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3961,7 +3980,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(US_PER_S);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d104213b..a4115861b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -763,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 08/10] app/testpmd: fix headers inclusion
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (6 preceding siblings ...)
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 09/10] app/testpmd: fix unused function warnings Jie Zhou
                                       ` (4 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f0636ca9b..2fbef3320 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 888b9179b..a3cd4773a 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a4115861b..f96eec71a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 09/10] app/testpmd: fix unused function warnings
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (7 preceding siblings ...)
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
                                       ` (3 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 099bfa3c9..7c908ea48 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4364,6 +4364,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4423,47 +4464,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v10 10/10] app/testpmd: enable building testpmd on Windows
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (8 preceding siblings ...)
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-05-04  0:34                     ` Jie Zhou
  2021-05-04  7:31                     ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Thomas Monjalon
                                       ` (2 subsequent siblings)
  12 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-04  0:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861b..4c6049807 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f..edb9deef8 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9..f29c6ee86 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b791..ef3582a87 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 04117dbe4..08a3ba78a 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036..a33cad907 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f8323..7d123e32f 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 08c82d3d2..2953afc8b 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable testpmd on Windows
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (9 preceding siblings ...)
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-05-04  7:31                     ` Thomas Monjalon
  2021-05-05 16:00                       ` Jie Zhou
  2021-05-04 23:51                     ` Kadam, Pallavi
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
  12 siblings, 1 reply; 232+ messages in thread
From: Thomas Monjalon @ 2021-05-04  7:31 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable,
	talshn, Harini Ramakrishnan

When you receive an ack in previous versions,
you should add it manually in your patch
so we keep track of it.




^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable testpmd on Windows
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (10 preceding siblings ...)
  2021-05-04  7:31                     ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Thomas Monjalon
@ 2021-05-04 23:51                     ` Kadam, Pallavi
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
  12 siblings, 0 replies; 232+ messages in thread
From: Kadam, Pallavi @ 2021-05-04 23:51 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable


On 5/3/2021 5:33 PM, Jie Zhou wrote:
> This patchset is to enable testpmd on windows. It mainly includes:
> - Enable building libraries on Windows that testpmd depends on
> - Add necessary macros required by testpmd on Windows in rte_os_shim.h
> - Add device event stubs for Windows
> - Resolve name collisions with Windows types
> - Add clock_gettime in testpmd on Windows
> - Fix parse_fec_mode to return fec_capa instead of mode
> - Replace POSIX specific codes
> - Disable unsupported Apps build on Windows
> - Enable testpmd build on Windows
>
> Future work:
> - Some issues discovered at validation need further investigations
>    * Perf inconsistency: TPUT fluctuated significantly from runs
>    * After traffic stop, port stats shows pps being 0 while bps not
>    * mempool allocation only succeed with native. Other methods failed
>      at rte_mem_lock/VirtualLock.
> - Hot-plug on Windows not supported yet
> - Support mempool allocation native mode only for now
>
> ---

Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code
  2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-05-05  8:34                       ` Tal Shnaiderman
  2021-05-05 16:09                         ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-05  8:34 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

> Subject: [PATCH v10 07/10] app/testpmd: replace POSIX specific code
> 
> External email: Use caution opening links or attachments
> 
> 
>  - Make printf format OS independent
>  - Replace htons with RTE_BE16
>  - Replace POSIX specific inet_aton with OS independent inet_pton
>  - Replace sleep with rte_delay_us_sleep
>  - Repalce random with rte_rand
>  - #ifndef mman related code for now

Do you think we can reduce the number of ifndefs by using the functions rte_mem_map, rte_mem_lock?

> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  app/test-pmd/cmdline.c     |  3 +--
>  app/test-pmd/csumonly.c    |  2 +-
>  app/test-pmd/icmpecho.c    |  4 ++--
>  app/test-pmd/ieee1588fwd.c |  8 ++++----  app/test-pmd/parameters.c  |
> 10 +++++++---
>  app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
>  app/test-pmd/testpmd.h     |  2 +-
>  7 files changed, 36 insertions(+), 14 deletions(-)
> 

<snip>

> @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
>                 }
>         }
> 
> +#ifndef RTE_EXEC_ENV_WINDOWS
>  err:
>         if (rte_mp == NULL) {
>                 rte_exit(EXIT_FAILURE,
> @@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size,
> unsigned nb_mbuf,
>         } else if (verbose_level > 0) {
>                 rte_mempool_dump(stdout, rte_mp);
>         }
> +#endif

Why do we need the err flow ifndef'ed?  Isn't it needed in the MP_ALLOC_NATIVE case?

>         return rte_mp;
>  }
> 

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable testpmd on Windows
  2021-05-04  7:31                     ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Thomas Monjalon
@ 2021-05-05 16:00                       ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable,
	talshn, Harini Ramakrishnan

On Tue, May 04, 2021 at 09:31:08AM +0200, Thomas Monjalon wrote:
> When you receive an ack in previous versions,
> you should add it manually in your patch
> so we keep track of it.
> 

Will send out V11 with adding back the acked-by from V9. Thanks.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code
  2021-05-05  8:34                       ` Tal Shnaiderman
@ 2021-05-05 16:09                         ` Jie Zhou
  2021-05-05 16:41                           ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 16:09 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

On Wed, May 05, 2021 at 08:34:34AM +0000, Tal Shnaiderman wrote:
> > Subject: [PATCH v10 07/10] app/testpmd: replace POSIX specific code
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> >  - Make printf format OS independent
> >  - Replace htons with RTE_BE16
> >  - Replace POSIX specific inet_aton with OS independent inet_pton
> >  - Replace sleep with rte_delay_us_sleep
> >  - Repalce random with rte_rand
> >  - #ifndef mman related code for now
> 
> Do you think we can reduce the number of ifndefs by using the functions rte_mem_map, rte_mem_lock?

I used rte_mem_xxx APIs in V3. DmitryK pointed out that Apps except unit tests should not use these internal APIs, and also rte_mem_map does not support hugepage with different sized. Given that, decided to work on the mman related part in a future separate patch.

> 
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  app/test-pmd/cmdline.c     |  3 +--
> >  app/test-pmd/csumonly.c    |  2 +-
> >  app/test-pmd/icmpecho.c    |  4 ++--
> >  app/test-pmd/ieee1588fwd.c |  8 ++++----  app/test-pmd/parameters.c  |
> > 10 +++++++---
> >  app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
> >  app/test-pmd/testpmd.h     |  2 +-
> >  7 files changed, 36 insertions(+), 14 deletions(-)
> > 
> 
> <snip>
> 
> > @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
> >                 }
> >         }
> > 
> > +#ifndef RTE_EXEC_ENV_WINDOWS
> >  err:
> >         if (rte_mp == NULL) {
> >                 rte_exit(EXIT_FAILURE,
> > @@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size,
> > unsigned nb_mbuf,
> >         } else if (verbose_level > 0) {
> >                 rte_mempool_dump(stdout, rte_mp);
> >         }
> > +#endif
> 
> Why do we need the err flow ifndef'ed?  Isn't it needed in the MP_ALLOC_NATIVE case?

err: is not reachable from the MP_ALLOC_NATIVE.

> >         return rte_mp;
> >  }
> > 

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code
  2021-05-05 16:09                         ` Jie Zhou
@ 2021-05-05 16:41                           ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 16:41 UTC (permalink / raw)
  To: Tal Shnaiderman
  Cc: dev, dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

On Wed, May 05, 2021 at 09:09:20AM -0700, Jie Zhou wrote:
> On Wed, May 05, 2021 at 08:34:34AM +0000, Tal Shnaiderman wrote:
> > > Subject: [PATCH v10 07/10] app/testpmd: replace POSIX specific code
> > > 
> > > External email: Use caution opening links or attachments
> > > 
> > > 
> > >  - Make printf format OS independent
> > >  - Replace htons with RTE_BE16
> > >  - Replace POSIX specific inet_aton with OS independent inet_pton
> > >  - Replace sleep with rte_delay_us_sleep
> > >  - Repalce random with rte_rand
> > >  - #ifndef mman related code for now
> > 
> > Do you think we can reduce the number of ifndefs by using the functions rte_mem_map, rte_mem_lock?
> 
> I used rte_mem_xxx APIs in V3. DmitryK pointed out that Apps except unit tests should not use these internal APIs, and also rte_mem_map does not support hugepage with different sized. Given that, decided to work on the mman related part in a future separate patch.
> 
> > 
> > > 
> > > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > > ---
> > >  app/test-pmd/cmdline.c     |  3 +--
> > >  app/test-pmd/csumonly.c    |  2 +-
> > >  app/test-pmd/icmpecho.c    |  4 ++--
> > >  app/test-pmd/ieee1588fwd.c |  8 ++++----  app/test-pmd/parameters.c  |
> > > 10 +++++++---
> > >  app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
> > >  app/test-pmd/testpmd.h     |  2 +-
> > >  7 files changed, 36 insertions(+), 14 deletions(-)
> > > 
> > 
> > <snip>
> > 
> > > @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
> > >                 }
> > >         }
> > > 
> > > +#ifndef RTE_EXEC_ENV_WINDOWS
> > >  err:
> > >         if (rte_mp == NULL) {
> > >                 rte_exit(EXIT_FAILURE,
> > > @@ -1065,6 +1077,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size,
> > > unsigned nb_mbuf,
> > >         } else if (verbose_level > 0) {
> > >                 rte_mempool_dump(stdout, rte_mp);
> > >         }
> > > +#endif
> > 
> > Why do we need the err flow ifndef'ed?  Isn't it needed in the MP_ALLOC_NATIVE case?
> 

You are right. Will fix in V11. To avoid the unused err: lable warning, just need to ifndef the err: lable instead of the whole err flow. My mistake.

> 
> > >         return rte_mp;
> > >  }
> > > 

^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 00/10] app/testpmd: enable testpmd on Windows
  2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
                                       ` (11 preceding siblings ...)
  2021-05-04 23:51                     ` Kadam, Pallavi
@ 2021-05-05 17:18                     ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 01/10] lib: build libraries that testpmd depends on Jie Zhou
                                         ` (10 more replies)
  12 siblings, 11 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>

---
V11 changes:
    - Add Acked-by from V9 and V10
    - Fix an error at ifndef'ing err flow for MP_ALLOC_NATIVE

---
V10 changes:
    - Remove unneeded newline in config.c
    - Add Fixes: and Cc: Stable for parse_fec_mode fix
    - More appropriate and granular commit messages
    - Use US_PER_S
    - Put signal inside ifndef

---
V9 changes:
    - Add clock_gettime for Windows into eal in rte_os_shim.h

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---

Jie Zhou (10):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  eal/Windows: add clock_gettime on Windows
  app/testpmd: resolve name collisions
  app/testpmd: fix parse_fec_mode return type name
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  86 ++---
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  23 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |  47 +++
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 28 files changed, 513 insertions(+), 328 deletions(-)
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 01/10] lib: build libraries that testpmd depends on
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 02/10] eal/windows: add necessary macros Jie Zhou
                                         ` (9 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Enable building libraries that testpmd depends on for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index c9a20f65b..2d499b238 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 02/10] eal/windows: add necessary macros
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 03/10] eal/windows: add device event stubs Jie Zhou
                                         ` (8 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 433fa02c4..e60f27400 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -20,6 +20,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -36,6 +37,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 03/10] eal/windows: add device event stubs
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 01/10] lib: build libraries that testpmd depends on Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
                                         ` (7 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec41..fc12fefd0 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 04/10] eal/Windows: add clock_gettime on Windows
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
                                         ` (2 preceding siblings ...)
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 05/10] app/testpmd: resolve name collisions Jie Zhou
                                         ` (6 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add clock_gettime on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 38 +++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index e60f27400..ec1087290 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -75,4 +75,42 @@ rte_timespec_get(struct timespec *now, int base)
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME                  0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC                 1
+/* High-resolution timer from the CPU. */
+#define CLOCK_PROCESS_CPUTIME_ID        2
+/* Thread-specific CPU-time clock. */
+#define CLOCK_THREAD_CPUTIME_ID         3
+
+#define NS_PER_SEC 1E9
+
+typedef int clockid_t;
+
+static inline int
+rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+		return 0;
+	case CLOCK_MONOTONIC:
+		if (QueryPerformanceFrequency(&pf) == 0)
+			return -1;
+		if (QueryPerformanceCounter(&pc) == 0)
+			return -1;
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+		return 0;
+	default:
+		return -1;
+	}
+}
+#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 05/10] app/testpmd: resolve name collisions
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
                                         ` (3 preceding siblings ...)
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
                                         ` (5 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 594734199..888b9179b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -890,14 +890,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -908,7 +908,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1911,111 +1911,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2046,7 +2046,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2061,7 +2061,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2075,42 +2075,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2118,8 +2118,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2128,22 +2128,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2160,14 +2160,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2175,21 +2175,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2197,7 +2197,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2212,7 +2212,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2229,7 +2229,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2240,54 +2240,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2354,7 +2354,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2374,7 +2374,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2388,7 +2388,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2402,7 +2402,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2415,7 +2415,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2428,34 +2428,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2474,25 +2474,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2506,41 +2506,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2554,49 +2554,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2610,7 +2610,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2618,7 +2618,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2626,35 +2626,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2668,28 +2668,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2703,14 +2703,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2724,21 +2724,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2752,28 +2752,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2787,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2800,7 +2800,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2815,7 +2815,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2828,7 +2828,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2836,7 +2836,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2859,7 +2859,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2869,14 +2869,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2884,7 +2884,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2922,20 +2922,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2962,20 +2962,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2991,7 +2991,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3006,7 +3006,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3014,7 +3014,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3061,7 +3061,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3069,7 +3069,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3092,14 +3092,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3114,7 +3114,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3165,7 +3165,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3183,7 +3183,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3198,7 +3198,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3212,7 +3212,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3226,14 +3226,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3254,7 +3254,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3263,7 +3263,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3280,14 +3280,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3301,13 +3301,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3322,7 +3322,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3336,7 +3336,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3350,7 +3350,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3363,14 +3363,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3403,7 +3403,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3451,21 +3451,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3473,7 +3473,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3491,21 +3491,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3551,7 +3551,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3565,7 +3565,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3587,7 +3587,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3609,14 +3609,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3660,7 +3660,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3681,7 +3681,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3696,7 +3696,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3734,7 +3734,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3742,7 +3742,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3757,7 +3757,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3765,7 +3765,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3804,7 +3804,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3820,7 +3820,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3844,7 +3844,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3889,7 +3889,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3907,7 +3907,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3925,7 +3925,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3942,7 +3942,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3960,7 +3960,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4068,7 +4068,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4085,7 +4085,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4102,7 +4102,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4119,7 +4119,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4136,7 +4136,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4153,7 +4153,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4184,7 +4184,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4216,7 +4216,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4245,7 +4245,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4259,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4273,7 +4273,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4356,7 +4356,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4364,7 +4364,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4385,7 +4385,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4393,7 +4393,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4402,7 +4402,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4484,14 +4484,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4499,7 +4499,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4515,7 +4515,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4523,7 +4523,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4539,7 +4539,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4555,7 +4555,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4573,7 +4573,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4587,7 +4587,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4601,7 +4601,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4640,7 +4640,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4650,7 +4650,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4734,8 +4734,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5092,34 +5092,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5200,7 +5200,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 06/10] app/testpmd: fix parse_fec_mode return type name
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
                                         ` (4 preceding siblings ...)
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 05/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 07/10] app/testpmd: replace POSIX specific code Jie Zhou
                                         ` (4 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Replace parse_fec_mode misleading return type name mode with fec_capa

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 12efbc0ca..d804ee233 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e189062ef..099bfa3c9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3548,13 +3548,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6ca872db8..1d104213b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 07/10] app/testpmd: replace POSIX specific code
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
                                         ` (5 preceding siblings ...)
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 08/10] app/testpmd: fix headers inclusion Jie Zhou
                                         ` (3 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 23 +++++++++++++++++++++--
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 37 insertions(+), 15 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d804ee233..f0636ca9b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3601,7 +3600,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d4be23f8f..284f7dec6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,7 +1068,9 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
-err:
+#ifndef RTE_EXEC_ENV_WINDOWS
+	err:
+#endif
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
 			"Creation of mbuf pool for socket %u failed: %s\n",
@@ -3055,6 +3068,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3062,6 +3076,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3761,8 +3776,10 @@ signal_handler(int signum)
 		/* Set flag to indicate the force termination. */
 		f_quit = 1;
 		/* exit with the expected status */
+#ifndef RTE_EXEC_ENV_WINDOWS
 		signal(signum, SIG_DFL);
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3837,10 +3854,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3961,7 +3980,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(US_PER_S);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d104213b..a4115861b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -763,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 08/10] app/testpmd: fix headers inclusion
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
                                         ` (6 preceding siblings ...)
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 09/10] app/testpmd: fix unused function warnings Jie Zhou
                                         ` (2 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f0636ca9b..2fbef3320 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 888b9179b..a3cd4773a 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a4115861b..f96eec71a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 09/10] app/testpmd: fix unused function warnings
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
                                         ` (7 preceding siblings ...)
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 099bfa3c9..7c908ea48 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4364,6 +4364,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4423,47 +4464,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v11 10/10] app/testpmd: enable building testpmd on Windows
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
                                         ` (8 preceding siblings ...)
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-05-05 17:18                       ` Jie Zhou
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:18 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861b..4c6049807 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f..edb9deef8 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9..f29c6ee86 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b791..ef3582a87 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 04117dbe4..08a3ba78a 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036..a33cad907 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f8323..7d123e32f 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 08c82d3d2..2953afc8b 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable testpmd on Windows
  2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
                                         ` (9 preceding siblings ...)
  2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-05-05 17:36                       ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 01/10] lib: build libraries that testpmd depends on Jie Zhou
                                           ` (10 more replies)
  10 siblings, 11 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>

---
V12 changes:
    - Fix indentation

---
V11 changes:
    - Add Acked-by from V9 and V10
    - Fix an error at ifndef'ing err flow for MP_ALLOC_NATIVE

---
V10 changes:
    - Remove unneeded newline in config.c
    - Add Fixes: and Cc: Stable for parse_fec_mode fix
    - More appropriate and granular commit messages
    - Use US_PER_S
    - Put signal inside ifndef

---
V9 changes:
    - Add clock_gettime for Windows into eal in rte_os_shim.h

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---


Jie Zhou (10):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  eal/Windows: add clock_gettime on Windows
  app/testpmd: resolve name collisions
  app/testpmd: fix parse_fec_mode return type name
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  86 ++---
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |  47 +++
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 28 files changed, 512 insertions(+), 327 deletions(-)
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 01/10] lib: build libraries that testpmd depends on
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 02/10] eal/windows: add necessary macros Jie Zhou
                                           ` (9 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Enable building libraries that testpmd depends on for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index c9a20f65b..2d499b238 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 02/10] eal/windows: add necessary macros
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 03/10] eal/windows: add device event stubs Jie Zhou
                                           ` (8 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 433fa02c4..e60f27400 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -20,6 +20,7 @@
 
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 
 #define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
@@ -36,6 +37,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 03/10] eal/windows: add device event stubs
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 01/10] lib: build libraries that testpmd depends on Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
                                           ` (7 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec41..fc12fefd0 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 04/10] eal/Windows: add clock_gettime on Windows
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
                                           ` (2 preceding siblings ...)
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 05/10] app/testpmd: resolve name collisions Jie Zhou
                                           ` (6 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add clock_gettime on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 38 +++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index e60f27400..ec1087290 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -75,4 +75,42 @@ rte_timespec_get(struct timespec *now, int base)
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME                  0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC                 1
+/* High-resolution timer from the CPU. */
+#define CLOCK_PROCESS_CPUTIME_ID        2
+/* Thread-specific CPU-time clock. */
+#define CLOCK_THREAD_CPUTIME_ID         3
+
+#define NS_PER_SEC 1E9
+
+typedef int clockid_t;
+
+static inline int
+rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+		return 0;
+	case CLOCK_MONOTONIC:
+		if (QueryPerformanceFrequency(&pf) == 0)
+			return -1;
+		if (QueryPerformanceCounter(&pc) == 0)
+			return -1;
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+		return 0;
+	default:
+		return -1;
+	}
+}
+#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 05/10] app/testpmd: resolve name collisions
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
                                           ` (3 preceding siblings ...)
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
                                           ` (5 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 594734199..888b9179b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -890,14 +890,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -908,7 +908,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1911,111 +1911,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2046,7 +2046,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2061,7 +2061,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2075,42 +2075,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2118,8 +2118,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2128,22 +2128,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2160,14 +2160,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2175,21 +2175,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2197,7 +2197,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2212,7 +2212,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2229,7 +2229,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2240,54 +2240,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2354,7 +2354,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2374,7 +2374,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2388,7 +2388,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2402,7 +2402,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2415,7 +2415,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2428,34 +2428,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2474,25 +2474,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2506,41 +2506,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2554,49 +2554,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2610,7 +2610,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2618,7 +2618,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2626,35 +2626,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2668,28 +2668,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2703,14 +2703,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2724,21 +2724,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2752,28 +2752,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2787,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2800,7 +2800,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2815,7 +2815,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2828,7 +2828,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2836,7 +2836,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2859,7 +2859,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2869,14 +2869,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2884,7 +2884,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2922,20 +2922,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2962,20 +2962,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2991,7 +2991,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3006,7 +3006,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3014,7 +3014,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3061,7 +3061,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3069,7 +3069,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3092,14 +3092,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3114,7 +3114,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3165,7 +3165,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3183,7 +3183,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3198,7 +3198,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3212,7 +3212,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3226,14 +3226,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3254,7 +3254,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3263,7 +3263,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3280,14 +3280,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3301,13 +3301,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3322,7 +3322,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3336,7 +3336,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3350,7 +3350,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3363,14 +3363,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3403,7 +3403,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3451,21 +3451,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3473,7 +3473,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3491,21 +3491,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3551,7 +3551,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3565,7 +3565,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3587,7 +3587,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3609,14 +3609,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3660,7 +3660,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3681,7 +3681,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3696,7 +3696,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3734,7 +3734,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3742,7 +3742,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3757,7 +3757,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3765,7 +3765,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3804,7 +3804,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3820,7 +3820,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3844,7 +3844,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3889,7 +3889,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3907,7 +3907,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3925,7 +3925,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3942,7 +3942,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3960,7 +3960,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4068,7 +4068,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4085,7 +4085,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4102,7 +4102,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4119,7 +4119,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4136,7 +4136,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4153,7 +4153,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4184,7 +4184,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4216,7 +4216,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4245,7 +4245,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4259,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4273,7 +4273,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4356,7 +4356,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4364,7 +4364,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4385,7 +4385,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4393,7 +4393,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4402,7 +4402,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4484,14 +4484,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4499,7 +4499,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4515,7 +4515,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4523,7 +4523,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4539,7 +4539,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4555,7 +4555,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4573,7 +4573,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4587,7 +4587,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4601,7 +4601,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4640,7 +4640,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4650,7 +4650,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4734,8 +4734,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5092,34 +5092,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5200,7 +5200,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 06/10] app/testpmd: fix parse_fec_mode return type name
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
                                           ` (4 preceding siblings ...)
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 05/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 07/10] app/testpmd: replace POSIX specific code Jie Zhou
                                           ` (4 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Replace parse_fec_mode misleading return type name mode with fec_capa

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 12efbc0ca..d804ee233 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16984,17 +16984,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e189062ef..099bfa3c9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3548,13 +3548,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 6ca872db8..1d104213b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -886,7 +886,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 07/10] app/testpmd: replace POSIX specific code
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
                                           ` (5 preceding siblings ...)
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 08/10] app/testpmd: fix headers inclusion Jie Zhou
                                           ` (3 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d804ee233..f0636ca9b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3601,7 +3600,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index d4be23f8f..5feb4d8c8 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -632,6 +637,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -902,6 +908,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -972,9 +979,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -991,6 +1000,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1031,6 +1041,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1057,7 +1068,9 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
+#endif
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
 			"Creation of mbuf pool for socket %u failed: %s\n",
@@ -3055,6 +3068,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3062,6 +3076,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3761,8 +3776,10 @@ signal_handler(int signum)
 		/* Set flag to indicate the force termination. */
 		f_quit = 1;
 		/* exit with the expected status */
+#ifndef RTE_EXEC_ENV_WINDOWS
 		signal(signum, SIG_DFL);
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3837,10 +3854,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3961,7 +3980,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(US_PER_S);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1d104213b..a4115861b 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -763,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 08/10] app/testpmd: fix headers inclusion
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
                                           ` (6 preceding siblings ...)
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 09/10] app/testpmd: fix unused function warnings Jie Zhou
                                           ` (2 subsequent siblings)
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f0636ca9b..2fbef3320 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 888b9179b..a3cd4773a 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index a4115861b..f96eec71a 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 09/10] app/testpmd: fix unused function warnings
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
                                           ` (7 preceding siblings ...)
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 099bfa3c9..7c908ea48 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4364,6 +4364,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4423,47 +4464,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v12 10/10] app/testpmd: enable building testpmd on Windows
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
                                           ` (8 preceding siblings ...)
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-05-05 17:36                         ` Jie Zhou
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
  10 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 17:36 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861b..4c6049807 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f..edb9deef8 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9..f29c6ee86 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b791..ef3582a87 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 04117dbe4..08a3ba78a 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036..a33cad907 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f8323..7d123e32f 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 08c82d3d2..2953afc8b 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable testpmd on Windows
  2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
                                           ` (9 preceding siblings ...)
  2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-05-05 19:12                         ` Jie Zhou
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 01/10] lib: build libraries that testpmd depends on Jie Zhou
                                             ` (11 more replies)
  10 siblings, 12 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>

---
V13 changes:
    - Resolve a patchset apply issue in patch2

---
V12 changes:
    - Fix indentation

---
V11 changes:
    - Add Acked-by from V9 and V10
    - Fix an error at ifndef'ing err flow for MP_ALLOC_NATIVE

---
V10 changes:
    - Remove unneeded newline in config.c
    - Add Fixes: and Cc: Stable for parse_fec_mode fix
    - More appropriate and granular commit messages
    - Use US_PER_S
    - Put signal inside ifndef

---
V9 changes:
    - Add clock_gettime for Windows into eal in rte_os_shim.h

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---

Jie Zhou (10):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  eal/Windows: add clock_gettime on Windows
  app/testpmd: resolve name collisions
  app/testpmd: fix parse_fec_mode return type name
  app/testpmd: replace POSIX specific code
  app/testpmd: fix headers inclusion
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  86 ++---
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |  47 +++
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 28 files changed, 512 insertions(+), 327 deletions(-)
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 01/10] lib: build libraries that testpmd depends on
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 02/10] eal/windows: add necessary macros Jie Zhou
                                             ` (10 subsequent siblings)
  11 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Enable building libraries that testpmd depends on for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index 64a59abab..3fd1ffa0b 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 02/10] eal/windows: add necessary macros
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 01/10] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-06-20 23:28                             ` Dmitry Kozlyuk
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 03/10] eal/windows: add device event stubs Jie Zhou
                                             ` (9 subsequent siblings)
  11 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 1b314733b..3763cae62 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -21,6 +21,7 @@
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
 #ifndef RTE_TOOLCHAIN_GCC
+#define strcasecmp _stricmp
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 #endif
 
@@ -38,6 +39,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 03/10] eal/windows: add device event stubs
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 01/10] lib: build libraries that testpmd depends on Jie Zhou
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-06-20 23:28                             ` Dmitry Kozlyuk
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
                                             ` (8 subsequent siblings)
  11 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 000000000..35191056f
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec41..fc12fefd0 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 04/10] eal/Windows: add clock_gettime on Windows
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (2 preceding siblings ...)
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-06-20 23:30                             ` Dmitry Kozlyuk
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 05/10] app/testpmd: resolve name collisions Jie Zhou
                                             ` (7 subsequent siblings)
  11 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Add clock_gettime on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 38 +++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 3763cae62..cd1f53dfa 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -77,4 +77,42 @@ rte_timespec_get(struct timespec *now, int base)
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME                  0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC                 1
+/* High-resolution timer from the CPU. */
+#define CLOCK_PROCESS_CPUTIME_ID        2
+/* Thread-specific CPU-time clock. */
+#define CLOCK_THREAD_CPUTIME_ID         3
+
+#define NS_PER_SEC 1E9
+
+typedef int clockid_t;
+
+static inline int
+rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+		return 0;
+	case CLOCK_MONOTONIC:
+		if (QueryPerformanceFrequency(&pf) == 0)
+			return -1;
+		if (QueryPerformanceCounter(&pc) == 0)
+			return -1;
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+		return 0;
+	default:
+		return -1;
+	}
+}
+#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 05/10] app/testpmd: resolve name collisions
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (3 preceding siblings ...)
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-06-20 23:30                             ` Dmitry Kozlyuk
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
                                             ` (6 subsequent siblings)
  11 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 594734199..888b9179b 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -890,14 +890,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -908,7 +908,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1911,111 +1911,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2046,7 +2046,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2061,7 +2061,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2075,42 +2075,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2118,8 +2118,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2128,22 +2128,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2160,14 +2160,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2175,21 +2175,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2197,7 +2197,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2212,7 +2212,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2229,7 +2229,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2240,54 +2240,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2354,7 +2354,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2374,7 +2374,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2388,7 +2388,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2402,7 +2402,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2415,7 +2415,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2428,34 +2428,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2474,25 +2474,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2506,41 +2506,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2554,49 +2554,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2610,7 +2610,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2618,7 +2618,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2626,35 +2626,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2668,28 +2668,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2703,14 +2703,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2724,21 +2724,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2752,28 +2752,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2787,7 +2787,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2800,7 +2800,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2815,7 +2815,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2828,7 +2828,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2836,7 +2836,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2859,7 +2859,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2869,14 +2869,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2884,7 +2884,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2892,7 +2892,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2922,20 +2922,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2962,20 +2962,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -2991,7 +2991,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3006,7 +3006,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3014,7 +3014,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3061,7 +3061,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3069,7 +3069,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3092,14 +3092,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3114,7 +3114,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3147,7 +3147,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3165,7 +3165,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3183,7 +3183,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3198,7 +3198,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3212,7 +3212,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3226,14 +3226,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3254,7 +3254,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3263,7 +3263,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3280,14 +3280,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3301,13 +3301,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3322,7 +3322,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3336,7 +3336,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3350,7 +3350,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3363,14 +3363,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3403,7 +3403,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3451,21 +3451,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3473,7 +3473,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3491,21 +3491,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3551,7 +3551,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3565,7 +3565,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3587,7 +3587,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3609,14 +3609,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3660,7 +3660,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3681,7 +3681,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3696,7 +3696,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3734,7 +3734,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3742,7 +3742,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3757,7 +3757,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3765,7 +3765,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3789,7 +3789,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3804,7 +3804,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3820,7 +3820,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3844,7 +3844,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3889,7 +3889,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3907,7 +3907,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3925,7 +3925,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3942,7 +3942,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -3960,7 +3960,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4068,7 +4068,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4085,7 +4085,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4102,7 +4102,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4119,7 +4119,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4136,7 +4136,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4153,7 +4153,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4184,7 +4184,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4216,7 +4216,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4245,7 +4245,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4259,7 +4259,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4273,7 +4273,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4356,7 +4356,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4364,7 +4364,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4385,7 +4385,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4393,7 +4393,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4402,7 +4402,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4451,7 +4451,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4484,14 +4484,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4499,7 +4499,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4515,7 +4515,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4523,7 +4523,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4539,7 +4539,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4555,7 +4555,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4573,7 +4573,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4587,7 +4587,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4601,7 +4601,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4640,7 +4640,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4650,7 +4650,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4734,8 +4734,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5092,34 +5092,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5200,7 +5200,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 06/10] app/testpmd: fix parse_fec_mode return type name
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (4 preceding siblings ...)
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 05/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 07/10] app/testpmd: replace POSIX specific code Jie Zhou
                                             ` (5 subsequent siblings)
  11 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Replace parse_fec_mode misleading return type name mode with fec_capa

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0268b18f9..dff5a75ec 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16997,17 +16997,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 01a541cdd..e2e1a31f2 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3614,13 +3614,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 283b5e368..9ae4d90dd 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 07/10] app/testpmd: replace POSIX specific code
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (5 preceding siblings ...)
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 08/10] app/testpmd: fix headers inclusion Jie Zhou
                                             ` (4 subsequent siblings)
  11 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c     |  3 +--
 app/test-pmd/csumonly.c    |  2 +-
 app/test-pmd/icmpecho.c    |  4 ++--
 app/test-pmd/ieee1588fwd.c |  8 ++++----
 app/test-pmd/parameters.c  | 10 +++++++---
 app/test-pmd/testpmd.c     | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h     |  2 +-
 7 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index dff5a75ec..10b0f6239 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,7 +8,6 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
 #include <sys/socket.h>
@@ -3614,7 +3613,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335f..089936587 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e790..8948f28eb 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0..034f238c3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c6..4c3cbbac3 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -185,8 +185,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +213,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +612,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +727,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8ed1b97de..1cdd3cdd1 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -629,6 +634,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -899,6 +905,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -969,9 +976,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -988,6 +997,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1028,6 +1038,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1054,7 +1065,9 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
+#endif
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
 			"Creation of mbuf pool for socket %u failed: %s\n",
@@ -3021,6 +3034,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3028,6 +3042,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3728,8 +3743,10 @@ signal_handler(int signum)
 		/* Set flag to indicate the force termination. */
 		f_quit = 1;
 		/* exit with the expected status */
+#ifndef RTE_EXEC_ENV_WINDOWS
 		signal(signum, SIG_DFL);
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3804,10 +3821,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3928,7 +3947,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(US_PER_S);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 9ae4d90dd..04b49a9c0 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -762,7 +762,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 08/10] app/testpmd: fix headers inclusion
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (6 preceding siblings ...)
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 07/10] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-06-20 23:30                             ` Dmitry Kozlyuk
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings Jie Zhou
                                             ` (3 subsequent siblings)
  11 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

- Include rte_os_shim.h in testpmd.h
- Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 app/test-pmd/cmdline.c      | 3 ---
 app/test-pmd/cmdline_flow.c | 2 --
 app/test-pmd/parameters.c   | 1 -
 app/test-pmd/testpmd.h      | 1 +
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 10b0f6239..bfd2fb924 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10,9 +10,6 @@
 #include <string.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 888b9179b..a3cd4773a 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 4c3cbbac3..5e69d2aa8 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 04b49a9c0..d61a055bd 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (7 preceding siblings ...)
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-06-20 23:30                             ` Dmitry Kozlyuk
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
                                             ` (2 subsequent siblings)
  11 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e2e1a31f2..00a65f442 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4446,6 +4446,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4505,47 +4546,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v13 10/10] app/testpmd: enable building testpmd on Windows
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (8 preceding siblings ...)
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-05-05 19:12                           ` Jie Zhou
  2021-06-20 23:30                             ` Dmitry Kozlyuk
  2021-05-06  7:20                           ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Tal Shnaiderman
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
  11 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-05-05 19:12 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861b..4c6049807 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e04..db1fcadbf 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b..82ed05bb0 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b4..14d36b33e 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f..edb9deef8 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6..089882120 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9..f29c6ee86 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b791..ef3582a87 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 45c3ff456..17be36067 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c..3360ea02b 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036..a33cad907 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f8323..7d123e32f 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb6..02b101980 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d..3d15727a0 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 08c82d3d2..2953afc8b 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.30.0.vfs.0.2


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable testpmd on Windows
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (9 preceding siblings ...)
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-05-06  7:20                           ` Tal Shnaiderman
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
  11 siblings, 0 replies; 232+ messages in thread
From: Tal Shnaiderman @ 2021-05-06  7:20 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, pallavi.kadam,
	NBU-Contact-Thomas Monjalon, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

> Subject: [PATCH v13 00/10] app/testpmd: enable testpmd on Windows
> 
> External email: Use caution opening links or attachments
> 
> 
> This patchset is to enable testpmd on windows. It mainly includes:
> - Enable building libraries on Windows that testpmd depends on
> - Add necessary macros required by testpmd on Windows in rte_os_shim.h
> - Add device event stubs for Windows
> - Resolve name collisions with Windows types
> - Add clock_gettime in testpmd on Windows
> - Fix parse_fec_mode to return fec_capa instead of mode
> - Replace POSIX specific codes
> - Disable unsupported Apps build on Windows
> - Enable testpmd build on Windows
> 
> Future work:
> - Some issues discovered at validation need further investigations
>   * Perf inconsistency: TPUT fluctuated significantly from runs
>   * After traffic stop, port stats shows pps being 0 while bps not
>   * mempool allocation only succeed with native. Other methods failed
>     at rte_mem_lock/VirtualLock.
> - Hot-plug on Windows not supported yet
> - Support mempool allocation native mode only for now
> 
> Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
> 

Acked-by: Tal Shnaiderman <talshn@nvidia.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 02/10] eal/windows: add necessary macros
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 02/10] eal/windows: add necessary macros Jie Zhou
@ 2021-06-20 23:28                             ` Dmitry Kozlyuk
  2021-06-23 20:51                               ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-20 23:28 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

2021-05-05 12:12 (UTC-0700), Jie Zhou:
> Add required macros by testpmd on Windows in rte_os_shim.h
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
>  lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
> index 1b314733b..3763cae62 100644
> --- a/lib/eal/windows/include/rte_os_shim.h
> +++ b/lib/eal/windows/include/rte_os_shim.h
> @@ -21,6 +21,7 @@
>  #define strdup(str) _strdup(str)
>  #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
>  #ifndef RTE_TOOLCHAIN_GCC
> +#define strcasecmp _stricmp
>  #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
>  #endif

Please use macros with arguments, like in the next line.
This provides better error messages at call site
and IDE display a nice hint knowing the parameters.

>  
> @@ -38,6 +39,14 @@
>  #define IPPROTO_SCTP	132
>  #endif
>  
> +#ifndef IPDEFTTL
> +#define IPDEFTTL 64
> +#endif
> +
> +#ifndef S_ISREG
> +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
> +#endif
> +

Missing spaces around `&`.

>  #ifdef RTE_TOOLCHAIN_GCC
>  
>  #define TIME_UTC 1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 03/10] eal/windows: add device event stubs
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 03/10] eal/windows: add device event stubs Jie Zhou
@ 2021-06-20 23:28                             ` Dmitry Kozlyuk
  0 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-20 23:28 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

2021-05-05 12:12 (UTC-0700), Jie Zhou:
> Add device event stubs in eal_dev.c for Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 04/10] eal/Windows: add clock_gettime on Windows
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-06-20 23:30                             ` Dmitry Kozlyuk
  2021-06-23 20:57                               ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-20 23:30 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

2021-05-05 12:12 (UTC-0700), Jie Zhou:
> Add clock_gettime on Windows in rte_os_shim.h
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/eal/windows/include/rte_os_shim.h | 38 +++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
> index 3763cae62..cd1f53dfa 100644
> --- a/lib/eal/windows/include/rte_os_shim.h
> +++ b/lib/eal/windows/include/rte_os_shim.h
> @@ -77,4 +77,42 @@ rte_timespec_get(struct timespec *now, int base)
>  
>  #endif /* RTE_TOOLCHAIN_GCC */
>  
> +/* Identifier for system-wide realtime clock. */
> +#define CLOCK_REALTIME                  0
> +/* Monotonic system-wide clock. */
> +#define CLOCK_MONOTONIC                 1
> +/* High-resolution timer from the CPU. */
> +#define CLOCK_PROCESS_CPUTIME_ID        2
> +/* Thread-specific CPU-time clock. */
> +#define CLOCK_THREAD_CPUTIME_ID         3

Are the last two constants needed?

> +
> +#define NS_PER_SEC 1E9

NS_PER_SEC isn't provided by any interface that we shim,
but it can be defined by applications (like testpmd does),
so it's better to make this constant private to rte_clock_gettime().

IMO, we should provide such constants with RTE_ prefix someday.
rte_time.h provides NSEC_PER_SEC without RTE_ prefix already.

> +
> +typedef int clockid_t;
> +
> +static inline int
> +rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
> +{
> +	LARGE_INTEGER pf, pc;
> +	LONGLONG nsec;
> +	switch (clock_id) {
> +	case CLOCK_REALTIME:
> +		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
> +			return -1;
> +		return 0;
> +	case CLOCK_MONOTONIC:
> +		if (QueryPerformanceFrequency(&pf) == 0)
> +			return -1;
> +		if (QueryPerformanceCounter(&pc) == 0)
> +			return -1;

These calls never fail on any supported Windows version.

> +		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
> +		tp->tv_sec = nsec / NS_PER_SEC;
> +		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
> +		return 0;
> +	default:
> +		return -1;

By clock_getttime() contract, errno must be set to ENOTSUP here.

> +	}
> +}
> +#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
> +
>  #endif /* _RTE_OS_SHIM_ */






^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 05/10] app/testpmd: resolve name collisions
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 05/10] app/testpmd: resolve name collisions Jie Zhou
@ 2021-06-20 23:30                             ` Dmitry Kozlyuk
  0 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-20 23:30 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

2021-05-05 12:12 (UTC-0700), Jie Zhou:
> Resolve name collisions with Windows types
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 08/10] app/testpmd: fix headers inclusion
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 08/10] app/testpmd: fix headers inclusion Jie Zhou
@ 2021-06-20 23:30                             ` Dmitry Kozlyuk
  2021-06-23 20:58                               ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-20 23:30 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

2021-05-05 12:12 (UTC-0700), Jie Zhou:
> - Include rte_os_shim.h in testpmd.h
> - Remove redundant headers
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>

It would be logical to merge this patch with the previous one.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-06-20 23:30                             ` Dmitry Kozlyuk
  2021-06-23 21:26                               ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-20 23:30 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

2021-05-05 12:12 (UTC-0700), Jie Zhou:
> Function print_fdir_mask and print_fdir_flex_payload is only called
> when either i40e or ixgbe presents. Add #if defined to remove
> "unused function" compilation warning.
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>
> ---
>  app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
>  1 file changed, 41 insertions(+), 41 deletions(-)

Code inside #ifdef isn't compile-checked, it's better to avoid.
The only case we can't is when i40e or ixgbe API is called directly.
I'd rather remove #ifdef whenever possible and mark maybe-unused entities,
like this:

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3723317ab4..97a577fec0 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4488,8 +4488,6 @@ flowtype_to_str(uint16_t flow_type)
        return NULL;
 }
 
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4590,6 +4588,9 @@ get_fdir_info(portid_t port_id, struct rte_eth_fdir_info *fdir_info,
 {
        int ret = -ENOTSUP;
 
+       RTE_SET_USED(fdir_info);
+       RTE_SET_USED(fdir_stat);
+
 #ifdef RTE_NET_I40E
        if (ret == -ENOTSUP) {
                ret = rte_pmd_i40e_get_fdir_info(port_id, fdir_info);
@@ -4686,8 +4687,6 @@ fdir_get_infos(portid_t port_id)
               fdir_stats_border, fdir_stats_border);
 }
 
-#endif /* RTE_NET_I40E || RTE_NET_IXGBE */
-
 void
 fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg)
 {
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index d61a055bdd..a40ee902e8 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -917,9 +917,7 @@ int all_ports_stopped(void);
 int port_is_stopped(portid_t port_id);
 int port_is_started(portid_t port_id);
 void pmd_test_exit(void);
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
 void fdir_get_infos(portid_t port_id);
-#endif
 void fdir_set_flex_mask(portid_t port_id,
                           struct rte_eth_fdir_flex_mask *cfg);
 void fdir_set_flex_payload(portid_t port_id,

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 10/10] app/testpmd: enable building testpmd on Windows
  2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-06-20 23:30                             ` Dmitry Kozlyuk
  0 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-20 23:30 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

2021-05-05 12:12 (UTC-0700), Jie Zhou:
> From: Jie Zhou <jizh@microsoft.com>
> 
> - Disable unsupported Apps on Windows
> - Enable building of testpmd on Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 02/10] eal/windows: add necessary macros
  2021-06-20 23:28                             ` Dmitry Kozlyuk
@ 2021-06-23 20:51                               ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 20:51 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

On Mon, Jun 21, 2021 at 02:28:27AM +0300, Dmitry Kozlyuk wrote:
> 2021-05-05 12:12 (UTC-0700), Jie Zhou:
> > Add required macros by testpmd on Windows in rte_os_shim.h
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > Acked-by: Tal Shnaiderman <talshn@nvidia.com>
> > ---
> >  lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
> > index 1b314733b..3763cae62 100644
> > --- a/lib/eal/windows/include/rte_os_shim.h
> > +++ b/lib/eal/windows/include/rte_os_shim.h
> > @@ -21,6 +21,7 @@
> >  #define strdup(str) _strdup(str)
> >  #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
> >  #ifndef RTE_TOOLCHAIN_GCC
> > +#define strcasecmp _stricmp
> >  #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
> >  #endif
> 
> Please use macros with arguments, like in the next line.
> This provides better error messages at call site
> and IDE display a nice hint knowing the parameters.
> 
> >  
> > @@ -38,6 +39,14 @@
> >  #define IPPROTO_SCTP	132
> >  #endif
> >  
> > +#ifndef IPDEFTTL
> > +#define IPDEFTTL 64
> > +#endif
> > +
> > +#ifndef S_ISREG
> > +#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
> > +#endif
> > +
> 
> Missing spaces around `&`.

Thanks Dmitry. Will fix both in V14. 

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 04/10] eal/Windows: add clock_gettime on Windows
  2021-06-20 23:30                             ` Dmitry Kozlyuk
@ 2021-06-23 20:57                               ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 20:57 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

On Mon, Jun 21, 2021 at 02:30:36AM +0300, Dmitry Kozlyuk wrote:
> 2021-05-05 12:12 (UTC-0700), Jie Zhou:
> > Add clock_gettime on Windows in rte_os_shim.h
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > ---
> >  lib/eal/windows/include/rte_os_shim.h | 38 +++++++++++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> > 
> > diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
> > index 3763cae62..cd1f53dfa 100644
> > --- a/lib/eal/windows/include/rte_os_shim.h
> > +++ b/lib/eal/windows/include/rte_os_shim.h
> > @@ -77,4 +77,42 @@ rte_timespec_get(struct timespec *now, int base)
> >  
> >  #endif /* RTE_TOOLCHAIN_GCC */
> >  
> > +/* Identifier for system-wide realtime clock. */
> > +#define CLOCK_REALTIME                  0
> > +/* Monotonic system-wide clock. */
> > +#define CLOCK_MONOTONIC                 1
> > +/* High-resolution timer from the CPU. */
> > +#define CLOCK_PROCESS_CPUTIME_ID        2
> > +/* Thread-specific CPU-time clock. */
> > +#define CLOCK_THREAD_CPUTIME_ID         3
> 
> Are the last two constants needed?

Will remove these two unnecessary ones in V14.

> 
> > +
> > +#define NS_PER_SEC 1E9
> 
> NS_PER_SEC isn't provided by any interface that we shim,
> but it can be defined by applications (like testpmd does),
> so it's better to make this constant private to rte_clock_gettime().

Sure, will move into rte_clock_gettime()


> IMO, we should provide such constants with RTE_ prefix someday.
> rte_time.h provides NSEC_PER_SEC without RTE_ prefix already.
> 
> > +
> > +typedef int clockid_t;
> > +
> > +static inline int
> > +rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
> > +{
> > +	LARGE_INTEGER pf, pc;
> > +	LONGLONG nsec;
> > +	switch (clock_id) {
> > +	case CLOCK_REALTIME:
> > +		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
> > +			return -1;
> > +		return 0;
> > +	case CLOCK_MONOTONIC:
> > +		if (QueryPerformanceFrequency(&pf) == 0)
> > +			return -1;
> > +		if (QueryPerformanceCounter(&pc) == 0)
> > +			return -1;
> 
> These calls never fail on any supported Windows version.

Agree, these two zero check is redundant as per ms document, systems run Windows XP or later will always succeed and will never return zero. Will remove the check.



^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 08/10] app/testpmd: fix headers inclusion
  2021-06-20 23:30                             ` Dmitry Kozlyuk
@ 2021-06-23 20:58                               ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 20:58 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

On Mon, Jun 21, 2021 at 02:30:48AM +0300, Dmitry Kozlyuk wrote:
> 2021-05-05 12:12 (UTC-0700), Jie Zhou:
> > - Include rte_os_shim.h in testpmd.h
> > - Remove redundant headers
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > Acked-by: Tal Shnaiderman <talshn@nvidia.com>
> 
> It would be logical to merge this patch with the previous one.

Will merge 08 and 07 into one in V14.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings
  2021-06-20 23:30                             ` Dmitry Kozlyuk
@ 2021-06-23 21:26                               ` Jie Zhou
  2021-06-24 15:45                                 ` Tyler Retzlaff
  0 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 21:26 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam, thomas,
	bruce.richardson, ferruh.yigit, konstantin.ananyev, stable

On Mon, Jun 21, 2021 at 02:30:53AM +0300, Dmitry Kozlyuk wrote:
> 2021-05-05 12:12 (UTC-0700), Jie Zhou:
> > Function print_fdir_mask and print_fdir_flex_payload is only called
> > when either i40e or ixgbe presents. Add #if defined to remove
> > "unused function" compilation warning.
> > 
> > Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > Acked-by: Tal Shnaiderman <talshn@nvidia.com>
> > ---
> >  app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
> >  1 file changed, 41 insertions(+), 41 deletions(-)
> 
> Code inside #ifdef isn't compile-checked, it's better to avoid.
> The only case we can't is when i40e or ixgbe API is called directly.
> I'd rather remove #ifdef whenever possible and mark maybe-unused entities,
> like this:
> 
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 3723317ab4..97a577fec0 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -4488,8 +4488,6 @@ flowtype_to_str(uint16_t flow_type)
>         return NULL;
>  }
>  
> -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
> -
>  static inline void
>  print_fdir_mask(struct rte_eth_fdir_masks *mask)
>  {
> @@ -4590,6 +4588,9 @@ get_fdir_info(portid_t port_id, struct rte_eth_fdir_info *fdir_info,
>  {
>         int ret = -ENOTSUP;
>  
> +       RTE_SET_USED(fdir_info);
> +       RTE_SET_USED(fdir_stat);
> +
>  #ifdef RTE_NET_I40E
>         if (ret == -ENOTSUP) {
>                 ret = rte_pmd_i40e_get_fdir_info(port_id, fdir_info);
> @@ -4686,8 +4687,6 @@ fdir_get_infos(portid_t port_id)
>                fdir_stats_border, fdir_stats_border);
>  }
>  
> -#endif /* RTE_NET_I40E || RTE_NET_IXGBE */
> -
>  void
>  fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg)
>  {
> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> index d61a055bdd..a40ee902e8 100644
> --- a/app/test-pmd/testpmd.h
> +++ b/app/test-pmd/testpmd.h
> @@ -917,9 +917,7 @@ int all_ports_stopped(void);
>  int port_is_stopped(portid_t port_id);
>  int port_is_started(portid_t port_id);
>  void pmd_test_exit(void);
> -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
>  void fdir_get_infos(portid_t port_id);
> -#endif
>  void fdir_set_flex_mask(portid_t port_id,
>                            struct rte_eth_fdir_flex_mask *cfg);
>  void fdir_set_flex_payload(portid_t port_id,

Hi Dmitry, I agree that should avoid the #ifdef as much as possible. But in this case, I am not quite sure if I followed your comment correctly. Someone originally introduced these i40e and ixgbe related fdir functions (print_fdir_mask, print_fdir_flex_payload, print_fdir_flex_mask, print_fdir_flow_type, get_fdir_info, fdir_get_infos) into testpmd with adding the #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) for 4 out of 6 functions and left 2 of them outside the #ifdef which caused compilation "unused function" warning. What I did here is just move the starting point of #ifdef to also include those 2 missed functions (print_fdir_mask and print_fdir_flex_payload). IMO the original author would be in better place to reducing the unneccary #ifdef in a proper way.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 0/9] app/testpmd: enable testpmd on Windows
  2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
                                             ` (10 preceding siblings ...)
  2021-05-06  7:20                           ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Tal Shnaiderman
@ 2021-06-23 22:34                           ` Jie Zhou
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on Jie Zhou
                                               ` (9 more replies)
  11 siblings, 10 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
V14 changes:
    - Use macros with arguments
    - Add missing spaces around '&'
    - Remove unnecessary constants
    - Remove unnecessary returned result check on QueryPerformanceXXX

---
V13 changes:
    - Resolve a patchset apply issue in patch2

---
V12 changes:
    - Fix indentation

---
V11 changes:
    - Add Acked-by from V9 and V10
    - Fix an error at ifndef'ing err flow for MP_ALLOC_NATIVE

---
V10 changes:
    - Remove unneeded newline in config.c
    - Add Fixes: and Cc: Stable for parse_fec_mode fix
    - More appropriate and granular commit messages
    - Use US_PER_S
    - Put signal inside ifndef

---
V9 changes:
    - Add clock_gettime for Windows into eal in rte_os_shim.h

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---


Jie Zhou (9):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  eal/Windows: add clock_gettime on Windows
  app/testpmd: resolve name collisions
  app/testpmd: fix parse_fec_mode return type name
  app/testpmd: replace POSIX specific code
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  86 ++---
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |  42 +++
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 28 files changed, 507 insertions(+), 327 deletions(-)
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-24 23:10                               ` Dmitry Kozlyuk
  2021-06-28 10:01                               ` Andrew Rybchenko
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 2/9] eal/windows: add necessary macros Jie Zhou
                                               ` (8 subsequent siblings)
  9 siblings, 2 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Enable building libraries that testpmd depends on for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index 4a64756a68..1673ca4323 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 2/9] eal/windows: add necessary macros
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-24 23:10                               ` Dmitry Kozlyuk
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 3/9] eal/windows: add device event stubs Jie Zhou
                                               ` (7 subsequent siblings)
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 1b314733b2..824d9748ba 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -21,6 +21,7 @@
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
 #ifndef RTE_TOOLCHAIN_GCC
+#define strcasecmp(s1, s2) _stricmp(s1, s2)
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 #endif
 
@@ -38,6 +39,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode) & S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 3/9] eal/windows: add device event stubs
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on Jie Zhou
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 2/9] eal/windows: add necessary macros Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
                                               ` (6 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 0000000000..35191056fd
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec417..fc12fefd0d 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 4/9] eal/Windows: add clock_gettime on Windows
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
                                               ` (2 preceding siblings ...)
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 3/9] eal/windows: add device event stubs Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-24 23:10                               ` Dmitry Kozlyuk
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 5/9] app/testpmd: resolve name collisions Jie Zhou
                                               ` (5 subsequent siblings)
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add clock_gettime on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 lib/eal/windows/include/rte_os_shim.h | 33 +++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 824d9748ba..4f5322595d 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -77,4 +77,37 @@ rte_timespec_get(struct timespec *now, int base)
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME                  0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC                 1
+
+typedef int clockid_t;
+
+static inline int
+rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	const int NS_PER_SEC = 1E9;
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+		return 0;
+	case CLOCK_MONOTONIC:
+		QueryPerformanceFrequency(&pf);
+		QueryPerformanceCounter(&pc);
+		
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+		return 0;
+	default:
+		return -1;
+	}
+}
+#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 5/9] app/testpmd: resolve name collisions
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
                                               ` (3 preceding siblings ...)
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
                                               ` (4 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 1c587bb7b8..61882d5cbc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -895,14 +895,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -913,7 +913,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1927,111 +1927,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2062,7 +2062,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2077,7 +2077,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2091,42 +2091,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2134,8 +2134,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2144,22 +2144,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2176,14 +2176,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2191,21 +2191,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2213,7 +2213,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2228,7 +2228,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2245,7 +2245,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2256,54 +2256,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2370,7 +2370,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2390,7 +2390,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2404,7 +2404,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2418,7 +2418,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2431,7 +2431,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2444,34 +2444,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2490,25 +2490,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2522,41 +2522,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2570,49 +2570,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2626,7 +2626,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2634,7 +2634,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2642,35 +2642,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2684,28 +2684,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2719,14 +2719,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2740,21 +2740,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2768,28 +2768,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2803,7 +2803,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2816,7 +2816,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2831,7 +2831,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2852,7 +2852,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2860,7 +2860,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2875,7 +2875,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2885,14 +2885,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2900,7 +2900,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2924,7 +2924,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2938,20 +2938,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2978,20 +2978,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -3007,7 +3007,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3038,7 +3038,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3062,7 +3062,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3085,7 +3085,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3093,7 +3093,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3108,14 +3108,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3146,7 +3146,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3163,7 +3163,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3181,7 +3181,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3199,7 +3199,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3214,7 +3214,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3228,7 +3228,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3242,14 +3242,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3270,7 +3270,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3279,7 +3279,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3296,14 +3296,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3317,13 +3317,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3338,7 +3338,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3352,7 +3352,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3366,7 +3366,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3379,14 +3379,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3451,7 +3451,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3467,21 +3467,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3489,7 +3489,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3507,21 +3507,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3567,7 +3567,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3581,7 +3581,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3603,7 +3603,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3625,14 +3625,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3676,7 +3676,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3697,7 +3697,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3712,7 +3712,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3750,7 +3750,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3758,7 +3758,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3773,7 +3773,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3797,7 +3797,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3805,7 +3805,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3851,7 +3851,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3867,7 +3867,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3891,7 +3891,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3936,7 +3936,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3954,7 +3954,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3972,7 +3972,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3989,7 +3989,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -4007,7 +4007,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4115,7 +4115,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4132,7 +4132,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4149,7 +4149,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4166,7 +4166,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4183,7 +4183,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4247,7 +4247,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4263,7 +4263,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4278,7 +4278,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4292,7 +4292,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4306,7 +4306,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4320,7 +4320,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4403,7 +4403,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4432,7 +4432,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4440,7 +4440,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4449,7 +4449,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4458,7 +4458,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4498,7 +4498,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4531,14 +4531,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4546,7 +4546,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4562,7 +4562,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4570,7 +4570,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4586,7 +4586,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4602,7 +4602,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4620,7 +4620,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4634,7 +4634,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4648,7 +4648,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4687,7 +4687,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4697,7 +4697,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4781,8 +4781,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5139,34 +5139,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5247,7 +5247,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
                                               ` (4 preceding siblings ...)
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 5/9] app/testpmd: resolve name collisions Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-28 10:55                               ` Andrew Rybchenko
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 7/9] app/testpmd: replace POSIX specific code Jie Zhou
                                               ` (3 subsequent siblings)
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Replace parse_fec_mode misleading return type name mode with fec_capa

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0268b18f95..dff5a75ec5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16997,17 +16997,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 43c79b5021..79526796e9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3617,13 +3617,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 283b5e3680..9ae4d90dd1 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 7/9] app/testpmd: replace POSIX specific code
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
                                               ` (5 preceding siblings ...)
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-24 23:10                               ` Dmitry Kozlyuk
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 8/9] app/testpmd: fix unused function warnings Jie Zhou
                                               ` (2 subsequent siblings)
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now
 - Include rte_os_shim.h in testpmd.h
 - Remove redundant headers

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
 app/test-pmd/cmdline.c      |  6 +-----
 app/test-pmd/cmdline_flow.c |  2 --
 app/test-pmd/csumonly.c     |  2 +-
 app/test-pmd/icmpecho.c     |  4 ++--
 app/test-pmd/ieee1588fwd.c  |  8 ++++----
 app/test-pmd/parameters.c   | 11 +++++++----
 app/test-pmd/testpmd.c      | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h      |  3 ++-
 8 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index dff5a75ec5..bfd2fb9240 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,12 +8,8 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
@@ -3614,7 +3610,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 61882d5cbc..0168ff7dac 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335fe..089936587b 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e7902..8948f28eb5 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0c..034f238c34 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c63..5e69d2aa8c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
@@ -185,8 +184,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +212,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +611,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +726,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8ed1b97dec..1cdd3cdd12 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -629,6 +634,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -899,6 +905,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -969,9 +976,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -988,6 +997,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1028,6 +1038,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1054,7 +1065,9 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
+#endif
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
 			"Creation of mbuf pool for socket %u failed: %s\n",
@@ -3021,6 +3034,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3028,6 +3042,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3728,8 +3743,10 @@ signal_handler(int signum)
 		/* Set flag to indicate the force termination. */
 		f_quit = 1;
 		/* exit with the expected status */
+#ifndef RTE_EXEC_ENV_WINDOWS
 		signal(signum, SIG_DFL);
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3804,10 +3821,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3928,7 +3947,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(US_PER_S);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 9ae4d90dd1..d61a055bdd 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
@@ -762,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 8/9] app/testpmd: fix unused function warnings
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
                                               ` (6 preceding siblings ...)
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 7/9] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-24 23:10                               ` Dmitry Kozlyuk
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 79526796e9..3723317ab4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4449,6 +4449,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4508,47 +4549,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v14 9/9] app/testpmd: enable building testpmd on Windows
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
                                               ` (7 preceding siblings ...)
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 8/9] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-06-23 22:34                             ` Jie Zhou
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-23 22:34 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861bb..4c6049807c 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e047..db1fcadbfe 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b4..82ed05bb0b 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b41..14d36b33e9 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f0..edb9deef84 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6e..0898821200 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9d..f29c6ee863 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b7912..ef3582a87c 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 45c3ff4566..17be360677 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c0..3360ea02b0 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036a..a33cad9078 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f83231..7d123e32fb 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb60..02b101980e 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d7..3d15727a01 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 0a5f425578..f21e2cc1fa 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings
  2021-06-23 21:26                               ` Jie Zhou
@ 2021-06-24 15:45                                 ` Tyler Retzlaff
  2021-06-24 18:44                                   ` Dmitry Kozlyuk
  0 siblings, 1 reply; 232+ messages in thread
From: Tyler Retzlaff @ 2021-06-24 15:45 UTC (permalink / raw)
  To: Jie Zhou
  Cc: Dmitry Kozlyuk, dev, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

On Wed, Jun 23, 2021 at 02:26:32PM -0700, Jie Zhou wrote:
> On Mon, Jun 21, 2021 at 02:30:53AM +0300, Dmitry Kozlyuk wrote:
> > -
> >  void
> >  fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg)
> >  {
> > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> > index d61a055bdd..a40ee902e8 100644
> > --- a/app/test-pmd/testpmd.h
> > +++ b/app/test-pmd/testpmd.h
> > @@ -917,9 +917,7 @@ int all_ports_stopped(void);
> >  int port_is_stopped(portid_t port_id);
> >  int port_is_started(portid_t port_id);
> >  void pmd_test_exit(void);
> > -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
> >  void fdir_get_infos(portid_t port_id);
> > -#endif
> >  void fdir_set_flex_mask(portid_t port_id,
> >                            struct rte_eth_fdir_flex_mask *cfg);
> >  void fdir_set_flex_payload(portid_t port_id,
> 
> Hi Dmitry, I agree that should avoid the #ifdef as much as possible. But in this case, I am not quite sure if I followed your comment correctly. Someone originally introduced these i40e and ixgbe related fdir functions (print_fdir_mask, print_fdir_flex_payload, print_fdir_flex_mask, print_fdir_flow_type, get_fdir_info, fdir_get_infos) into testpmd with adding the #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) for 4 out of 6 functions and left 2 of them outside the #ifdef which caused compilation "unused function" warning. What I did here is just move the starting point of #ifdef to also include those 2 missed functions (print_fdir_mask and print_fdir_flex_payload). IMO the original author would be in better place to reducing the unneccary #ifdef in a proper way.

i think i have to agree with jie here. there are limits to how many
defects we should have to correct which are unrelated change. if this is
critical i think it would be best if the maintainer provide a patch
cleaning up the code they own.

let's not hold this patch up over it because of it being a broad change
we lose a lot of time rebasing where either the maintainer or author
could follow up with a narrow change to correct this.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings
  2021-06-24 15:45                                 ` Tyler Retzlaff
@ 2021-06-24 18:44                                   ` Dmitry Kozlyuk
  2021-06-24 21:36                                     ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-24 18:44 UTC (permalink / raw)
  To: Tyler Retzlaff
  Cc: Jie Zhou, dev, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

2021-06-24 08:45 (UTC-0700), Tyler Retzlaff:
> On Wed, Jun 23, 2021 at 02:26:32PM -0700, Jie Zhou wrote:
> > On Mon, Jun 21, 2021 at 02:30:53AM +0300, Dmitry Kozlyuk wrote:  
> > > -
> > >  void
> > >  fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg)
> > >  {
> > > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> > > index d61a055bdd..a40ee902e8 100644
> > > --- a/app/test-pmd/testpmd.h
> > > +++ b/app/test-pmd/testpmd.h
> > > @@ -917,9 +917,7 @@ int all_ports_stopped(void);
> > >  int port_is_stopped(portid_t port_id);
> > >  int port_is_started(portid_t port_id);
> > >  void pmd_test_exit(void);
> > > -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
> > >  void fdir_get_infos(portid_t port_id);
> > > -#endif
> > >  void fdir_set_flex_mask(portid_t port_id,
> > >                            struct rte_eth_fdir_flex_mask *cfg);
> > >  void fdir_set_flex_payload(portid_t port_id,  
> > 
> > Hi Dmitry, I agree that should avoid the #ifdef as much as possible. But in this case, I am not quite sure if I followed your comment correctly. Someone originally introduced these i40e and ixgbe related fdir functions (print_fdir_mask, print_fdir_flex_payload, print_fdir_flex_mask, print_fdir_flow_type, get_fdir_info, fdir_get_infos) into testpmd with adding the #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) for 4 out of 6 functions and left 2 of them outside the #ifdef which caused compilation "unused function" warning. What I did here is just move the starting point of #ifdef to also include those 2 missed functions (print_fdir_mask and print_fdir_flex_payload). IMO the original author would be in better place to reducing the unneccary #ifdef in a proper way.  
> 
> i think i have to agree with jie here. there are limits to how many
> defects we should have to correct which are unrelated change. if this is
> critical i think it would be best if the maintainer provide a patch
> cleaning up the code they own.
> 
> let's not hold this patch up over it because of it being a broad change
> we lose a lot of time rebasing where either the maintainer or author
> could follow up with a narrow change to correct this.

Fair enough, the patch doesn't add technical debt at least.

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings
  2021-06-24 18:44                                   ` Dmitry Kozlyuk
@ 2021-06-24 21:36                                     ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-24 21:36 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: Tyler Retzlaff, dev, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

On Thu, Jun 24, 2021 at 09:44:04PM +0300, Dmitry Kozlyuk wrote:
> 2021-06-24 08:45 (UTC-0700), Tyler Retzlaff:
> > On Wed, Jun 23, 2021 at 02:26:32PM -0700, Jie Zhou wrote:
> > > On Mon, Jun 21, 2021 at 02:30:53AM +0300, Dmitry Kozlyuk wrote:  
> > > > -
> > > >  void
> > > >  fdir_set_flex_mask(portid_t port_id, struct rte_eth_fdir_flex_mask *cfg)
> > > >  {
> > > > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> > > > index d61a055bdd..a40ee902e8 100644
> > > > --- a/app/test-pmd/testpmd.h
> > > > +++ b/app/test-pmd/testpmd.h
> > > > @@ -917,9 +917,7 @@ int all_ports_stopped(void);
> > > >  int port_is_stopped(portid_t port_id);
> > > >  int port_is_started(portid_t port_id);
> > > >  void pmd_test_exit(void);
> > > > -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
> > > >  void fdir_get_infos(portid_t port_id);
> > > > -#endif
> > > >  void fdir_set_flex_mask(portid_t port_id,
> > > >                            struct rte_eth_fdir_flex_mask *cfg);
> > > >  void fdir_set_flex_payload(portid_t port_id,  
> > > 
> > > Hi Dmitry, I agree that should avoid the #ifdef as much as possible. But in this case, I am not quite sure if I followed your comment correctly. Someone originally introduced these i40e and ixgbe related fdir functions (print_fdir_mask, print_fdir_flex_payload, print_fdir_flex_mask, print_fdir_flow_type, get_fdir_info, fdir_get_infos) into testpmd with adding the #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) for 4 out of 6 functions and left 2 of them outside the #ifdef which caused compilation "unused function" warning. What I did here is just move the starting point of #ifdef to also include those 2 missed functions (print_fdir_mask and print_fdir_flex_payload). IMO the original author would be in better place to reducing the unneccary #ifdef in a proper way.  
> > 
> > i think i have to agree with jie here. there are limits to how many
> > defects we should have to correct which are unrelated change. if this is
> > critical i think it would be best if the maintainer provide a patch
> > cleaning up the code they own.
> > 
> > let's not hold this patch up over it because of it being a broad change
> > we lose a lot of time rebasing where either the maintainer or author
> > could follow up with a narrow change to correct this.
> 
> Fair enough, the patch doesn't add technical debt at least.
> 
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

Thanks Dmitry. Can you please help Ack on V14 which I sent out yesterday? Otherwise, I will send out V15 to carry over this ack from this V13.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-06-24 23:10                               ` Dmitry Kozlyuk
  2021-06-28 10:01                               ` Andrew Rybchenko
  1 sibling, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-24 23:10 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

2021-06-23 15:34 (UTC-0700), Jie Zhou:
> Enable building libraries that testpmd depends on for Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> ---
>  lib/meson.build | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index 4a64756a68..1673ca4323 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -76,8 +76,15 @@ if is_windows
>              'ethdev',
>              'pci',
>              'cmdline',
> +            'metrics',
>              'hash',
> +            'timer',
> +            'bitratestats',
>              'cfgfile',
> +            'gro',
> +            'gso',
> +            'latencystats',
> +            'pdump',
>      ] # only supported libraries for windows
>  endif
>  

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

Future note:
Bruce, IIUC, the order in the list matters for build speed.
Should we consider using `build = false` for libraries, like it's done for
drivers? So that we don't need to maintain two lists.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 2/9] eal/windows: add necessary macros
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 2/9] eal/windows: add necessary macros Jie Zhou
@ 2021-06-24 23:10                               ` Dmitry Kozlyuk
  0 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-24 23:10 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

2021-06-23 15:34 (UTC-0700), Jie Zhou:
> Add required macros by testpmd on Windows in rte_os_shim.h
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 4/9] eal/Windows: add clock_gettime on Windows
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-06-24 23:10                               ` Dmitry Kozlyuk
  0 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-24 23:10 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

2021-06-23 15:34 (UTC-0700), Jie Zhou:
> Add clock_gettime on Windows in rte_os_shim.h
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 7/9] app/testpmd: replace POSIX specific code
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 7/9] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-06-24 23:10                               ` Dmitry Kozlyuk
  0 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-24 23:10 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

2021-06-23 15:34 (UTC-0700), Jie Zhou:
>  - Make printf format OS independent
>  - Replace htons with RTE_BE16
>  - Replace POSIX specific inet_aton with OS independent inet_pton
>  - Replace sleep with rte_delay_us_sleep
>  - Repalce random with rte_rand
>  - #ifndef mman related code for now
>  - Include rte_os_shim.h in testpmd.h
>  - Remove redundant headers
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 8/9] app/testpmd: fix unused function warnings
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 8/9] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-06-24 23:10                               ` Dmitry Kozlyuk
  0 siblings, 0 replies; 232+ messages in thread
From: Dmitry Kozlyuk @ 2021-06-24 23:10 UTC (permalink / raw)
  To: Jie Zhou
  Cc: dev, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

2021-06-23 15:34 (UTC-0700), Jie Zhou:
> Function print_fdir_mask and print_fdir_flex_payload is only called
> when either i40e or ixgbe presents. Add #if defined to remove
> "unused function" compilation warning.
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>

Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on Jie Zhou
  2021-06-24 23:10                               ` Dmitry Kozlyuk
@ 2021-06-28 10:01                               ` Andrew Rybchenko
  2021-06-28 10:35                                 ` Andrew Rybchenko
  1 sibling, 1 reply; 232+ messages in thread
From: Andrew Rybchenko @ 2021-06-28 10:01 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

On 6/24/21 1:34 AM, Jie Zhou wrote:
> Enable building libraries that testpmd depends on for Windows
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>

Why are two a bit difference Signed-off-by used in these
patches? Can we drop the first one and keep the second one
which matches E-mail From?

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on
  2021-06-28 10:01                               ` Andrew Rybchenko
@ 2021-06-28 10:35                                 ` Andrew Rybchenko
  2021-06-28 14:10                                   ` Tyler Retzlaff
  0 siblings, 1 reply; 232+ messages in thread
From: Andrew Rybchenko @ 2021-06-28 10:35 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

On 6/28/21 1:01 PM, Andrew Rybchenko wrote:
> On 6/24/21 1:34 AM, Jie Zhou wrote:
>> Enable building libraries that testpmd depends on for Windows
>>
>> Signed-off-by: Jie Zhou <jizh@microsoft.com>
>> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> 
> Why are two a bit difference Signed-off-by used in these
> patches? Can we drop the first one and keep the second one
> which matches E-mail From?

In fact looking at git log I see both E-mail addresses
present, but it looks like the first one (w/o linux.) is
used more often.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-06-28 10:55                               ` Andrew Rybchenko
  2021-06-28 14:29                                 ` Tyler Retzlaff
  0 siblings, 1 reply; 232+ messages in thread
From: Andrew Rybchenko @ 2021-06-28 10:55 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

On 6/24/21 1:34 AM, Jie Zhou wrote:
> Replace parse_fec_mode misleading return type name mode with fec_capa
> 
> Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jie Zhou <jizh@microsoft.com>
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>

[snip]

> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> index 283b5e3680..9ae4d90dd1 100644
> --- a/app/test-pmd/testpmd.h
> +++ b/app/test-pmd/testpmd.h
> @@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
>   void set_tx_pkt_times(unsigned int *tx_times);
>   void show_tx_pkt_times(void);
>   void set_tx_pkt_split(const char *name);
> -int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
> +int parse_fec_mode(const char *name, uint32_t *fec_capa);

I guess that the real reason behind is to fix implicit
conversion of enum pointer to/from uint32_t pointer.
I guess the problem is different signness of enum on
Windows compiler.

If so, please, put real motivation of the changeset in summary.
It should be human-readable (and do not contain function name).
Explain details in the description.

Yes, I agree that mode is misleading here and should be mentioned
in the description, but I guess it is not the root cause.
May be I'm wrong.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on
  2021-06-28 10:35                                 ` Andrew Rybchenko
@ 2021-06-28 14:10                                   ` Tyler Retzlaff
  2021-06-29 18:29                                     ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Tyler Retzlaff @ 2021-06-28 14:10 UTC (permalink / raw)
  To: Andrew Rybchenko
  Cc: Jie Zhou, dev, dmitry.kozliuk, xiaoyun.li, roretzla, talshn,
	pallavi.kadam, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

On Mon, Jun 28, 2021 at 01:35:09PM +0300, Andrew Rybchenko wrote:
> On 6/28/21 1:01 PM, Andrew Rybchenko wrote:
> >On 6/24/21 1:34 AM, Jie Zhou wrote:
> >>Enable building libraries that testpmd depends on for Windows
> >>
> >>Signed-off-by: Jie Zhou <jizh@microsoft.com>
> >>Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> >
> >Why are two a bit difference Signed-off-by used in these
> >patches? Can we drop the first one and keep the second one
> >which matches E-mail From?
> 
> In fact looking at git log I see both E-mail addresses
> present, but it looks like the first one (w/o linux.) is
> used more often.

yes, the CI system rejects the patch without the first because it
doesn't match the original commit. it also rejects without the second
because it needs to match the dev email list subscriber mail so both
have been provided to pass CI.

i think future patches submitted won't be an issue because git local
config for the dpdk clone has been changed to match the second which is
also the subscription mail but changing the config doesn't re-write
the history on the commits (and it shouldn't).

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name
  2021-06-28 10:55                               ` Andrew Rybchenko
@ 2021-06-28 14:29                                 ` Tyler Retzlaff
  2021-06-29 18:34                                   ` Jie Zhou
  0 siblings, 1 reply; 232+ messages in thread
From: Tyler Retzlaff @ 2021-06-28 14:29 UTC (permalink / raw)
  To: Andrew Rybchenko
  Cc: Jie Zhou, dev, dmitry.kozliuk, xiaoyun.li, roretzla, talshn,
	pallavi.kadam, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

On Mon, Jun 28, 2021 at 01:55:02PM +0300, Andrew Rybchenko wrote:
> On 6/24/21 1:34 AM, Jie Zhou wrote:
> >Replace parse_fec_mode misleading return type name mode with fec_capa
> >
> >Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: Jie Zhou <jizh@microsoft.com>
> >Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> 
> [snip]
> 
> >diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> >index 283b5e3680..9ae4d90dd1 100644
> >--- a/app/test-pmd/testpmd.h
> >+++ b/app/test-pmd/testpmd.h
> >@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
> >  void set_tx_pkt_times(unsigned int *tx_times);
> >  void show_tx_pkt_times(void);
> >  void set_tx_pkt_split(const char *name);
> >-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
> >+int parse_fec_mode(const char *name, uint32_t *fec_capa);
> 
> I guess that the real reason behind is to fix implicit
> conversion of enum pointer to/from uint32_t pointer.
> I guess the problem is different signness of enum on
> Windows compiler.

yes, compilers targeting targets will select `int' once all constants of
the enumeration list are defined.

> 
> If so, please, put real motivation of the changeset in summary.
> It should be human-readable (and do not contain function name).
> Explain details in the description.
> 
> Yes, I agree that mode is misleading here and should be mentioned
> in the description, but I guess it is not the root cause.
> May be I'm wrong.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on
  2021-06-28 14:10                                   ` Tyler Retzlaff
@ 2021-06-29 18:29                                     ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 18:29 UTC (permalink / raw)
  To: Tyler Retzlaff
  Cc: Andrew Rybchenko, dev, dmitry.kozliuk, xiaoyun.li, roretzla,
	talshn, pallavi.kadam, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

On Mon, Jun 28, 2021 at 07:10:01AM -0700, Tyler Retzlaff wrote:
> On Mon, Jun 28, 2021 at 01:35:09PM +0300, Andrew Rybchenko wrote:
> > On 6/28/21 1:01 PM, Andrew Rybchenko wrote:
> > >On 6/24/21 1:34 AM, Jie Zhou wrote:
> > >>Enable building libraries that testpmd depends on for Windows
> > >>
> > >>Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > >>Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > >
> > >Why are two a bit difference Signed-off-by used in these
> > >patches? Can we drop the first one and keep the second one
> > >which matches E-mail From?
> > 
> > In fact looking at git log I see both E-mail addresses
> > present, but it looks like the first one (w/o linux.) is
> > used more often.
> 
> yes, the CI system rejects the patch without the first because it
> doesn't match the original commit. it also rejects without the second
> because it needs to match the dev email list subscriber mail so both
> have been provided to pass CI.
> 
> i think future patches submitted won't be an issue because git local
> config for the dpdk clone has been changed to match the second which is
> also the subscription mail but changing the config doesn't re-write
> the history on the commits (and it shouldn't).

Yes, the first one was originally manually added due to some CI warning. 
Double checked git config on local dpdk clone and ensured the user.email 
matches the second one. Will remove the first one in V15 and investigate 
if CI still complains.

Thanks.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name
  2021-06-28 14:29                                 ` Tyler Retzlaff
@ 2021-06-29 18:34                                   ` Jie Zhou
  0 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 18:34 UTC (permalink / raw)
  To: Tyler Retzlaff
  Cc: Andrew Rybchenko, dev, dmitry.kozliuk, xiaoyun.li, roretzla,
	talshn, pallavi.kadam, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

On Mon, Jun 28, 2021 at 07:29:11AM -0700, Tyler Retzlaff wrote:
> On Mon, Jun 28, 2021 at 01:55:02PM +0300, Andrew Rybchenko wrote:
> > On 6/24/21 1:34 AM, Jie Zhou wrote:
> > >Replace parse_fec_mode misleading return type name mode with fec_capa
> > >
> > >Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> > >Cc: stable@dpdk.org
> > >
> > >Signed-off-by: Jie Zhou <jizh@microsoft.com>
> > >Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> > 
> > [snip]
> > 
> > >diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
> > >index 283b5e3680..9ae4d90dd1 100644
> > >--- a/app/test-pmd/testpmd.h
> > >+++ b/app/test-pmd/testpmd.h
> > >@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
> > >  void set_tx_pkt_times(unsigned int *tx_times);
> > >  void show_tx_pkt_times(void);
> > >  void set_tx_pkt_split(const char *name);
> > >-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
> > >+int parse_fec_mode(const char *name, uint32_t *fec_capa);
> > 
> > I guess that the real reason behind is to fix implicit
> > conversion of enum pointer to/from uint32_t pointer.
> > I guess the problem is different signness of enum on
> > Windows compiler.
> 
> yes, compilers targeting targets will select `int' once all constants of
> the enumeration list are defined.
> 
> > 
> > If so, please, put real motivation of the changeset in summary.
> > It should be human-readable (and do not contain function name).
> > Explain details in the description.
> > 
> > Yes, I agree that mode is misleading here and should be mentioned
> > in the description, but I guess it is not the root cause.
> > May be I'm wrong.

Your understanding on the root cause is corret. Will fix the description in V15. Thanks.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable testpmd on Windows
  2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
                                               ` (8 preceding siblings ...)
  2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-06-29 20:23                             ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 1/9] lib: build libraries that testpmd depends on Jie Zhou
                                                 ` (9 more replies)
  9 siblings, 10 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
V15 changes:
    - Remove unnecessary Signed-off-by
    - Fix Patch #6 description to explain the root cause

---
V14 changes:
    - Use macros with arguments
    - Add missing spaces around '&'
    - Remove unnecessary constants
    - Remove unnecessary returned result check on QueryPerformanceXXX

---
V13 changes:
    - Resolve a patchset apply issue in patch2

---
V12 changes:
    - Fix indentation

---
V11 changes:
    - Add Acked-by from V9 and V10
    - Fix an error at ifndef'ing err flow for MP_ALLOC_NATIVE

---
V10 changes:
    - Remove unneeded newline in config.c
    - Add Fixes: and Cc: Stable for parse_fec_mode fix
    - More appropriate and granular commit messages
    - Use US_PER_S
    - Put signal inside ifndef

---
V9 changes:
    - Add clock_gettime for Windows into eal in rte_os_shim.h

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---


Jie Zhou (9):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  eal/Windows: add clock_gettime on Windows
  app/testpmd: resolve name collisions
  app/testpmd: fix parse_fec_mode return type name
  app/testpmd: replace POSIX specific code
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  86 ++---
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |  42 +++
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 28 files changed, 507 insertions(+), 327 deletions(-)
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 1/9] lib: build libraries that testpmd depends on
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 2/9] eal/windows: add necessary macros Jie Zhou
                                                 ` (8 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Enable building libraries that testpmd depends on for Windows

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index 4a64756a68..1673ca4323 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 2/9] eal/windows: add necessary macros
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 1/9] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 3/9] eal/windows: add device event stubs Jie Zhou
                                                 ` (7 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 1b314733b2..824d9748ba 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -21,6 +21,7 @@
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
 #ifndef RTE_TOOLCHAIN_GCC
+#define strcasecmp(s1, s2) _stricmp(s1, s2)
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 #endif
 
@@ -38,6 +39,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode) & S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 3/9] eal/windows: add device event stubs
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 1/9] lib: build libraries that testpmd depends on Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 2/9] eal/windows: add necessary macros Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
                                                 ` (6 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 0000000000..35191056fd
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec417..fc12fefd0d 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 4/9] eal/Windows: add clock_gettime on Windows
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
                                                 ` (2 preceding siblings ...)
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 3/9] eal/windows: add device event stubs Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 5/9] app/testpmd: resolve name collisions Jie Zhou
                                                 ` (5 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add clock_gettime on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/include/rte_os_shim.h | 33 +++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 824d9748ba..33619745ab 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -77,4 +77,37 @@ rte_timespec_get(struct timespec *now, int base)
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME                  0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC                 1
+
+typedef int clockid_t;
+
+static inline int
+rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	const int NS_PER_SEC = 1E9;
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+		return 0;
+	case CLOCK_MONOTONIC:
+		QueryPerformanceFrequency(&pf);
+		QueryPerformanceCounter(&pc);
+
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+		return 0;
+	default:
+		return -1;
+	}
+}
+#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 5/9] app/testpmd: resolve name collisions
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
                                                 ` (3 preceding siblings ...)
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
                                                 ` (4 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 1c587bb7b8..61882d5cbc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -895,14 +895,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -913,7 +913,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1927,111 +1927,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2062,7 +2062,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2077,7 +2077,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2091,42 +2091,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2134,8 +2134,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2144,22 +2144,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2176,14 +2176,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2191,21 +2191,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2213,7 +2213,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2228,7 +2228,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2245,7 +2245,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2256,54 +2256,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2370,7 +2370,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2390,7 +2390,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2404,7 +2404,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2418,7 +2418,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2431,7 +2431,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2444,34 +2444,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2490,25 +2490,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2522,41 +2522,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2570,49 +2570,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2626,7 +2626,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2634,7 +2634,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2642,35 +2642,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2684,28 +2684,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2719,14 +2719,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2740,21 +2740,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2768,28 +2768,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2803,7 +2803,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2816,7 +2816,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2831,7 +2831,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2852,7 +2852,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2860,7 +2860,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2875,7 +2875,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2885,14 +2885,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2900,7 +2900,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2924,7 +2924,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2938,20 +2938,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2978,20 +2978,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -3007,7 +3007,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3038,7 +3038,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3062,7 +3062,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3085,7 +3085,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3093,7 +3093,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3108,14 +3108,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3146,7 +3146,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3163,7 +3163,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3181,7 +3181,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3199,7 +3199,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3214,7 +3214,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3228,7 +3228,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3242,14 +3242,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3270,7 +3270,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3279,7 +3279,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3296,14 +3296,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3317,13 +3317,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3338,7 +3338,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3352,7 +3352,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3366,7 +3366,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3379,14 +3379,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3451,7 +3451,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3467,21 +3467,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3489,7 +3489,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3507,21 +3507,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3567,7 +3567,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3581,7 +3581,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3603,7 +3603,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3625,14 +3625,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3676,7 +3676,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3697,7 +3697,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3712,7 +3712,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3750,7 +3750,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3758,7 +3758,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3773,7 +3773,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3797,7 +3797,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3805,7 +3805,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3851,7 +3851,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3867,7 +3867,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3891,7 +3891,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3936,7 +3936,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3954,7 +3954,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3972,7 +3972,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3989,7 +3989,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -4007,7 +4007,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4115,7 +4115,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4132,7 +4132,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4149,7 +4149,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4166,7 +4166,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4183,7 +4183,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4247,7 +4247,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4263,7 +4263,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4278,7 +4278,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4292,7 +4292,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4306,7 +4306,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4320,7 +4320,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4403,7 +4403,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4432,7 +4432,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4440,7 +4440,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4449,7 +4449,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4458,7 +4458,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4498,7 +4498,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4531,14 +4531,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4546,7 +4546,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4562,7 +4562,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4570,7 +4570,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4586,7 +4586,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4602,7 +4602,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4620,7 +4620,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4634,7 +4634,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4648,7 +4648,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4687,7 +4687,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4697,7 +4697,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4781,8 +4781,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5139,34 +5139,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5247,7 +5247,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 6/9] app/testpmd: fix parse_fec_mode return type name
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
                                                 ` (4 preceding siblings ...)
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 5/9] app/testpmd: resolve name collisions Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 7/9] app/testpmd: replace POSIX specific code Jie Zhou
                                                 ` (3 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Passing an uint32_t pointer to an enum pointer parameter causes
pointer-sign warning on Windows (converts between pointers to
integer types with different sign), since enum is implicitly
converted to int on Windows.

And the current enum pointer parameter of that function is actually
misleading and should be fixed as an uint32_t pointer parameter.

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0268b18f95..dff5a75ec5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16997,17 +16997,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 43c79b5021..79526796e9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3617,13 +3617,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 283b5e3680..9ae4d90dd1 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 7/9] app/testpmd: replace POSIX specific code
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
                                                 ` (5 preceding siblings ...)
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 8/9] app/testpmd: fix unused function warnings Jie Zhou
                                                 ` (2 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now
 - Fix header inclusion
 - Include rte_os_shim.h in testpmd.h
 - Remove redundant headers

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/test-pmd/cmdline.c      |  6 +-----
 app/test-pmd/cmdline_flow.c |  2 --
 app/test-pmd/csumonly.c     |  2 +-
 app/test-pmd/icmpecho.c     |  4 ++--
 app/test-pmd/ieee1588fwd.c  |  8 ++++----
 app/test-pmd/parameters.c   | 11 +++++++----
 app/test-pmd/testpmd.c      | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h      |  3 ++-
 8 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index dff5a75ec5..bfd2fb9240 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,12 +8,8 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
@@ -3614,7 +3610,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 61882d5cbc..0168ff7dac 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335fe..089936587b 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e7902..8948f28eb5 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0c..034f238c34 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c63..5e69d2aa8c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
@@ -185,8 +184,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +212,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +611,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +726,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8ed1b97dec..1cdd3cdd12 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -629,6 +634,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -899,6 +905,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -969,9 +976,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -988,6 +997,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1028,6 +1038,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1054,7 +1065,9 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
+#endif
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
 			"Creation of mbuf pool for socket %u failed: %s\n",
@@ -3021,6 +3034,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3028,6 +3042,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3728,8 +3743,10 @@ signal_handler(int signum)
 		/* Set flag to indicate the force termination. */
 		f_quit = 1;
 		/* exit with the expected status */
+#ifndef RTE_EXEC_ENV_WINDOWS
 		signal(signum, SIG_DFL);
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3804,10 +3821,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3928,7 +3947,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(US_PER_S);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 9ae4d90dd1..d61a055bdd 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
@@ -762,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 8/9] app/testpmd: fix unused function warnings
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
                                                 ` (6 preceding siblings ...)
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 7/9] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Function print_fdir_mask and print_fdir_flex_payload are only called
when either i40e or ixgbe presents. Extend existing #if defined to
include these two functions, to remove "unused function" compilation
warning.

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 79526796e9..3723317ab4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4449,6 +4449,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4508,47 +4549,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v15 9/9] app/testpmd: enable building testpmd on Windows
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
                                                 ` (7 preceding siblings ...)
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 8/9] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-06-29 20:23                               ` Jie Zhou
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:23 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

From: Jie Zhou <jizh@microsoft.com>

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861bb..4c6049807c 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e047..db1fcadbfe 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b4..82ed05bb0b 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b41..14d36b33e9 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f0..edb9deef84 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6e..0898821200 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9d..f29c6ee863 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b7912..ef3582a87c 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 45c3ff4566..17be360677 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c0..3360ea02b0 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036a..a33cad9078 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f83231..7d123e32fb 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb60..02b101980e 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d7..3d15727a01 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 0a5f425578..f21e2cc1fa 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable testpmd on Windows
  2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
                                                 ` (8 preceding siblings ...)
  2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-06-29 20:50                               ` Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 1/9] lib: build libraries that testpmd depends on Jie Zhou
                                                   ` (9 more replies)
  9 siblings, 10 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

This patchset is to enable testpmd on windows. It mainly includes:
- Enable building libraries on Windows that testpmd depends on
- Add necessary macros required by testpmd on Windows in rte_os_shim.h
- Add device event stubs for Windows
- Resolve name collisions with Windows types
- Add clock_gettime in testpmd on Windows
- Fix parse_fec_mode to return fec_capa instead of mode
- Replace POSIX specific codes
- Disable unsupported Apps build on Windows
- Enable testpmd build on Windows

Future work:
- Some issues discovered at validation need further investigations
  * Perf inconsistency: TPUT fluctuated significantly from runs
  * After traffic stop, port stats shows pps being 0 while bps not
  * mempool allocation only succeed with native. Other methods failed
    at rte_mem_lock/VirtualLock.
- Hot-plug on Windows not supported yet
- Support mempool allocation native mode only for now

Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>

---
V16 changes:
    - Manually change Patch #9 From: email address to a proper one

---
V15 changes:
    - Remove unnecessary Signed-off-by
    - Fix Patch #6 description to explain the root cause
    - Remove a trailing whitespace in Patch #4

---
V14 changes:
    - Use macros with arguments
    - Add missing spaces around '&'
    - Remove unnecessary constants
    - Remove unnecessary returned result check on QueryPerformanceXXX

---
V13 changes:
    - Resolve a patchset apply issue in patch2

---
V12 changes:
    - Fix indentation

---
V11 changes:
    - Add Acked-by from V9 and V10
    - Fix an error at ifndef'ing err flow for MP_ALLOC_NATIVE

---
V10 changes:
    - Remove unneeded newline in config.c
    - Add Fixes: and Cc: Stable for parse_fec_mode fix
    - More appropriate and granular commit messages
    - Use US_PER_S
    - Put signal inside ifndef

---
V9 changes:
    - Add clock_gettime for Windows into eal in rte_os_shim.h

---
V8 changes:
    - Fix pointer location for _clock_gettime in config.h

---
V7 changes:
    - Resolve V6 patch set applying conflicts due to recent upstream
      merges of linux testpmd changes, lib\meson.build format change,
      lib path changes, and sources change in meson.build under app\
    - Move Windows clock_gettime related code from config.c into 
      config.h and leverage rte_os_shim.h for timespec_get
    - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
      fix unused function warnings"

---
V6 changes:
    - Fix "unused function" compilation warning when neither i40e
      nor ixgbe presents

---
V5 changes:
    - Remove macro trailing semicolon which missed to include in V4

---
V4 changes:
    - Split previous patch into more granular patches
    - Remove the bypass of rte_eal_cleanup at exit
    - Move all added macros into rte_os_shim.h
    - Remove redundant headers after the rte_os_shim patch merge
    - Revert the mman APIs replacement to leave relevant part UNIX only
    - Keep Windows library list the same structure and order as the 
      Unix library list in lib meson.build
	
---
V3 changes:
    - Split one patch into patchset
    - Replace mman APIs with rte_mem_xxx APIs
    - Use OS independant rte_rand
    - Add device event stubs for Windows
    - Disable unsupported Apps

---
V2 changes:
    - Fix commit message log long line issue
    - Fix coding style issues of pointer location
    - Fix indentation issue
    - Fix FreeBSD2101 compilation issue of AF_INET undeclared
---


Jie Zhou (9):
  lib: build libraries that testpmd depends on
  eal/windows: add necessary macros
  eal/windows: add device event stubs
  eal/Windows: add clock_gettime on Windows
  app/testpmd: resolve name collisions
  app/testpmd: fix parse_fec_mode return type name
  app/testpmd: replace POSIX specific code
  app/testpmd: fix unused function warnings
  app/testpmd: enable building testpmd on Windows

 app/meson.build                       |   4 -
 app/pdump/meson.build                 |   6 +
 app/proc-info/meson.build             |   6 +
 app/test-acl/meson.build              |   6 +
 app/test-bbdev/meson.build            |   6 +
 app/test-cmdline/meson.build          |   6 +
 app/test-compress-perf/meson.build    |   6 +
 app/test-crypto-perf/meson.build      |   6 +
 app/test-eventdev/meson.build         |   6 +
 app/test-fib/meson.build              |   6 +
 app/test-flow-perf/meson.build        |   6 +
 app/test-pipeline/meson.build         |   6 +
 app/test-pmd/cmdline.c                |  12 +-
 app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
 app/test-pmd/config.c                 |  86 ++---
 app/test-pmd/csumonly.c               |   2 +-
 app/test-pmd/icmpecho.c               |   4 +-
 app/test-pmd/ieee1588fwd.c            |   8 +-
 app/test-pmd/parameters.c             |  11 +-
 app/test-pmd/testpmd.c                |  21 +-
 app/test-pmd/testpmd.h                |   5 +-
 app/test-regex/meson.build            |   6 +
 app/test-sad/meson.build              |   6 +
 app/test/meson.build                  |   6 +
 lib/eal/windows/eal_dev.c             |  33 ++
 lib/eal/windows/include/rte_os_shim.h |  42 +++
 lib/eal/windows/meson.build           |   1 +
 lib/meson.build                       |   7 +
 28 files changed, 507 insertions(+), 327 deletions(-)
 create mode 100644 lib/eal/windows/eal_dev.c

-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 1/9] lib: build libraries that testpmd depends on
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 2/9] eal/windows: add necessary macros Jie Zhou
                                                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Enable building libraries that testpmd depends on for Windows

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/meson.build b/lib/meson.build
index 4a64756a68..1673ca4323 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -76,8 +76,15 @@ if is_windows
             'ethdev',
             'pci',
             'cmdline',
+            'metrics',
             'hash',
+            'timer',
+            'bitratestats',
             'cfgfile',
+            'gro',
+            'gso',
+            'latencystats',
+            'pdump',
     ] # only supported libraries for windows
 endif
 
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 2/9] eal/windows: add necessary macros
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 1/9] lib: build libraries that testpmd depends on Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 3/9] eal/windows: add device event stubs Jie Zhou
                                                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add required macros by testpmd on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/include/rte_os_shim.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 1b314733b2..824d9748ba 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -21,6 +21,7 @@
 #define strdup(str) _strdup(str)
 #define strtok_r(str, delim, saveptr) strtok_s(str, delim, saveptr)
 #ifndef RTE_TOOLCHAIN_GCC
+#define strcasecmp(s1, s2) _stricmp(s1, s2)
 #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count)
 #endif
 
@@ -38,6 +39,14 @@
 #define IPPROTO_SCTP	132
 #endif
 
+#ifndef IPDEFTTL
+#define IPDEFTTL 64
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode)  (((mode) & S_IFMT) == S_IFREG)
+#endif
+
 #ifdef RTE_TOOLCHAIN_GCC
 
 #define TIME_UTC 1
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 3/9] eal/windows: add device event stubs
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 1/9] lib: build libraries that testpmd depends on Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 2/9] eal/windows: add necessary macros Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
                                                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add device event stubs in eal_dev.c for Windows

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/eal_dev.c   | 33 +++++++++++++++++++++++++++++++++
 lib/eal/windows/meson.build |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 lib/eal/windows/eal_dev.c

diff --git a/lib/eal/windows/eal_dev.c b/lib/eal/windows/eal_dev.c
new file mode 100644
index 0000000000..35191056fd
--- /dev/null
+++ b/lib/eal/windows/eal_dev.c
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2021 Microsoft Corporation
+ */
+
+#include <rte_dev.h>
+
+int
+rte_dev_event_monitor_start(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_event_monitor_stop(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_enable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
+
+int
+rte_dev_hotplug_handle_disable(void)
+{
+	RTE_LOG(ERR, EAL, "Device event is not supported for Windows\n");
+	return -1;
+}
diff --git a/lib/eal/windows/meson.build b/lib/eal/windows/meson.build
index ff9cbec417..fc12fefd0d 100644
--- a/lib/eal/windows/meson.build
+++ b/lib/eal/windows/meson.build
@@ -7,6 +7,7 @@ sources += files(
         'eal.c',
         'eal_alarm.c',
         'eal_debug.c',
+        'eal_dev.c',
         'eal_file.c',
         'eal_hugepages.c',
         'eal_interrupts.c',
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 4/9] eal/Windows: add clock_gettime on Windows
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
                                                   ` (2 preceding siblings ...)
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 3/9] eal/windows: add device event stubs Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 5/9] app/testpmd: resolve name collisions Jie Zhou
                                                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Add clock_gettime on Windows in rte_os_shim.h

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/eal/windows/include/rte_os_shim.h | 33 +++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h
index 824d9748ba..33619745ab 100644
--- a/lib/eal/windows/include/rte_os_shim.h
+++ b/lib/eal/windows/include/rte_os_shim.h
@@ -77,4 +77,37 @@ rte_timespec_get(struct timespec *now, int base)
 
 #endif /* RTE_TOOLCHAIN_GCC */
 
+/* Identifier for system-wide realtime clock. */
+#define CLOCK_REALTIME                  0
+/* Monotonic system-wide clock. */
+#define CLOCK_MONOTONIC                 1
+
+typedef int clockid_t;
+
+static inline int
+rte_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+	const int NS_PER_SEC = 1E9;
+	LARGE_INTEGER pf, pc;
+	LONGLONG nsec;
+
+	switch (clock_id) {
+	case CLOCK_REALTIME:
+		if (timespec_get(tp, TIME_UTC) != TIME_UTC)
+			return -1;
+		return 0;
+	case CLOCK_MONOTONIC:
+		QueryPerformanceFrequency(&pf);
+		QueryPerformanceCounter(&pc);
+
+		nsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;
+		tp->tv_sec = nsec / NS_PER_SEC;
+		tp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;
+		return 0;
+	default:
+		return -1;
+	}
+}
+#define clock_gettime(clock_id, tp) rte_clock_gettime(clock_id, tp)
+
 #endif /* _RTE_OS_SHIM_ */
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 5/9] app/testpmd: resolve name collisions
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
                                                   ` (3 preceding siblings ...)
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-07-01 13:41                                   ` Andrew Rybchenko
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
                                                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Resolve name collisions with Windows types

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/test-pmd/cmdline_flow.c | 512 ++++++++++++++++++------------------
 1 file changed, 256 insertions(+), 256 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 1c587bb7b8..61882d5cbc 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -40,22 +40,22 @@ enum index {
 	END_SET,
 
 	/* Common tokens. */
-	INTEGER,
-	UNSIGNED,
-	PREFIX,
-	BOOLEAN,
-	STRING,
-	HEX,
-	FILE_PATH,
-	MAC_ADDR,
-	IPV4_ADDR,
-	IPV6_ADDR,
-	RULE_ID,
-	PORT_ID,
-	GROUP_ID,
-	PRIORITY_LEVEL,
-	INDIRECT_ACTION_ID,
-	POLICY_ID,
+	COMMON_INTEGER,
+	COMMON_UNSIGNED,
+	COMMON_PREFIX,
+	COMMON_BOOLEAN,
+	COMMON_STRING,
+	COMMON_HEX,
+	COMMON_FILE_PATH,
+	COMMON_MAC_ADDR,
+	COMMON_IPV4_ADDR,
+	COMMON_IPV6_ADDR,
+	COMMON_RULE_ID,
+	COMMON_PORT_ID,
+	COMMON_GROUP_ID,
+	COMMON_PRIORITY_LEVEL,
+	COMMON_INDIRECT_ACTION_ID,
+	COMMON_POLICY_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -104,13 +104,13 @@ enum index {
 	AGED_DESTROY,
 
 	/* Validate/create arguments. */
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
 
 	/* Dump arguments */
 	DUMP_ALL,
@@ -133,7 +133,7 @@ enum index {
 	INDIRECT_ACTION_DESTROY_ID,
 
 	/* Validate/create pattern. */
-	PATTERN,
+	ITEM_PATTERN,
 	ITEM_PARAM_IS,
 	ITEM_PARAM_SPEC,
 	ITEM_PARAM_LAST,
@@ -895,14 +895,14 @@ static const enum index next_ia_subcmd[] = {
 };
 
 static const enum index next_vc_attr[] = {
-	GROUP,
-	PRIORITY,
-	INGRESS,
-	EGRESS,
-	TRANSFER,
-	TUNNEL_SET,
-	TUNNEL_MATCH,
-	PATTERN,
+	VC_GROUP,
+	VC_PRIORITY,
+	VC_INGRESS,
+	VC_EGRESS,
+	VC_TRANSFER,
+	VC_TUNNEL_SET,
+	VC_TUNNEL_MATCH,
+	ITEM_PATTERN,
 	ZERO,
 };
 
@@ -913,7 +913,7 @@ static const enum index next_destroy_attr[] = {
 };
 
 static const enum index next_dump_attr[] = {
-	FILE_PATH,
+	COMMON_FILE_PATH,
 	END,
 	ZERO,
 };
@@ -1927,111 +1927,111 @@ static const struct token token_list[] = {
 		.help = "set command may end here",
 	},
 	/* Common tokens. */
-	[INTEGER] = {
+	[COMMON_INTEGER] = {
 		.name = "{int}",
 		.type = "INTEGER",
 		.help = "integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[UNSIGNED] = {
+	[COMMON_UNSIGNED] = {
 		.name = "{unsigned}",
 		.type = "UNSIGNED",
 		.help = "unsigned integer value",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PREFIX] = {
+	[COMMON_PREFIX] = {
 		.name = "{prefix}",
 		.type = "PREFIX",
 		.help = "prefix length for bit-mask",
 		.call = parse_prefix,
 		.comp = comp_none,
 	},
-	[BOOLEAN] = {
+	[COMMON_BOOLEAN] = {
 		.name = "{boolean}",
 		.type = "BOOLEAN",
 		.help = "any boolean value",
 		.call = parse_boolean,
 		.comp = comp_boolean,
 	},
-	[STRING] = {
+	[COMMON_STRING] = {
 		.name = "{string}",
 		.type = "STRING",
 		.help = "fixed string",
 		.call = parse_string,
 		.comp = comp_none,
 	},
-	[HEX] = {
+	[COMMON_HEX] = {
 		.name = "{hex}",
 		.type = "HEX",
 		.help = "fixed string",
 		.call = parse_hex,
 	},
-	[FILE_PATH] = {
+	[COMMON_FILE_PATH] = {
 		.name = "{file path}",
 		.type = "STRING",
 		.help = "file path",
 		.call = parse_string0,
 		.comp = comp_none,
 	},
-	[MAC_ADDR] = {
+	[COMMON_MAC_ADDR] = {
 		.name = "{MAC address}",
 		.type = "MAC-48",
 		.help = "standard MAC address notation",
 		.call = parse_mac_addr,
 		.comp = comp_none,
 	},
-	[IPV4_ADDR] = {
+	[COMMON_IPV4_ADDR] = {
 		.name = "{IPv4 address}",
 		.type = "IPV4 ADDRESS",
 		.help = "standard IPv4 address notation",
 		.call = parse_ipv4_addr,
 		.comp = comp_none,
 	},
-	[IPV6_ADDR] = {
+	[COMMON_IPV6_ADDR] = {
 		.name = "{IPv6 address}",
 		.type = "IPV6 ADDRESS",
 		.help = "standard IPv6 address notation",
 		.call = parse_ipv6_addr,
 		.comp = comp_none,
 	},
-	[RULE_ID] = {
+	[COMMON_RULE_ID] = {
 		.name = "{rule id}",
 		.type = "RULE ID",
 		.help = "rule identifier",
 		.call = parse_int,
 		.comp = comp_rule_id,
 	},
-	[PORT_ID] = {
+	[COMMON_PORT_ID] = {
 		.name = "{port_id}",
 		.type = "PORT ID",
 		.help = "port identifier",
 		.call = parse_port,
 		.comp = comp_port,
 	},
-	[GROUP_ID] = {
+	[COMMON_GROUP_ID] = {
 		.name = "{group_id}",
 		.type = "GROUP ID",
 		.help = "group identifier",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[PRIORITY_LEVEL] = {
+	[COMMON_PRIORITY_LEVEL] = {
 		.name = "{level}",
 		.type = "PRIORITY",
 		.help = "priority level",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[INDIRECT_ACTION_ID] = {
+	[COMMON_INDIRECT_ACTION_ID] = {
 		.name = "{indirect_action_id}",
 		.type = "INDIRECT_ACTION_ID",
 		.help = "indirect action id",
 		.call = parse_int,
 		.comp = comp_none,
 	},
-	[POLICY_ID] = {
+	[COMMON_POLICY_ID] = {
 		.name = "{policy_id}",
 		.type = "POLCIY_ID",
 		.help = "policy id",
@@ -2062,7 +2062,7 @@ static const struct token token_list[] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
 		.help = "manage indirect actions",
-		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_ia_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_ia,
 	},
@@ -2077,7 +2077,7 @@ static const struct token token_list[] = {
 		.name = "update",
 		.help = "update indirect action",
 		.next = NEXT(NEXT_ENTRY(INDIRECT_ACTION_SPEC),
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 		.call = parse_ia,
 	},
@@ -2091,42 +2091,42 @@ static const struct token token_list[] = {
 	[INDIRECT_ACTION_QUERY] = {
 		.name = "query",
 		.help = "query indirect action",
-		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(INDIRECT_ACTION_ID)),
+		.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.ia.action_id)),
 		.call = parse_ia,
 	},
 	[VALIDATE] = {
 		.name = "validate",
 		.help = "check whether a flow rule can be created",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[CREATE] = {
 		.name = "create",
 		.help = "create a flow rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_vc,
 	},
 	[DESTROY] = {
 		.name = "destroy",
 		.help = "destroy specific flow rules",
-		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(DESTROY_RULE), NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_destroy,
 	},
 	[FLUSH] = {
 		.name = "flush",
 		.help = "destroy all flow rules",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_flush,
 	},
 	[DUMP] = {
 		.name = "dump",
 		.help = "dump single/all flow rules to file",
-		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_dump_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_dump,
 	},
@@ -2134,8 +2134,8 @@ static const struct token token_list[] = {
 		.name = "query",
 		.help = "query an existing flow rule",
 		.next = NEXT(NEXT_ENTRY(QUERY_ACTION),
-			     NEXT_ENTRY(RULE_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_RULE_ID),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.query.action.type),
 			     ARGS_ENTRY(struct buffer, args.query.rule),
 			     ARGS_ENTRY(struct buffer, port)),
@@ -2144,22 +2144,22 @@ static const struct token token_list[] = {
 	[LIST] = {
 		.name = "list",
 		.help = "list existing flow rules",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_list,
 	},
 	[AGED] = {
 		.name = "aged",
 		.help = "list and destroy aged flows",
-		.next = NEXT(next_aged_attr, NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(next_aged_attr, NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_aged,
 	},
 	[ISOLATE] = {
 		.name = "isolate",
 		.help = "restrict ingress traffic to the defined flow rules",
-		.next = NEXT(NEXT_ENTRY(BOOLEAN),
-			     NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_BOOLEAN),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.isolate.set),
 			     ARGS_ENTRY(struct buffer, port)),
 		.call = parse_isolate,
@@ -2176,14 +2176,14 @@ static const struct token token_list[] = {
 		.name = "create",
 		.help = "create new tunnel object",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_CREATE_TYPE] = {
 		.name = "type",
 		.help = "create new tunnel",
-		.next = NEXT(NEXT_ENTRY(FILE_PATH)),
+		.next = NEXT(NEXT_ENTRY(COMMON_FILE_PATH)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)),
 		.call = parse_tunnel,
 	},
@@ -2191,21 +2191,21 @@ static const struct token token_list[] = {
 		.name = "destroy",
 		.help = "destroy tunel",
 		.next = NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID),
-			     NEXT_ENTRY(PORT_ID)),
+			     NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_DESTROY_ID] = {
 		.name = "id",
 		.help = "tunnel identifier to testroy",
-		.next = NEXT(NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_tunnel,
 	},
 	[TUNNEL_LIST] = {
 		.name = "list",
 		.help = "list existing tunnels",
-		.next = NEXT(NEXT_ENTRY(PORT_ID)),
+		.next = NEXT(NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
 		.call = parse_tunnel,
 	},
@@ -2213,7 +2213,7 @@ static const struct token token_list[] = {
 	[DESTROY_RULE] = {
 		.name = "rule",
 		.help = "specify a rule identifier",
-		.next = NEXT(next_destroy_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_destroy_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.destroy.rule)),
 		.call = parse_destroy,
 	},
@@ -2228,7 +2228,7 @@ static const struct token token_list[] = {
 	[DUMP_ONE] = {
 		.name = "rule",
 		.help = "dump one rule",
-		.next = NEXT(next_dump_attr, NEXT_ENTRY(RULE_ID)),
+		.next = NEXT(next_dump_attr, NEXT_ENTRY(COMMON_RULE_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.dump.file),
 				ARGS_ENTRY(struct buffer, args.dump.rule)),
 		.call = parse_dump,
@@ -2245,7 +2245,7 @@ static const struct token token_list[] = {
 	[LIST_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_list_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_list_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer, args.list.group)),
 		.call = parse_list,
 	},
@@ -2256,54 +2256,54 @@ static const struct token token_list[] = {
 		.comp = comp_none,
 	},
 	/* Validate/create attributes. */
-	[GROUP] = {
+	[VC_GROUP] = {
 		.name = "group",
 		.help = "specify a group",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(GROUP_ID)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_GROUP_ID)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, group)),
 		.call = parse_vc,
 	},
-	[PRIORITY] = {
+	[VC_PRIORITY] = {
 		.name = "priority",
 		.help = "specify a priority level",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(PRIORITY_LEVEL)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_PRIORITY_LEVEL)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_attr, priority)),
 		.call = parse_vc,
 	},
-	[INGRESS] = {
+	[VC_INGRESS] = {
 		.name = "ingress",
 		.help = "affect rule to ingress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[EGRESS] = {
+	[VC_EGRESS] = {
 		.name = "egress",
 		.help = "affect rule to egress",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TRANSFER] = {
+	[VC_TRANSFER] = {
 		.name = "transfer",
 		.help = "apply rule directly to endpoints found in pattern",
 		.next = NEXT(next_vc_attr),
 		.call = parse_vc,
 	},
-	[TUNNEL_SET] = {
+	[VC_TUNNEL_SET] = {
 		.name = "tunnel_set",
 		.help = "tunnel steer rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
-	[TUNNEL_MATCH] = {
+	[VC_TUNNEL_MATCH] = {
 		.name = "tunnel_match",
 		.help = "tunnel match rule",
-		.next = NEXT(next_vc_attr, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(next_vc_attr, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct tunnel_ops, id)),
 		.call = parse_vc,
 	},
 	/* Validate/create pattern. */
-	[PATTERN] = {
+	[ITEM_PATTERN] = {
 		.name = "pattern",
 		.help = "submit a list of pattern items",
 		.next = NEXT(next_item),
@@ -2370,7 +2370,7 @@ static const struct token token_list[] = {
 	[ITEM_ANY_NUM] = {
 		.name = "num",
 		.help = "number of layers covered",
-		.next = NEXT(item_any, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_any, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_any, num)),
 	},
 	[ITEM_PF] = {
@@ -2390,7 +2390,7 @@ static const struct token token_list[] = {
 	[ITEM_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(item_vf, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vf, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_vf, id)),
 	},
 	[ITEM_PHY_PORT] = {
@@ -2404,7 +2404,7 @@ static const struct token token_list[] = {
 	[ITEM_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(item_phy_port, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_phy_port, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_phy_port, index)),
 	},
 	[ITEM_PORT_ID] = {
@@ -2418,7 +2418,7 @@ static const struct token token_list[] = {
 	[ITEM_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(item_port_id, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_port_id, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_port_id, id)),
 	},
 	[ITEM_MARK] = {
@@ -2431,7 +2431,7 @@ static const struct token token_list[] = {
 	[ITEM_MARK_ID] = {
 		.name = "id",
 		.help = "Integer value to match against",
-		.next = NEXT(item_mark, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mark, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_mark, id)),
 	},
 	[ITEM_RAW] = {
@@ -2444,34 +2444,34 @@ static const struct token token_list[] = {
 	[ITEM_RAW_RELATIVE] = {
 		.name = "relative",
 		.help = "look for pattern after the previous item",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   relative, 1)),
 	},
 	[ITEM_RAW_SEARCH] = {
 		.name = "search",
 		.help = "search pattern from offset (see also limit)",
-		.next = NEXT(item_raw, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_raw,
 					   search, 1)),
 	},
 	[ITEM_RAW_OFFSET] = {
 		.name = "offset",
 		.help = "absolute or relative offset for pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(INTEGER), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_INTEGER), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, offset)),
 	},
 	[ITEM_RAW_LIMIT] = {
 		.name = "limit",
 		.help = "search area limit for start of pattern",
-		.next = NEXT(item_raw, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_raw, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_raw, limit)),
 	},
 	[ITEM_RAW_PATTERN] = {
 		.name = "pattern",
 		.help = "byte string to look for",
 		.next = NEXT(item_raw,
-			     NEXT_ENTRY(STRING),
+			     NEXT_ENTRY(COMMON_STRING),
 			     NEXT_ENTRY(ITEM_PARAM_IS,
 					ITEM_PARAM_SPEC,
 					ITEM_PARAM_MASK)),
@@ -2490,25 +2490,25 @@ static const struct token token_list[] = {
 	[ITEM_ETH_DST] = {
 		.name = "dst",
 		.help = "destination MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, dst)),
 	},
 	[ITEM_ETH_SRC] = {
 		.name = "src",
 		.help = "source MAC",
-		.next = NEXT(item_eth, NEXT_ENTRY(MAC_ADDR), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_MAC_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, src)),
 	},
 	[ITEM_ETH_TYPE] = {
 		.name = "type",
 		.help = "EtherType",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_eth, type)),
 	},
 	[ITEM_ETH_HAS_VLAN] = {
 		.name = "has_vlan",
 		.help = "packet header contains VLAN",
-		.next = NEXT(item_eth, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_eth, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_eth,
 					   has_vlan, 1)),
 	},
@@ -2522,41 +2522,41 @@ static const struct token token_list[] = {
 	[ITEM_VLAN_TCI] = {
 		.name = "tci",
 		.help = "tag control information",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)),
 	},
 	[ITEM_VLAN_PCP] = {
 		.name = "pcp",
 		.help = "priority code point",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\xe0\x00")),
 	},
 	[ITEM_VLAN_DEI] = {
 		.name = "dei",
 		.help = "drop eligible indicator",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x10\x00")),
 	},
 	[ITEM_VLAN_VID] = {
 		.name = "vid",
 		.help = "VLAN identifier",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_vlan,
 						  tci, "\x0f\xff")),
 	},
 	[ITEM_VLAN_INNER_TYPE] = {
 		.name = "inner_type",
 		.help = "inner EtherType",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan,
 					     inner_type)),
 	},
 	[ITEM_VLAN_HAS_MORE_VLAN] = {
 		.name = "has_more_vlan",
 		.help = "packet header contains another VLAN",
-		.next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_vlan,
 					   has_more_vlan, 1)),
 	},
@@ -2570,49 +2570,49 @@ static const struct token token_list[] = {
 	[ITEM_IPV4_TOS] = {
 		.name = "tos",
 		.help = "type of service",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.type_of_service)),
 	},
 	[ITEM_IPV4_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.packet_id)),
 	},
 	[ITEM_IPV4_FRAGMENT_OFFSET] = {
 		.name = "fragment_offset",
 		.help = "fragmentation flags and fragment offset",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.fragment_offset)),
 	},
 	[ITEM_IPV4_TTL] = {
 		.name = "ttl",
 		.help = "time to live",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.time_to_live)),
 	},
 	[ITEM_IPV4_PROTO] = {
 		.name = "proto",
 		.help = "next protocol ID",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.next_proto_id)),
 	},
 	[ITEM_IPV4_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV4_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param),
+		.next = NEXT(item_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4,
 					     hdr.dst_addr)),
 	},
@@ -2626,7 +2626,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_TC] = {
 		.name = "tc",
 		.help = "traffic class",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x0f\xf0\x00\x00")),
@@ -2634,7 +2634,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FLOW] = {
 		.name = "flow",
 		.help = "flow label",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_ipv6,
 						  hdr.vtc_flow,
 						  "\x00\x0f\xff\xff")),
@@ -2642,35 +2642,35 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_PROTO] = {
 		.name = "proto",
 		.help = "protocol (next header)",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.proto)),
 	},
 	[ITEM_IPV6_HOP] = {
 		.name = "hop",
 		.help = "hop limit",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.hop_limits)),
 	},
 	[ITEM_IPV6_SRC] = {
 		.name = "src",
 		.help = "source address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.src_addr)),
 	},
 	[ITEM_IPV6_DST] = {
 		.name = "dst",
 		.help = "destination address",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(IPV6_ADDR), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_IPV6_ADDR), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6,
 					     hdr.dst_addr)),
 	},
 	[ITEM_IPV6_HAS_FRAG_EXT] = {
 		.name = "has_frag_ext",
 		.help = "fragment packet attribute",
-		.next = NEXT(item_ipv6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_item_ipv6,
 					   has_frag_ext, 1)),
 	},
@@ -2684,28 +2684,28 @@ static const struct token token_list[] = {
 	[ITEM_ICMP_TYPE] = {
 		.name = "type",
 		.help = "ICMP packet type",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_type)),
 	},
 	[ITEM_ICMP_CODE] = {
 		.name = "code",
 		.help = "ICMP packet code",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_code)),
 	},
 	[ITEM_ICMP_IDENT] = {
 		.name = "ident",
 		.help = "ICMP packet identifier",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_ident)),
 	},
 	[ITEM_ICMP_SEQ] = {
 		.name = "seq",
 		.help = "ICMP packet sequence number",
-		.next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp,
 					     hdr.icmp_seq_nb)),
 	},
@@ -2719,14 +2719,14 @@ static const struct token token_list[] = {
 	[ITEM_UDP_SRC] = {
 		.name = "src",
 		.help = "UDP source port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.src_port)),
 	},
 	[ITEM_UDP_DST] = {
 		.name = "dst",
 		.help = "UDP destination port",
-		.next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_udp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp,
 					     hdr.dst_port)),
 	},
@@ -2740,21 +2740,21 @@ static const struct token token_list[] = {
 	[ITEM_TCP_SRC] = {
 		.name = "src",
 		.help = "TCP source port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.src_port)),
 	},
 	[ITEM_TCP_DST] = {
 		.name = "dst",
 		.help = "TCP destination port",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.dst_port)),
 	},
 	[ITEM_TCP_FLAGS] = {
 		.name = "flags",
 		.help = "TCP flags",
-		.next = NEXT(item_tcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_tcp,
 					     hdr.tcp_flags)),
 	},
@@ -2768,28 +2768,28 @@ static const struct token token_list[] = {
 	[ITEM_SCTP_SRC] = {
 		.name = "src",
 		.help = "SCTP source port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.src_port)),
 	},
 	[ITEM_SCTP_DST] = {
 		.name = "dst",
 		.help = "SCTP destination port",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.dst_port)),
 	},
 	[ITEM_SCTP_TAG] = {
 		.name = "tag",
 		.help = "validation tag",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.tag)),
 	},
 	[ITEM_SCTP_CKSUM] = {
 		.name = "cksum",
 		.help = "checksum",
-		.next = NEXT(item_sctp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_sctp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_sctp,
 					     hdr.cksum)),
 	},
@@ -2803,7 +2803,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_VNI] = {
 		.name = "vni",
 		.help = "VXLAN identifier",
-		.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
 	},
 	[ITEM_E_TAG] = {
@@ -2816,7 +2816,7 @@ static const struct token token_list[] = {
 	[ITEM_E_TAG_GRP_ECID_B] = {
 		.name = "grp_ecid_b",
 		.help = "GRP and E-CID base",
-		.next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_e_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
 						  rsvd_grp_ecid_b,
 						  "\x3f\xff")),
@@ -2831,7 +2831,7 @@ static const struct token token_list[] = {
 	[ITEM_NVGRE_TNI] = {
 		.name = "tni",
 		.help = "virtual subnet ID",
-		.next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_nvgre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
 	},
 	[ITEM_MPLS] = {
@@ -2844,7 +2844,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_LABEL] = {
 		.name = "label",
 		.help = "MPLS label",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\xff\xff\xf0")),
@@ -2852,7 +2852,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_TC] = {
 		.name = "tc",
 		.help = "MPLS Traffic Class",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x0e")),
@@ -2860,7 +2860,7 @@ static const struct token token_list[] = {
 	[ITEM_MPLS_S] = {
 		.name = "s",
 		.help = "MPLS Bottom-of-Stack",
-		.next = NEXT(item_mpls, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_mpls, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_mpls,
 						  label_tc_s,
 						  "\x00\x00\x01")),
@@ -2875,7 +2875,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_PROTO] = {
 		.name = "protocol",
 		.help = "GRE protocol type",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     protocol)),
 	},
@@ -2885,14 +2885,14 @@ static const struct token token_list[] = {
 			"checksum (1b), undefined (1b), key bit (1b),"
 			" sequence number (1b), reserved 0 (9b),"
 			" version (3b)",
-		.next = NEXT(item_gre, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gre,
 					     c_rsvd0_ver)),
 	},
 	[ITEM_GRE_C_BIT] = {
 		.name = "c_bit",
 		.help = "checksum bit (C)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x80\x00\x00\x00")),
@@ -2900,7 +2900,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_S_BIT] = {
 		.name = "s_bit",
 		.help = "sequence number bit (S)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x10\x00\x00\x00")),
@@ -2908,7 +2908,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_K_BIT] = {
 		.name = "k_bit",
 		.help = "key bit (K)",
-		.next = NEXT(item_gre, NEXT_ENTRY(BOOLEAN), item_param),
+		.next = NEXT(item_gre, NEXT_ENTRY(COMMON_BOOLEAN), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_gre,
 						  c_rsvd0_ver,
 						  "\x20\x00\x00\x00")),
@@ -2924,7 +2924,7 @@ static const struct token token_list[] = {
 	[ITEM_FUZZY_THRESH] = {
 		.name = "thresh",
 		.help = "match accuracy threshold",
-		.next = NEXT(item_fuzzy, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_fuzzy, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,
 					thresh)),
 	},
@@ -2938,20 +2938,20 @@ static const struct token token_list[] = {
 	[ITEM_GTP_FLAGS] = {
 		.name = "v_pt_rsv_flags",
 		.help = "GTP flags",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp,
 					v_pt_rsv_flags)),
 	},
 	[ITEM_GTP_MSG_TYPE] = {
 		.name = "msg_type",
 		.help = "GTP message type",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_gtp, msg_type)),
 	},
 	[ITEM_GTP_TEID] = {
 		.name = "teid",
 		.help = "tunnel endpoint identifier",
-		.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),
 	},
 	[ITEM_GTPC] = {
@@ -2978,20 +2978,20 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_VNI] = {
 		.name = "vni",
 		.help = "virtual network identifier",
-		.next = NEXT(item_geneve, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.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),
+		.next = NEXT(item_geneve, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_geneve,
 						  ver_opt_len_o_c_rsvd0,
 						  "\x3f\x00")),
@@ -3007,7 +3007,7 @@ static const struct token token_list[] = {
 	[ITEM_VXLAN_GPE_VNI] = {
 		.name = "vni",
 		.help = "VXLAN-GPE identifier",
-		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe,
 					     vni)),
 	},
@@ -3022,7 +3022,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SHA] = {
 		.name = "sha",
 		.help = "sender hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     sha)),
@@ -3030,7 +3030,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_SPA] = {
 		.name = "spa",
 		.help = "sender IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     spa)),
@@ -3038,7 +3038,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_THA] = {
 		.name = "tha",
 		.help = "target hardware address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tha)),
@@ -3046,7 +3046,7 @@ static const struct token token_list[] = {
 	[ITEM_ARP_ETH_IPV4_TPA] = {
 		.name = "tpa",
 		.help = "target IPv4 address",
-		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(IPV4_ADDR),
+		.next = NEXT(item_arp_eth_ipv4, NEXT_ENTRY(COMMON_IPV4_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_arp_eth_ipv4,
 					     tpa)),
@@ -3062,7 +3062,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ipv6_ext, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_ext,
 					     next_hdr)),
 	},
@@ -3077,7 +3077,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_NEXT_HDR] = {
 		.name = "next_hdr",
 		.help = "next header",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ipv6_frag_ext,
 					hdr.next_header)),
@@ -3085,7 +3085,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_FRAG_DATA] = {
 		.name = "frag_data",
 		.help = "fragment flags and offset",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.frag_data)),
@@ -3093,7 +3093,7 @@ static const struct token token_list[] = {
 	[ITEM_IPV6_FRAG_EXT_ID] = {
 		.name = "packet_id",
 		.help = "fragment packet id",
-		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_ipv6_frag_ext, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6_frag_ext,
 					     hdr.id)),
@@ -3108,14 +3108,14 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_TYPE] = {
 		.name = "type",
 		.help = "ICMPv6 type",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     type)),
 	},
 	[ITEM_ICMP6_CODE] = {
 		.name = "code",
 		.help = "ICMPv6 code",
-		.next = NEXT(item_icmp6, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_icmp6, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6,
 					     code)),
 	},
@@ -3130,7 +3130,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NS_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_ns, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_ns,
 					     target_addr)),
@@ -3146,7 +3146,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_NA_TARGET_ADDR] = {
 		.name = "target_addr",
 		.help = "target address",
-		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(IPV6_ADDR),
+		.next = NEXT(item_icmp6_nd_na, NEXT_ENTRY(COMMON_IPV6_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_na,
 					     target_addr)),
@@ -3163,7 +3163,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TYPE] = {
 		.name = "type",
 		.help = "ND option type",
-		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_icmp6_nd_opt, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_nd_opt,
 					     type)),
@@ -3181,7 +3181,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_SLA_ETH_SLA] = {
 		.name = "sla",
 		.help = "source Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_sla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_sla_eth, sla)),
@@ -3199,7 +3199,7 @@ static const struct token token_list[] = {
 	[ITEM_ICMP6_ND_OPT_TLA_ETH_TLA] = {
 		.name = "tla",
 		.help = "target Ethernet LLA",
-		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(MAC_ADDR),
+		.next = NEXT(item_icmp6_nd_opt_tla_eth, NEXT_ENTRY(COMMON_MAC_ADDR),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_icmp6_nd_opt_tla_eth, tla)),
@@ -3214,7 +3214,7 @@ static const struct token token_list[] = {
 	[ITEM_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(item_meta, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_meta, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_MASK(struct rte_flow_item_meta,
 					     data, "\xff\xff\xff\xff")),
 	},
@@ -3228,7 +3228,7 @@ static const struct token token_list[] = {
 	[ITEM_GRE_KEY_VALUE] = {
 		.name = "value",
 		.help = "key value",
-		.next = NEXT(item_gre_key, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gre_key, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 	},
 	[ITEM_GTP_PSC] = {
@@ -3242,14 +3242,14 @@ static const struct token token_list[] = {
 	[ITEM_GTP_PSC_QFI] = {
 		.name = "qfi",
 		.help = "QoS flow identifier",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					qfi)),
 	},
 	[ITEM_GTP_PSC_PDU_T] = {
 		.name = "pdu_t",
 		.help = "PDU type",
-		.next = NEXT(item_gtp_psc, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_gtp_psc, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp_psc,
 					pdu_type)),
 	},
@@ -3270,7 +3270,7 @@ static const struct token token_list[] = {
 	[ITEM_PPPOE_SEID] = {
 		.name = "seid",
 		.help = "session identifier",
-		.next = NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pppoes, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pppoe,
 					session_id)),
 	},
@@ -3279,7 +3279,7 @@ static const struct token token_list[] = {
 		.help = "match PPPoE session protocol identifier",
 		.priv = PRIV_ITEM(PPPOE_PROTO_ID,
 				sizeof(struct rte_flow_item_pppoe_proto_id)),
-		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_pppoe_proto_id, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_item_pppoe_proto_id, proto_id)),
@@ -3296,14 +3296,14 @@ static const struct token token_list[] = {
 	[ITEM_HIGIG2_CLASSIFICATION] = {
 		.name = "classification",
 		.help = "matches classification of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.classification)),
 	},
 	[ITEM_HIGIG2_VID] = {
 		.name = "vid",
 		.help = "matches vid of higig2 header",
-		.next = NEXT(item_higig2, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_higig2, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_higig2_hdr,
 					hdr.ppt1.vid)),
 	},
@@ -3317,13 +3317,13 @@ static const struct token token_list[] = {
 	[ITEM_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, data)),
 	},
 	[ITEM_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array to match",
-		.next = NEXT(item_tag, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_tag, NEXT_ENTRY(COMMON_UNSIGNED),
 			     NEXT_ENTRY(ITEM_PARAM_IS)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_tag, index)),
 	},
@@ -3338,7 +3338,7 @@ static const struct token token_list[] = {
 	[ITEM_L2TPV3OIP_SESSION_ID] = {
 		.name = "session_id",
 		.help = "session identifier",
-		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_l2tpv3oip, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_l2tpv3oip,
 					     session_id)),
 	},
@@ -3352,7 +3352,7 @@ static const struct token token_list[] = {
 	[ITEM_ESP_SPI] = {
 		.name = "spi",
 		.help = "security policy index",
-		.next = NEXT(item_esp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_esp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp,
 				hdr.spi)),
 	},
@@ -3366,7 +3366,7 @@ static const struct token token_list[] = {
 	[ITEM_AH_SPI] = {
 		.name = "spi",
 		.help = "security parameters index",
-		.next = NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_ah, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, spi)),
 	},
 	[ITEM_PFCP] = {
@@ -3379,14 +3379,14 @@ static const struct token token_list[] = {
 	[ITEM_PFCP_S_FIELD] = {
 		.name = "s_field",
 		.help = "S field",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp,
 				s_field)),
 	},
 	[ITEM_PFCP_SEID] = {
 		.name = "seid",
 		.help = "session endpoint identifier",
-		.next = NEXT(item_pfcp, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_pfcp, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_pfcp, seid)),
 	},
 	[ITEM_ECPRI] = {
@@ -3419,7 +3419,7 @@ static const struct token token_list[] = {
 		.help = "Physical Channel ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_IQ_DATA_PCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type0.pc_id)),
 	},
@@ -3435,7 +3435,7 @@ static const struct token token_list[] = {
 		.help = "Real-Time Control Data ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_RTC_CTRL_RTCID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type2.rtc_id)),
 	},
@@ -3451,7 +3451,7 @@ static const struct token token_list[] = {
 		.help = "Measurement ID",
 		.next = NEXT(NEXT_ENTRY(ITEM_ECPRI_MSG_DLY_MSR_MSRID,
 				ITEM_ECPRI_COMMON, ITEM_NEXT),
-				NEXT_ENTRY(UNSIGNED), item_param),
+				NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ecpri,
 				hdr.type5.msr_id)),
 	},
@@ -3467,21 +3467,21 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_CLASS]	= {
 		.name = "class",
 		.help = "GENEVE option class",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_geneve_opt,
 					     option_class)),
 	},
 	[ITEM_GENEVE_OPT_TYPE] = {
 		.name = "type",
 		.help = "GENEVE option type",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt,
 					option_type)),
 	},
 	[ITEM_GENEVE_OPT_LENGTH] = {
 		.name = "length",
 		.help = "GENEVE option data length (in 32b words)",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(UNSIGNED), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_UNSIGNED), item_param),
 		.args = ARGS(ARGS_ENTRY_BOUNDED(
 				struct rte_flow_item_geneve_opt, option_len,
 				0, 31)),
@@ -3489,7 +3489,7 @@ static const struct token token_list[] = {
 	[ITEM_GENEVE_OPT_DATA] = {
 		.name = "data",
 		.help = "GENEVE option data pattern",
-		.next = NEXT(item_geneve_opt, NEXT_ENTRY(HEX), item_param),
+		.next = NEXT(item_geneve_opt, NEXT_ENTRY(COMMON_HEX), item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_geneve_opt, data),
 			     ARGS_ENTRY_ARB(0, 0),
 			     ARGS_ENTRY_ARB
@@ -3507,21 +3507,21 @@ static const struct token token_list[] = {
 	[ITEM_INTEGRITY_LEVEL] = {
 		.name = "level",
 		.help = "integrity level",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, level)),
 	},
 	[ITEM_INTEGRITY_VALUE] = {
 		.name = "value",
 		.help = "integrity value",
-		.next = NEXT(item_integrity_lv, NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(item_integrity_lv, NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_integrity, value)),
 	},
 	[ITEM_CONNTRACK] = {
 		.name = "conntrack",
 		.help = "conntrack state",
-		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(UNSIGNED),
+		.next = NEXT(NEXT_ENTRY(ITEM_NEXT), NEXT_ENTRY(COMMON_UNSIGNED),
 			     item_param),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_item_conntrack, flags)),
 	},
@@ -3567,7 +3567,7 @@ static const struct token token_list[] = {
 	[ACTION_JUMP_GROUP] = {
 		.name = "group",
 		.help = "group to redirect traffic to",
-		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_jump, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
 		.call = parse_vc_conf,
 	},
@@ -3581,7 +3581,7 @@ static const struct token token_list[] = {
 	[ACTION_MARK_ID] = {
 		.name = "id",
 		.help = "32 bit value to return with packets",
-		.next = NEXT(action_mark, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_mark, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_mark, id)),
 		.call = parse_vc_conf,
 	},
@@ -3603,7 +3603,7 @@ static const struct token token_list[] = {
 	[ACTION_QUEUE_INDEX] = {
 		.name = "index",
 		.help = "queue index to use",
-		.next = NEXT(action_queue, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_queue, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_queue, index)),
 		.call = parse_vc_conf,
 	},
@@ -3625,14 +3625,14 @@ static const struct token token_list[] = {
 	[ACTION_COUNT_ID] = {
 		.name = "identifier",
 		.help = "counter identifier to use",
-		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_COUNT_SHARED] = {
 		.name = "shared",
 		.help = "shared counter",
-		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_count, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
 					   shared, 1)),
 		.call = parse_vc_conf,
@@ -3676,7 +3676,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_LEVEL] = {
 		.name = "level",
 		.help = "encapsulation level for \"types\"",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, level),
@@ -3697,7 +3697,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY] = {
 		.name = "key",
 		.help = "RSS hash key",
-		.next = NEXT(action_rss, NEXT_ENTRY(HEX)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_HEX)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key),
@@ -3712,7 +3712,7 @@ static const struct token token_list[] = {
 	[ACTION_RSS_KEY_LEN] = {
 		.name = "key_len",
 		.help = "RSS hash key length in bytes",
-		.next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_rss, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB_BOUNDED
 			     (offsetof(struct action_rss_data, conf) +
 			      offsetof(struct rte_flow_action_rss, key_len),
@@ -3750,7 +3750,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ORIGINAL] = {
 		.name = "original",
 		.help = "use original VF ID if possible",
-		.next = NEXT(action_vf, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_vf,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3758,7 +3758,7 @@ static const struct token token_list[] = {
 	[ACTION_VF_ID] = {
 		.name = "id",
 		.help = "VF ID",
-		.next = NEXT(action_vf, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_vf, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_vf, id)),
 		.call = parse_vc_conf,
 	},
@@ -3773,7 +3773,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_ORIGINAL] = {
 		.name = "original",
 		.help = "use original port index if possible",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_phy_port,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3781,7 +3781,7 @@ static const struct token token_list[] = {
 	[ACTION_PHY_PORT_INDEX] = {
 		.name = "index",
 		.help = "physical port index",
-		.next = NEXT(action_phy_port, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_phy_port, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_phy_port,
 					index)),
 		.call = parse_vc_conf,
@@ -3797,7 +3797,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ORIGINAL] = {
 		.name = "original",
 		.help = "use original DPDK port ID if possible",
-		.next = NEXT(action_port_id, NEXT_ENTRY(BOOLEAN)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_BOOLEAN)),
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_port_id,
 					   original, 1)),
 		.call = parse_vc_conf,
@@ -3805,7 +3805,7 @@ static const struct token token_list[] = {
 	[ACTION_PORT_ID_ID] = {
 		.name = "id",
 		.help = "DPDK port ID",
-		.next = NEXT(action_port_id, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_port_id, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_port_id, id)),
 		.call = parse_vc_conf,
 	},
@@ -3851,7 +3851,7 @@ static const struct token token_list[] = {
 	[ACTION_METER_ID] = {
 		.name = "mtr_id",
 		.help = "meter id to use",
-		.next = NEXT(action_meter, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_meter, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_meter, mtr_id)),
 		.call = parse_vc_conf,
 	},
@@ -3867,7 +3867,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_MPLS_TTL_MPLS_TTL] = {
 		.name = "mpls_ttl",
 		.help = "MPLS TTL",
-		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_mpls_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_mpls_ttl,
 					mpls_ttl)),
 		.call = parse_vc_conf,
@@ -3891,7 +3891,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_NW_TTL_NW_TTL] = {
 		.name = "nw_ttl",
 		.help = "IP TTL",
-		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_nw_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_of_set_nw_ttl,
 					nw_ttl)),
 		.call = parse_vc_conf,
@@ -3936,7 +3936,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_VLAN_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_vlan, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_vlan,
 			      ethertype)),
@@ -3954,7 +3954,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_VID_VLAN_VID] = {
 		.name = "vlan_vid",
 		.help = "VLAN id",
-		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_vid, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_vid,
 			      vlan_vid)),
@@ -3972,7 +3972,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_SET_VLAN_PCP_VLAN_PCP] = {
 		.name = "vlan_pcp",
 		.help = "VLAN priority",
-		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_set_vlan_pcp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_set_vlan_pcp,
 			      vlan_pcp)),
@@ -3989,7 +3989,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_POP_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_pop_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_pop_mpls,
 			      ethertype)),
@@ -4007,7 +4007,7 @@ static const struct token token_list[] = {
 	[ACTION_OF_PUSH_MPLS_ETHERTYPE] = {
 		.name = "ethertype",
 		.help = "EtherType",
-		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_of_push_mpls, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_of_push_mpls,
 			      ethertype)),
@@ -4115,7 +4115,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_SRC_IPV4_SRC] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 source address to set",
-		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_src, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4132,7 +4132,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DST_IPV4_DST] = {
 		.name = "ipv4_addr",
 		.help = "new IPv4 destination address to set",
-		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(IPV4_ADDR)),
+		.next = NEXT(action_set_ipv4_dst, NEXT_ENTRY(COMMON_IPV4_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv4, ipv4_addr)),
 		.call = parse_vc_conf,
@@ -4149,7 +4149,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_SRC_IPV6_SRC] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 source address to set",
-		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_src, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4166,7 +4166,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DST_IPV6_DST] = {
 		.name = "ipv6_addr",
 		.help = "new IPv6 destination address to set",
-		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(IPV6_ADDR)),
+		.next = NEXT(action_set_ipv6_dst, NEXT_ENTRY(COMMON_IPV6_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			(struct rte_flow_action_set_ipv6, ipv6_addr)),
 		.call = parse_vc_conf,
@@ -4183,7 +4183,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_SRC_TP_SRC] = {
 		.name = "port",
 		.help = "new source port number to set",
-		.next = NEXT(action_set_tp_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4200,7 +4200,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TP_DST_TP_DST] = {
 		.name = "port",
 		.help = "new destination port number to set",
-		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tp_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_tp, port)),
 		.call = parse_vc_conf,
@@ -4231,7 +4231,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TTL_TTL] = {
 		.name = "ttl_value",
 		.help = "new ttl value to set",
-		.next = NEXT(action_set_ttl, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ttl, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_ttl, ttl_value)),
 		.call = parse_vc_conf,
@@ -4247,7 +4247,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_SRC_MAC_SRC] = {
 		.name = "mac_addr",
 		.help = "new source mac address",
-		.next = NEXT(action_set_mac_src, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_src, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4263,7 +4263,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_MAC_DST_MAC_DST] = {
 		.name = "mac_addr",
 		.help = "new destination mac address to set",
-		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(MAC_ADDR)),
+		.next = NEXT(action_set_mac_dst, NEXT_ENTRY(COMMON_MAC_ADDR)),
 		.args = ARGS(ARGS_ENTRY_HTON
 			     (struct rte_flow_action_set_mac, mac_addr)),
 		.call = parse_vc_conf,
@@ -4278,7 +4278,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP sequence number by",
-		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4292,7 +4292,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_SEQ_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP sequence number by",
-		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_seq, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4306,7 +4306,7 @@ static const struct token token_list[] = {
 	[ACTION_INC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to increase TCP acknowledgment number by",
-		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_inc_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4320,7 +4320,7 @@ static const struct token token_list[] = {
 	[ACTION_DEC_TCP_ACK_VALUE] = {
 		.name = "value",
 		.help = "the value to decrease TCP acknowledgment number by",
-		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_dec_tcp_ack, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARG_ENTRY_HTON(rte_be32_t)),
 		.call = parse_vc_conf,
 	},
@@ -4403,7 +4403,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_LEVEL] = {
 		.name = "dst_level",
 		.help = "destination field level",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.level)),
 		.call = parse_vc_conf,
@@ -4411,7 +4411,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_DST_OFFSET] = {
 		.name = "dst_offset",
 		.help = "destination field bit offset",
-		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_dst, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					dst.offset)),
 		.call = parse_vc_conf,
@@ -4432,7 +4432,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_LEVEL] = {
 		.name = "src_level",
 		.help = "source field level",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.level)),
 		.call = parse_vc_conf,
@@ -4440,7 +4440,7 @@ static const struct token token_list[] = {
 	[ACTION_MODIFY_FIELD_SRC_OFFSET] = {
 		.name = "src_offset",
 		.help = "source field bit offset",
-		.next = NEXT(action_modify_field_src, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_modify_field_src, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.offset)),
 		.call = parse_vc_conf,
@@ -4449,7 +4449,7 @@ static const struct token token_list[] = {
 		.name = "src_value",
 		.help = "source immediate value",
 		.next = NEXT(NEXT_ENTRY(ACTION_MODIFY_FIELD_WIDTH),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					src.value)),
 		.call = parse_vc_conf,
@@ -4458,7 +4458,7 @@ static const struct token token_list[] = {
 		.name = "width",
 		.help = "number of bits to copy",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT),
-			NEXT_ENTRY(UNSIGNED)),
+			NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_modify_field,
 					width)),
 		.call = parse_vc_conf,
@@ -4498,7 +4498,7 @@ static const struct token token_list[] = {
 	},
 	[SET_RAW_INDEX] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "index of raw_encap/raw_decap data",
 		.next = NEXT(next_item),
 		.call = parse_port,
@@ -4531,14 +4531,14 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_INDEX] = {
 		.name = "index",
 		.help = "index of tag array",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_set_tag, index)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SET_TAG_DATA] = {
 		.name = "data",
 		.help = "tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, data)),
 		.call = parse_vc_conf,
@@ -4546,7 +4546,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_TAG_MASK] = {
 		.name = "mask",
 		.help = "mask for tag value",
-		.next = NEXT(action_set_tag, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_tag, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_tag, mask)),
 		.call = parse_vc_conf,
@@ -4562,7 +4562,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_DATA] = {
 		.name = "data",
 		.help = "metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, data)),
 		.call = parse_vc_conf,
@@ -4570,7 +4570,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_META_MASK] = {
 		.name = "mask",
 		.help = "mask for metadata value",
-		.next = NEXT(action_set_meta, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_meta, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_meta, mask)),
 		.call = parse_vc_conf,
@@ -4586,7 +4586,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV4_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv4 DSCP value to set",
-		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv4_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4602,7 +4602,7 @@ static const struct token token_list[] = {
 	[ACTION_SET_IPV6_DSCP_VALUE] = {
 		.name = "dscp_value",
 		.help = "new IPv6 DSCP value to set",
-		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_set_ipv6_dscp, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY
 			     (struct rte_flow_action_set_dscp, dscp)),
 		.call = parse_vc_conf,
@@ -4620,7 +4620,7 @@ static const struct token token_list[] = {
 		.help = "flow age timeout value",
 		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_age,
 					   timeout, 24)),
-		.next = NEXT(action_age, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_age, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.call = parse_vc_conf,
 	},
 	[ACTION_SAMPLE] = {
@@ -4634,7 +4634,7 @@ static const struct token token_list[] = {
 	[ACTION_SAMPLE_RATIO] = {
 		.name = "ratio",
 		.help = "flow sample ratio value",
-		.next = NEXT(action_sample, NEXT_ENTRY(UNSIGNED)),
+		.next = NEXT(action_sample, NEXT_ENTRY(COMMON_UNSIGNED)),
 		.args = ARGS(ARGS_ENTRY_ARB
 			     (offsetof(struct action_sample_data, conf) +
 			      offsetof(struct rte_flow_action_sample, ratio),
@@ -4648,7 +4648,7 @@ static const struct token token_list[] = {
 	},
 	[ACTION_SAMPLE_INDEX_VALUE] = {
 		.name = "{index}",
-		.type = "UNSIGNED",
+		.type = "COMMON_UNSIGNED",
 		.help = "unsigned integer value",
 		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
 		.call = parse_vc_action_sample_index,
@@ -4687,7 +4687,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to destroy",
 		.next = NEXT(next_ia_destroy_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
 					    args.ia_destroy.action_id)),
 		.call = parse_ia_destroy,
@@ -4697,7 +4697,7 @@ static const struct token token_list[] = {
 		.name = "action_id",
 		.help = "specify a indirect action id to create",
 		.next = NEXT(next_ia_create_attr,
-			     NEXT_ENTRY(INDIRECT_ACTION_ID)),
+			     NEXT_ENTRY(COMMON_INDIRECT_ACTION_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.vc.attr.group)),
 	},
 	[ACTION_INDIRECT] = {
@@ -4781,8 +4781,8 @@ static const struct token token_list[] = {
 		.next = NEXT(NEXT_ENTRY(ACTION_POL_R),
 				NEXT_ENTRY(ACTION_POL_Y),
 				NEXT_ENTRY(ACTION_POL_G),
-				NEXT_ENTRY(POLICY_ID),
-				NEXT_ENTRY(PORT_ID)),
+				NEXT_ENTRY(COMMON_POLICY_ID),
+				NEXT_ENTRY(COMMON_PORT_ID)),
 		.args = ARGS(ARGS_ENTRY(struct buffer, args.policy.policy_id),
 				ARGS_ENTRY(struct buffer, port)),
 		.call = parse_mp,
@@ -5139,34 +5139,34 @@ parse_vc(struct context *ctx, const struct token *token,
 	default:
 		ctx->object = &out->args.vc.attr;
 		break;
-	case TUNNEL_SET:
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_SET:
+	case VC_TUNNEL_MATCH:
 		ctx->object = &out->args.vc.tunnel_ops;
 		break;
 	}
 	ctx->objmask = NULL;
 	switch (ctx->curr) {
-	case GROUP:
-	case PRIORITY:
+	case VC_GROUP:
+	case VC_PRIORITY:
 		return len;
-	case TUNNEL_SET:
+	case VC_TUNNEL_SET:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.actions = 1;
 		return len;
-	case TUNNEL_MATCH:
+	case VC_TUNNEL_MATCH:
 		out->args.vc.tunnel_ops.enabled = 1;
 		out->args.vc.tunnel_ops.items = 1;
 		return len;
-	case INGRESS:
+	case VC_INGRESS:
 		out->args.vc.attr.ingress = 1;
 		return len;
-	case EGRESS:
+	case VC_EGRESS:
 		out->args.vc.attr.egress = 1;
 		return len;
-	case TRANSFER:
+	case VC_TRANSFER:
 		out->args.vc.attr.transfer = 1;
 		return len;
-	case PATTERN:
+	case ITEM_PATTERN:
 		out->args.vc.pattern =
 			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
 					       sizeof(double));
@@ -5247,7 +5247,7 @@ parse_vc_spec(struct context *ctx, const struct token *token,
 		return -1;
 	/* Parse parameter types. */
 	switch (ctx->curr) {
-		static const enum index prefix[] = NEXT_ENTRY(PREFIX);
+		static const enum index prefix[] = NEXT_ENTRY(COMMON_PREFIX);
 
 	case ITEM_PARAM_IS:
 		index = 0;
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 6/9] app/testpmd: fix parse_fec_mode return type name
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
                                                   ` (4 preceding siblings ...)
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 5/9] app/testpmd: resolve name collisions Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-07-01 13:34                                   ` Andrew Rybchenko
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 7/9] app/testpmd: replace POSIX specific code Jie Zhou
                                                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Passing an uint32_t pointer to an enum pointer parameter causes
pointer-sign warning on Windows (converts between pointers to
integer types with different sign), since enum is implicitly
converted to int on Windows.

And the current enum pointer parameter of that function is actually
misleading and should be fixed as an uint32_t pointer parameter.

Fixes: b19da32e3151 ("app/testpmd: add FEC command")
Cc: stable@dpdk.org

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/cmdline.c | 6 +++---
 app/test-pmd/config.c  | 4 ++--
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0268b18f95..dff5a75ec5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16997,17 +16997,17 @@ cmd_set_port_fec_mode_parsed(
 {
 	struct cmd_set_port_fec_mode *res = parsed_result;
 	uint16_t port_id = res->port_id;
-	uint32_t mode;
+	uint32_t fec_capa;
 	int ret;
 
-	ret = parse_fec_mode(res->fec_value, &mode);
+	ret = parse_fec_mode(res->fec_value, &fec_capa);
 	if (ret < 0) {
 		printf("Unknown fec mode: %s for Port %d\n", res->fec_value,
 			port_id);
 		return;
 	}
 
-	ret = rte_eth_fec_set(port_id, mode);
+	ret = rte_eth_fec_set(port_id, fec_capa);
 	if (ret == -ENOTSUP) {
 		printf("Function not implemented\n");
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 43c79b5021..79526796e9 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3617,13 +3617,13 @@ set_tx_pkt_split(const char *name)
 }
 
 int
-parse_fec_mode(const char *name, uint32_t *mode)
+parse_fec_mode(const char *name, uint32_t *fec_capa)
 {
 	uint8_t i;
 
 	for (i = 0; i < RTE_DIM(fec_mode_name); i++) {
 		if (strcmp(fec_mode_name[i].name, name) == 0) {
-			*mode = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
+			*fec_capa = RTE_ETH_FEC_MODE_TO_CAPA(fec_mode_name[i].mode);
 			return 0;
 		}
 	}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 283b5e3680..9ae4d90dd1 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -885,7 +885,7 @@ void show_tx_pkt_segments(void);
 void set_tx_pkt_times(unsigned int *tx_times);
 void show_tx_pkt_times(void);
 void set_tx_pkt_split(const char *name);
-int parse_fec_mode(const char *name, enum rte_eth_fec_mode *mode);
+int parse_fec_mode(const char *name, uint32_t *fec_capa);
 void show_fec_capability(uint32_t num, struct rte_eth_fec_capa *speed_fec_capa);
 void set_nb_pkt_per_burst(uint16_t pkt_burst);
 char *list_pkt_forwarding_modes(void);
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 7/9] app/testpmd: replace POSIX specific code
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
                                                   ` (5 preceding siblings ...)
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 8/9] app/testpmd: fix unused function warnings Jie Zhou
                                                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

 - Make printf format OS independent
 - Replace htons with RTE_BE16
 - Replace POSIX specific inet_aton with OS independent inet_pton
 - Replace sleep with rte_delay_us_sleep
 - Repalce random with rte_rand
 - #ifndef mman related code for now
 - Fix header inclusion
 - Include rte_os_shim.h in testpmd.h
 - Remove redundant headers

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/test-pmd/cmdline.c      |  6 +-----
 app/test-pmd/cmdline_flow.c |  2 --
 app/test-pmd/csumonly.c     |  2 +-
 app/test-pmd/icmpecho.c     |  4 ++--
 app/test-pmd/ieee1588fwd.c  |  8 ++++----
 app/test-pmd/parameters.c   | 11 +++++++----
 app/test-pmd/testpmd.c      | 21 ++++++++++++++++++++-
 app/test-pmd/testpmd.h      |  3 ++-
 8 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index dff5a75ec5..bfd2fb9240 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8,12 +8,8 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <string.h>
-#include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
 #include <sys/queue.h>
 
 #include <rte_common.h>
@@ -3614,7 +3610,7 @@ cmdline_parse_inst_t cmd_stop = {
 /* *** SET CORELIST and PORTLIST CONFIGURATION *** */
 
 unsigned int
-parse_item_list(char* str, const char* item_name, unsigned int max_items,
+parse_item_list(const char *str, const char *item_name, unsigned int max_items,
 		unsigned int *parsed_items, int check_unique_values)
 {
 	unsigned int nb_item;
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 61882d5cbc..0168ff7dac 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -10,8 +10,6 @@
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
-#include <arpa/inet.h>
-#include <sys/socket.h>
 
 #include <rte_string_fns.h>
 #include <rte_common.h>
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 6b4df335fe..089936587b 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -696,7 +696,7 @@ pkt_copy_split(const struct rte_mbuf *pkt)
 	mp = current_fwd_lcore()->mbp;
 
 	if (tx_pkt_split == TX_PKT_SPLIT_RND)
-		nb_seg = random() % tx_pkt_nb_segs + 1;
+		nb_seg = rte_rand() % tx_pkt_nb_segs + 1;
 	else
 		nb_seg = tx_pkt_nb_segs;
 
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index af6f7e7902..8948f28eb5 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -474,8 +474,8 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		}
 		icmp_h->icmp_type = RTE_IP_ICMP_ECHO_REPLY;
 		cksum = ~icmp_h->icmp_cksum & 0xffff;
-		cksum += ~htons(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
-		cksum += htons(RTE_IP_ICMP_ECHO_REPLY << 8);
+		cksum += ~RTE_BE16(RTE_IP_ICMP_ECHO_REQUEST << 8) & 0xffff;
+		cksum += RTE_BE16(RTE_IP_ICMP_ECHO_REPLY << 8);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		cksum = (cksum & 0xffff) + (cksum >> 16);
 		icmp_h->icmp_cksum = ~cksum;
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index e3b98e3e0c..034f238c34 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -60,8 +60,8 @@ port_ieee1588_rx_timestamp_check(portid_t pi, uint32_t index)
 		printf("Port %u RX timestamp registers not valid\n", pi);
 		return;
 	}
-	printf("Port %u RX timestamp value %lu s %lu ns\n",
-		pi, timestamp.tv_sec, timestamp.tv_nsec);
+	printf("Port %u RX timestamp value %ju s %lu ns\n",
+		pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec);
 }
 
 #define MAX_TX_TMST_WAIT_MICROSECS 1000 /**< 1 milli-second */
@@ -83,9 +83,9 @@ port_ieee1588_tx_timestamp_check(portid_t pi)
 		       pi, MAX_TX_TMST_WAIT_MICROSECS);
 		return;
 	}
-	printf("Port %u TX timestamp value %lu s %lu ns validated after "
+	printf("Port %u TX timestamp value %ju s %lu ns validated after "
 	       "%u micro-second%s\n",
-	       pi, timestamp.tv_sec, timestamp.tv_nsec, wait_us,
+	       pi, (uintmax_t)timestamp.tv_sec, timestamp.tv_nsec, wait_us,
 	       (wait_us == 1) ? "" : "s");
 }
 
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index f3954c1c63..5e69d2aa8c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -19,7 +19,6 @@
 #include <stdint.h>
 #include <unistd.h>
 #include <inttypes.h>
-#include <arpa/inet.h>
 
 #include <rte_common.h>
 #include <rte_byteorder.h>
@@ -185,8 +184,10 @@ usage(char* progname)
 	printf("  --hot-plug: enable hot plug for device.\n");
 	printf("  --vxlan-gpe-port=N: UPD port of tunnel VXLAN-GPE\n");
 	printf("  --geneve-parsed-port=N: UPD port to parse GENEVE tunnel protocol\n");
+#ifndef RTE_EXEC_ENV_WINDOWS
 	printf("  --mlockall: lock all memory\n");
 	printf("  --no-mlockall: do not lock all memory\n");
+#endif
 	printf("  --mp-alloc <native|anon|xmem|xmemhuge>: mempool allocation method.\n"
 	       "    native: use regular DPDK memory to create and populate mempool\n"
 	       "    anon: use regular DPDK memory to create and anonymous memory to populate mempool\n"
@@ -211,7 +212,7 @@ usage(char* progname)
 
 #ifdef RTE_LIB_CMDLINE
 static int
-init_peer_eth_addrs(char *config_filename)
+init_peer_eth_addrs(const char *config_filename)
 {
 	FILE *config_file;
 	portid_t i;
@@ -610,8 +611,10 @@ launch_args_parse(int argc, char** argv)
 		{ "hot-plug",			0, 0, 0 },
 		{ "vxlan-gpe-port",		1, 0, 0 },
 		{ "geneve-parsed-port",		1, 0, 0 },
+#ifndef RTE_EXEC_ENV_WINDOWS
 		{ "mlockall",			0, 0, 0 },
 		{ "no-mlockall",		0, 0, 0 },
+#endif
 		{ "mp-alloc",			1, 0, 0 },
 		{ "tx-ip",			1, 0, 0 },
 		{ "tx-udp",			1, 0, 0 },
@@ -723,13 +726,13 @@ launch_args_parse(int argc, char** argv)
 						 "Invalid tx-ip: %s", optarg);
 
 				*end++ = 0;
-				if (inet_aton(optarg, &in) == 0)
+				if (inet_pton(AF_INET, optarg, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid source IP address: %s\n",
 						 optarg);
 				tx_ip_src_addr = rte_be_to_cpu_32(in.s_addr);
 
-				if (inet_aton(end, &in) == 0)
+				if (inet_pton(AF_INET, end, &in) == 0)
 					rte_exit(EXIT_FAILURE,
 						 "Invalid destination IP address: %s\n",
 						 optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8ed1b97dec..1cdd3cdd12 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -9,7 +9,9 @@
 #include <string.h>
 #include <time.h>
 #include <fcntl.h>
+#ifndef RTE_EXEC_ENV_WINDOWS
 #include <sys/mman.h>
+#endif
 #include <sys/types.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -60,6 +62,9 @@
 #ifdef RTE_LIB_LATENCYSTATS
 #include <rte_latencystats.h>
 #endif
+#ifdef RTE_EXEC_ENV_WINDOWS
+#include <process.h>
+#endif
 
 #include "testpmd.h"
 
@@ -629,6 +634,7 @@ set_def_fwd_config(void)
 	set_default_fwd_ports_config();
 }
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 /* extremely pessimistic estimation of memory required to create a mempool */
 static int
 calc_mem_size(uint32_t nb_mbufs, uint32_t mbuf_sz, size_t pgsz, size_t *out)
@@ -899,6 +905,7 @@ dma_map_cb(struct rte_mempool *mp __rte_unused, void *opaque __rte_unused,
 		}
 	}
 }
+#endif
 
 static unsigned int
 setup_extbuf(uint32_t nb_mbufs, uint16_t mbuf_sz, unsigned int socket_id,
@@ -969,9 +976,11 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 {
 	char pool_name[RTE_MEMPOOL_NAMESIZE];
 	struct rte_mempool *rte_mp = NULL;
+#ifndef RTE_EXEC_ENV_WINDOWS
 	uint32_t mb_size;
 
 	mb_size = sizeof(struct rte_mbuf) + mbuf_seg_size;
+#endif
 	mbuf_poolname_build(socket_id, pool_name, sizeof(pool_name), size_idx);
 
 	TESTPMD_LOG(INFO,
@@ -988,6 +997,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 				mb_mempool_cache, 0, mbuf_seg_size, socket_id);
 			break;
 		}
+#ifndef RTE_EXEC_ENV_WINDOWS
 	case MP_ALLOC_ANON:
 		{
 			rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
@@ -1028,6 +1038,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 					heap_socket);
 			break;
 		}
+#endif
 	case MP_ALLOC_XBUF:
 		{
 			struct rte_pktmbuf_extmem *ext_mem;
@@ -1054,7 +1065,9 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
 		}
 	}
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 err:
+#endif
 	if (rte_mp == NULL) {
 		rte_exit(EXIT_FAILURE,
 			"Creation of mbuf pool for socket %u failed: %s\n",
@@ -3021,6 +3034,7 @@ pmd_test_exit(void)
 	if (test_done == 0)
 		stop_packet_forwarding();
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	for (i = 0 ; i < RTE_DIM(mempools) ; i++) {
 		if (mempools[i]) {
 			if (mp_alloc_type == MP_ALLOC_ANON)
@@ -3028,6 +3042,7 @@ pmd_test_exit(void)
 						     NULL);
 		}
 	}
+#endif
 	if (ports != NULL) {
 		no_link_check = 1;
 		RTE_ETH_FOREACH_DEV(pt_id) {
@@ -3728,8 +3743,10 @@ signal_handler(int signum)
 		/* Set flag to indicate the force termination. */
 		f_quit = 1;
 		/* exit with the expected status */
+#ifndef RTE_EXEC_ENV_WINDOWS
 		signal(signum, SIG_DFL);
 		kill(getpid(), signum);
+#endif
 	}
 }
 
@@ -3804,10 +3821,12 @@ main(int argc, char** argv)
 	if (argc > 1)
 		launch_args_parse(argc, argv);
 
+#ifndef RTE_EXEC_ENV_WINDOWS
 	if (do_mlockall && mlockall(MCL_CURRENT | MCL_FUTURE)) {
 		TESTPMD_LOG(NOTICE, "mlockall() failed with error \"%s\"\n",
 			strerror(errno));
 	}
+#endif
 
 	if (tx_first && interactive)
 		rte_exit(EXIT_FAILURE, "--tx-first cannot be used on "
@@ -3928,7 +3947,7 @@ main(int argc, char** argv)
 				}
 				/* Sleep to avoid unnecessary checks */
 				prev_time = cur_time;
-				sleep(1);
+				rte_delay_us_sleep(US_PER_S);
 			}
 		}
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 9ae4d90dd1..d61a055bdd 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_gro.h>
 #include <rte_gso.h>
+#include <rte_os_shim.h>
 #include <cmdline.h>
 #include <sys/queue.h>
 
@@ -762,7 +763,7 @@ inc_tx_burst_stats(struct fwd_stream *fs, uint16_t nb_tx)
 }
 
 /* Prototypes */
-unsigned int parse_item_list(char* str, const char* item_name,
+unsigned int parse_item_list(const char *str, const char *item_name,
 			unsigned int max_items,
 			unsigned int *parsed_items, int check_unique_values);
 void launch_args_parse(int argc, char** argv);
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 8/9] app/testpmd: fix unused function warnings
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
                                                   ` (6 preceding siblings ...)
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 7/9] app/testpmd: replace POSIX specific code Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
  2021-07-01 13:49                                 ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Andrew Rybchenko
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

Function print_fdir_mask and print_fdir_flex_payload are only called
when either i40e or ixgbe presents. Extend existing #if defined to
include these two functions, to remove "unused function" compilation
warning.

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 79526796e9..3723317ab4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4449,6 +4449,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static char*
+flowtype_to_str(uint16_t flow_type)
+{
+	struct flow_type_info {
+		char str[32];
+		uint16_t ftype;
+	};
+
+	uint8_t i;
+	static struct flow_type_info flowtype_str_table[] = {
+		{"raw", RTE_ETH_FLOW_RAW},
+		{"ipv4", RTE_ETH_FLOW_IPV4},
+		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
+		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
+		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
+		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
+		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
+		{"ipv6", RTE_ETH_FLOW_IPV6},
+		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
+		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
+		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
+		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
+		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
+		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
+		{"port", RTE_ETH_FLOW_PORT},
+		{"vxlan", RTE_ETH_FLOW_VXLAN},
+		{"geneve", RTE_ETH_FLOW_GENEVE},
+		{"nvgre", RTE_ETH_FLOW_NVGRE},
+		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4508,47 +4549,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static char *
-flowtype_to_str(uint16_t flow_type)
-{
-	struct flow_type_info {
-		char str[32];
-		uint16_t ftype;
-	};
-
-	uint8_t i;
-	static struct flow_type_info flowtype_str_table[] = {
-		{"raw", RTE_ETH_FLOW_RAW},
-		{"ipv4", RTE_ETH_FLOW_IPV4},
-		{"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4},
-		{"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP},
-		{"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP},
-		{"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP},
-		{"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER},
-		{"ipv6", RTE_ETH_FLOW_IPV6},
-		{"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6},
-		{"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP},
-		{"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP},
-		{"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP},
-		{"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER},
-		{"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD},
-		{"port", RTE_ETH_FLOW_PORT},
-		{"vxlan", RTE_ETH_FLOW_VXLAN},
-		{"geneve", RTE_ETH_FLOW_GENEVE},
-		{"nvgre", RTE_ETH_FLOW_NVGRE},
-		{"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* [dpdk-dev] [PATCH v16 9/9] app/testpmd: enable building testpmd on Windows
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
                                                   ` (7 preceding siblings ...)
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 8/9] app/testpmd: fix unused function warnings Jie Zhou
@ 2021-06-29 20:50                                 ` Jie Zhou
  2021-07-01 13:49                                 ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Andrew Rybchenko
  9 siblings, 0 replies; 232+ messages in thread
From: Jie Zhou @ 2021-06-29 20:50 UTC (permalink / raw)
  To: dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	andrew.rybchenko, thomas, bruce.richardson, ferruh.yigit,
	konstantin.ananyev, stable

- Disable unsupported Apps on Windows
- Enable building of testpmd on Windows

Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 app/meson.build                    | 4 ----
 app/pdump/meson.build              | 6 ++++++
 app/proc-info/meson.build          | 6 ++++++
 app/test-acl/meson.build           | 6 ++++++
 app/test-bbdev/meson.build         | 6 ++++++
 app/test-cmdline/meson.build       | 6 ++++++
 app/test-compress-perf/meson.build | 6 ++++++
 app/test-crypto-perf/meson.build   | 6 ++++++
 app/test-eventdev/meson.build      | 6 ++++++
 app/test-fib/meson.build           | 6 ++++++
 app/test-flow-perf/meson.build     | 6 ++++++
 app/test-pipeline/meson.build      | 6 ++++++
 app/test-regex/meson.build         | 6 ++++++
 app/test-sad/meson.build           | 6 ++++++
 app/test/meson.build               | 6 ++++++
 15 files changed, 84 insertions(+), 4 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 35e53861bb..4c6049807c 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-if is_windows
-    subdir_done()
-endif
-
 apps = [
         'pdump',
         'proc-info',
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 7bb908e047..db1fcadbfe 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index f050c4a9b4..82ed05bb0b 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ethdev', 'metrics', 'security']
diff --git a/app/test-acl/meson.build b/app/test-acl/meson.build
index d5c2581b41..14d36b33e9 100644
--- a/app/test-acl/meson.build
+++ b/app/test-acl/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['acl', 'net']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 57335641f0..edb9deef84 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'main.c',
         'test_bbdev.c',
diff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build
index 9d0a9aeb6e..0898821200 100644
--- a/app/test-cmdline/meson.build
+++ b/app/test-cmdline/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('commands.c', 'cmdline_test.c')
 deps += 'cmdline'
diff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build
index 3f79e2da9d..f29c6ee863 100644
--- a/app/test-compress-perf/meson.build
+++ b/app/test-compress-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'comp_perf_options_parse.c',
         'comp_perf_test_common.c',
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 20444b7912..ef3582a87c 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'cperf_ops.c',
         'cperf_options_parsing.c',
diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build
index 45c3ff4566..17be360677 100644
--- a/app/test-eventdev/meson.build
+++ b/app/test-eventdev/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Cavium, Inc
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'evt_main.c',
         'evt_options.c',
diff --git a/app/test-fib/meson.build b/app/test-fib/meson.build
index f74ac651c0..3360ea02b0 100644
--- a/app/test-fib/meson.build
+++ b/app/test-fib/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['fib', 'lpm', 'net']
diff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build
index 1d860e036a..a33cad9078 100644
--- a/app/test-flow-perf/meson.build
+++ b/app/test-flow-perf/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'actions_gen.c',
         'flow_gen.c',
diff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build
index fd91f83231..7d123e32fb 100644
--- a/app/test-pipeline/meson.build
+++ b/app/test-pipeline/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files(
         'config.c',
         'init.c',
diff --git a/app/test-regex/meson.build b/app/test-regex/meson.build
index 472677fb60..02b101980e 100644
--- a/app/test-regex/meson.build
+++ b/app/test-regex/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020 Mellanox Technologies, Ltd
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps = ['regexdev']
diff --git a/app/test-sad/meson.build b/app/test-sad/meson.build
index db15b658d7..3d15727a01 100644
--- a/app/test-sad/meson.build
+++ b/app/test-sad/meson.build
@@ -1,5 +1,11 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 sources = files('main.c')
 deps += ['ipsec', 'net']
diff --git a/app/test/meson.build b/app/test/meson.build
index 0a5f425578..f21e2cc1fa 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -1,6 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
+if is_windows
+	build = false
+	reason = 'not supported on Windows'
+	subdir_done()
+endif
+
 if not get_option('tests')
     subdir_done()
 endif
-- 
2.31.0.vfs.0.1


^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v16 6/9] app/testpmd: fix parse_fec_mode return type name
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
@ 2021-07-01 13:34                                   ` Andrew Rybchenko
  0 siblings, 0 replies; 232+ messages in thread
From: Andrew Rybchenko @ 2021-07-01 13:34 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

On 6/29/21 11:50 PM, Jie Zhou wrote:
> Passing an uint32_t pointer to an enum pointer parameter causes
> pointer-sign warning on Windows (converts between pointers to
> integer types with different sign), since enum is implicitly
> converted to int on Windows.
> 
> And the current enum pointer parameter of that function is actually
> misleading and should be fixed as an uint32_t pointer parameter.
> 
> Fixes: b19da32e3151 ("app/testpmd: add FEC command")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>

Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>

I'll fix summary on apply:
app/testpmd: fix FEC mode parse output parameter type

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v16 5/9] app/testpmd: resolve name collisions
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 5/9] app/testpmd: resolve name collisions Jie Zhou
@ 2021-07-01 13:41                                   ` Andrew Rybchenko
  0 siblings, 0 replies; 232+ messages in thread
From: Andrew Rybchenko @ 2021-07-01 13:41 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

On 6/29/21 11:50 PM, Jie Zhou wrote:
> Resolve name collisions with Windows types
> 
> Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

I'll fix long lines checkpatches.sh warnings on
apply.

^ permalink raw reply	[flat|nested] 232+ messages in thread

* Re: [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable testpmd on Windows
  2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
                                                   ` (8 preceding siblings ...)
  2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
@ 2021-07-01 13:49                                 ` Andrew Rybchenko
  9 siblings, 0 replies; 232+ messages in thread
From: Andrew Rybchenko @ 2021-07-01 13:49 UTC (permalink / raw)
  To: Jie Zhou, dev
  Cc: dmitry.kozliuk, xiaoyun.li, roretzla, talshn, pallavi.kadam,
	thomas, bruce.richardson, ferruh.yigit, konstantin.ananyev,
	stable

On 6/29/21 11:50 PM, Jie Zhou wrote:
> This patchset is to enable testpmd on windows. It mainly includes:
> - Enable building libraries on Windows that testpmd depends on
> - Add necessary macros required by testpmd on Windows in rte_os_shim.h
> - Add device event stubs for Windows
> - Resolve name collisions with Windows types
> - Add clock_gettime in testpmd on Windows
> - Fix parse_fec_mode to return fec_capa instead of mode
> - Replace POSIX specific codes
> - Disable unsupported Apps build on Windows
> - Enable testpmd build on Windows
> 
> Future work:
> - Some issues discovered at validation need further investigations
>   * Perf inconsistency: TPUT fluctuated significantly from runs
>   * After traffic stop, port stats shows pps being 0 while bps not
>   * mempool allocation only succeed with native. Other methods failed
>     at rte_mem_lock/VirtualLock.
> - Hot-plug on Windows not supported yet
> - Support mempool allocation native mode only for now
> 
> Tested-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>
> 
> ---
> V16 changes:
>     - Manually change Patch #9 From: email address to a proper one
> 
> ---
> V15 changes:
>     - Remove unnecessary Signed-off-by
>     - Fix Patch #6 description to explain the root cause
>     - Remove a trailing whitespace in Patch #4
> 
> ---
> V14 changes:
>     - Use macros with arguments
>     - Add missing spaces around '&'
>     - Remove unnecessary constants
>     - Remove unnecessary returned result check on QueryPerformanceXXX
> 
> ---
> V13 changes:
>     - Resolve a patchset apply issue in patch2
> 
> ---
> V12 changes:
>     - Fix indentation
> 
> ---
> V11 changes:
>     - Add Acked-by from V9 and V10
>     - Fix an error at ifndef'ing err flow for MP_ALLOC_NATIVE
> 
> ---
> V10 changes:
>     - Remove unneeded newline in config.c
>     - Add Fixes: and Cc: Stable for parse_fec_mode fix
>     - More appropriate and granular commit messages
>     - Use US_PER_S
>     - Put signal inside ifndef
> 
> ---
> V9 changes:
>     - Add clock_gettime for Windows into eal in rte_os_shim.h
> 
> ---
> V8 changes:
>     - Fix pointer location for _clock_gettime in config.h
> 
> ---
> V7 changes:
>     - Resolve V6 patch set applying conflicts due to recent upstream
>       merges of linux testpmd changes, lib\meson.build format change,
>       lib path changes, and sources change in meson.build under app\
>     - Move Windows clock_gettime related code from config.c into 
>       config.h and leverage rte_os_shim.h for timespec_get
>     - Fix a "BAD_SIGN_OFF" warning for patch "[v6,09/10] app/testpmd: 
>       fix unused function warnings"
> 
> ---
> V6 changes:
>     - Fix "unused function" compilation warning when neither i40e
>       nor ixgbe presents
> 
> ---
> V5 changes:
>     - Remove macro trailing semicolon which missed to include in V4
> 
> ---
> V4 changes:
>     - Split previous patch into more granular patches
>     - Remove the bypass of rte_eal_cleanup at exit
>     - Move all added macros into rte_os_shim.h
>     - Remove redundant headers after the rte_os_shim patch merge
>     - Revert the mman APIs replacement to leave relevant part UNIX only
>     - Keep Windows library list the same structure and order as the 
>       Unix library list in lib meson.build
> 	
> ---
> V3 changes:
>     - Split one patch into patchset
>     - Replace mman APIs with rte_mem_xxx APIs
>     - Use OS independant rte_rand
>     - Add device event stubs for Windows
>     - Disable unsupported Apps
> 
> ---
> V2 changes:
>     - Fix commit message log long line issue
>     - Fix coding style issues of pointer location
>     - Fix indentation issue
>     - Fix FreeBSD2101 compilation issue of AF_INET undeclared
> ---
> 
> 
> Jie Zhou (9):
>   lib: build libraries that testpmd depends on
>   eal/windows: add necessary macros
>   eal/windows: add device event stubs
>   eal/Windows: add clock_gettime on Windows
>   app/testpmd: resolve name collisions
>   app/testpmd: fix parse_fec_mode return type name
>   app/testpmd: replace POSIX specific code
>   app/testpmd: fix unused function warnings
>   app/testpmd: enable building testpmd on Windows
> 
>  app/meson.build                       |   4 -
>  app/pdump/meson.build                 |   6 +
>  app/proc-info/meson.build             |   6 +
>  app/test-acl/meson.build              |   6 +
>  app/test-bbdev/meson.build            |   6 +
>  app/test-cmdline/meson.build          |   6 +
>  app/test-compress-perf/meson.build    |   6 +
>  app/test-crypto-perf/meson.build      |   6 +
>  app/test-eventdev/meson.build         |   6 +
>  app/test-fib/meson.build              |   6 +
>  app/test-flow-perf/meson.build        |   6 +
>  app/test-pipeline/meson.build         |   6 +
>  app/test-pmd/cmdline.c                |  12 +-
>  app/test-pmd/cmdline_flow.c           | 514 +++++++++++++-------------
>  app/test-pmd/config.c                 |  86 ++---
>  app/test-pmd/csumonly.c               |   2 +-
>  app/test-pmd/icmpecho.c               |   4 +-
>  app/test-pmd/ieee1588fwd.c            |   8 +-
>  app/test-pmd/parameters.c             |  11 +-
>  app/test-pmd/testpmd.c                |  21 +-
>  app/test-pmd/testpmd.h                |   5 +-
>  app/test-regex/meson.build            |   6 +
>  app/test-sad/meson.build              |   6 +
>  app/test/meson.build                  |   6 +
>  lib/eal/windows/eal_dev.c             |  33 ++
>  lib/eal/windows/include/rte_os_shim.h |  42 +++
>  lib/eal/windows/meson.build           |   1 +
>  lib/meson.build                       |   7 +
>  28 files changed, 507 insertions(+), 327 deletions(-)
>  create mode 100644 lib/eal/windows/eal_dev.c
> 

Applied, thanks.

^ permalink raw reply	[flat|nested] 232+ messages in thread

end of thread, other threads:[~2021-07-01 13:49 UTC | newest]

Thread overview: 232+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18  6:26 [dpdk-dev] [PATCH] app/test-pmd: enable testpmd on windows Jie Zhou
2021-03-19 16:51 ` [dpdk-dev] [PATCH v2] " Jie Zhou
2021-03-21  1:01   ` Dmitry Kozlyuk
     [not found]     ` <BY5PR21MB1426269DDB5427AE20AE4935D0659@BY5PR21MB1426.namprd21.prod.outlook.com>
2021-03-22 22:23       ` [dpdk-dev] [EXTERNAL] " Dmitry Kozlyuk
2021-03-24  9:02         ` David Marchand
2021-03-31 19:10   ` [dpdk-dev] " Kadam, Pallavi
2021-04-02 22:14     ` Jie Zhou
2021-04-11 21:49       ` Dmitry Kozlyuk
2021-04-01  8:44   ` Tal Shnaiderman
2021-04-02 22:19     ` Jie Zhou
2021-04-11 21:39   ` Dmitry Kozlyuk
2021-04-13 17:19   ` [dpdk-dev] [PATCH v3 0/6] app/testpmd: enable testpmd on Windows Jie Zhou
2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 1/6] app/testpmd: build libraries that testpmd depends on Jie Zhou
2021-04-13 18:49       ` Tal Shnaiderman
2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 2/6] app/testpmd: define IPPROTO_RAW in in.h Jie Zhou
2021-04-13 18:50       ` Tal Shnaiderman
2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 3/6] app/testpmd: add required Macros Jie Zhou
2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 4/6] app/testpmd: add device event stubs on Windows Jie Zhou
2021-04-13 20:10       ` Dmitry Kozlyuk
2021-04-13 22:08         ` Jie Zhou
2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 5/6] app/testpmd: add rte_mem_lockall in librte_eal Jie Zhou
2021-04-13 18:50       ` Tal Shnaiderman
2021-04-13 17:19     ` [dpdk-dev] [PATCH v3 6/6] app/testpmd: enable testpmd on Windows Jie Zhou
2021-04-13 18:58       ` Tal Shnaiderman
2021-04-13 22:07         ` Jie Zhou
2021-04-13 20:10       ` Dmitry Kozlyuk
2021-04-13 22:22         ` Jie Zhou
2021-04-14 17:16           ` Jie Zhou
2021-04-14 17:45             ` Dmitry Kozlyuk
2021-04-14 18:25               ` Jie Zhou
2021-04-16 17:34     ` [dpdk-dev] [PATCH v4 0/9] app/testpmd: Enable " Jie Zhou
2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 1/9] lib: build libraries that testpmd depends on Jie Zhou
2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 2/9] eal/windows: add necessary macros Jie Zhou
2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 3/9] eal/windows: add device event stubs Jie Zhou
2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 4/9] app/testpmd: resolve name collisions Jie Zhou
2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 5/9] app/testpmd: add clock_gettime_monotonic Jie Zhou
2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 6/9] app/testpmd: fix parse_fec_mode return type Jie Zhou
2021-04-16 17:34       ` [dpdk-dev] [PATCH v4 7/9] app/testpmd: replace POSIX specific code Jie Zhou
2021-04-16 17:35       ` [dpdk-dev] [PATCH v4 8/9] app/testpmd: fix headers inclusion Jie Zhou
2021-04-16 17:35       ` [dpdk-dev] [PATCH v4 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-04-16 17:57         ` [dpdk-dev] [PATCH v5 0/9] app/testpmd: enable " Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 1/9] lib: build libraries that testpmd depends on Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 2/9] eal/windows: add necessary macros Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 3/9] eal/windows: add device event stubs Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 4/9] app/testpmd: resolve name collisions Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic Jie Zhou
2021-04-18 17:20             ` Tal Shnaiderman
2021-04-19 18:04               ` Jie Zhou
2021-04-19 18:13                 ` Thomas Monjalon
2021-04-19 18:34                   ` [dpdk-dev] [EXTERNAL] " Tyler Retzlaff
2021-04-19 19:41                     ` Thomas Monjalon
2021-04-28  8:45                       ` Dmitry Kozlyuk
2021-04-29 19:52                         ` Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 6/9] app/testpmd: fix parse_fec_mode return type Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 7/9] app/testpmd: replace POSIX specific code Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 8/9] app/testpmd: fix headers inclusion Jie Zhou
2021-04-16 17:57           ` [dpdk-dev] [PATCH v5 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-04-18 17:21             ` Tal Shnaiderman
2021-04-18 18:17               ` Thomas Monjalon
2021-04-18 19:11                 ` Tal Shnaiderman
2021-04-18 19:20                   ` Tal Shnaiderman
2021-04-19 17:37                     ` Jie Zhou
2021-04-19 23:19           ` [dpdk-dev] [PATCH v6 00/10] app/testpmd: enable " Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 02/10] eal/windows: add necessary macros Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 03/10] eal/windows: add device event stubs Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 04/10] app/testpmd: resolve name collisions Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 05/10] app/testpmd: add clock_gettime_monotonic Jie Zhou
2021-04-20  9:09               ` Ananyev, Konstantin
2021-04-22 21:54                 ` Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-04-19 23:19             ` [dpdk-dev] [PATCH v6 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-04-19 23:20             ` [dpdk-dev] [PATCH v6 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-04-23  0:31             ` [dpdk-dev] [PATCH v7 00/10] app/testpmd: enable " Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 02/10] eal/windows: add necessary macros Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 03/10] eal/windows: add device event stubs Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 04/10] app/testpmd: resolve name collisions Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 05/10] app/testpmd: add clock_gettime on Windows Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-04-23  0:31               ` [dpdk-dev] [PATCH v7 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-04-23  0:32               ` [dpdk-dev] [PATCH v7 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-04-27 20:01               ` [dpdk-dev] [PATCH v8 00/10] app/testpmd: enable " Jie Zhou
2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 02/10] eal/windows: add necessary macros Jie Zhou
2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 03/10] eal/windows: add device event stubs Jie Zhou
2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 04/10] app/testpmd: resolve name collisions Jie Zhou
2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 05/10] app/testpmd: add clock_gettime on Windows Jie Zhou
2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-04-27 20:01                 ` [dpdk-dev] [PATCH v8 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-04-27 20:02                 ` [dpdk-dev] [PATCH v8 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-04-27 20:02                 ` [dpdk-dev] [PATCH v8 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-04-30 17:52                 ` [dpdk-dev] [PATCH v9 00/10] app/testpmd: enable " Jie Zhou
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-03 17:36                     ` Tal Shnaiderman
2021-05-03 21:38                       ` Jie Zhou
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 02/10] eal/windows: add necessary macros Jie Zhou
2021-05-03 17:36                     ` Tal Shnaiderman
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 03/10] eal/windows: add device event stubs Jie Zhou
2021-05-03 17:43                     ` Tal Shnaiderman
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-05-03 17:37                     ` Tal Shnaiderman
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-05-03 17:37                     ` Tal Shnaiderman
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 06/10] app/testpmd: fix parse_fec_mode return type Jie Zhou
2021-05-03 17:38                     ` Tal Shnaiderman
2021-05-03 21:43                       ` Jie Zhou
2021-05-03 22:53                         ` Jie Zhou
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-03 17:37                     ` Tal Shnaiderman
2021-05-03 21:41                       ` Jie Zhou
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-05-03 17:44                     ` Tal Shnaiderman
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-05-03 17:43                     ` Tal Shnaiderman
2021-04-30 17:52                   ` [dpdk-dev] [PATCH v9 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-05-03 17:38                     ` Tal Shnaiderman
2021-05-04  0:33                   ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 02/10] eal/windows: add necessary macros Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 03/10] eal/windows: add device event stubs Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-05  8:34                       ` Tal Shnaiderman
2021-05-05 16:09                         ` Jie Zhou
2021-05-05 16:41                           ` Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-05-04  0:34                     ` [dpdk-dev] [PATCH v10 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-05-04  7:31                     ` [dpdk-dev] [PATCH v10 00/10] app/testpmd: enable " Thomas Monjalon
2021-05-05 16:00                       ` Jie Zhou
2021-05-04 23:51                     ` Kadam, Pallavi
2021-05-05 17:18                     ` [dpdk-dev] [PATCH v11 " Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 02/10] eal/windows: add necessary macros Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 03/10] eal/windows: add device event stubs Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-05-05 17:18                       ` [dpdk-dev] [PATCH v11 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-05-05 17:36                       ` [dpdk-dev] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 02/10] eal/windows: add necessary macros Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 03/10] eal/windows: add device event stubs Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-05-05 17:36                         ` [dpdk-dev] [PATCH v12 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-05-05 19:12                         ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 02/10] eal/windows: add necessary macros Jie Zhou
2021-06-20 23:28                             ` Dmitry Kozlyuk
2021-06-23 20:51                               ` Jie Zhou
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 03/10] eal/windows: add device event stubs Jie Zhou
2021-06-20 23:28                             ` Dmitry Kozlyuk
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-06-20 23:30                             ` Dmitry Kozlyuk
2021-06-23 20:57                               ` Jie Zhou
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-06-20 23:30                             ` Dmitry Kozlyuk
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-06-20 23:30                             ` Dmitry Kozlyuk
2021-06-23 20:58                               ` Jie Zhou
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-06-20 23:30                             ` Dmitry Kozlyuk
2021-06-23 21:26                               ` Jie Zhou
2021-06-24 15:45                                 ` Tyler Retzlaff
2021-06-24 18:44                                   ` Dmitry Kozlyuk
2021-06-24 21:36                                     ` Jie Zhou
2021-05-05 19:12                           ` [dpdk-dev] [PATCH v13 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-06-20 23:30                             ` Dmitry Kozlyuk
2021-05-06  7:20                           ` [dpdk-dev] [PATCH v13 00/10] app/testpmd: enable " Tal Shnaiderman
2021-06-23 22:34                           ` [dpdk-dev] [PATCH v14 0/9] " Jie Zhou
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 1/9] lib: build libraries that testpmd depends on Jie Zhou
2021-06-24 23:10                               ` Dmitry Kozlyuk
2021-06-28 10:01                               ` Andrew Rybchenko
2021-06-28 10:35                                 ` Andrew Rybchenko
2021-06-28 14:10                                   ` Tyler Retzlaff
2021-06-29 18:29                                     ` Jie Zhou
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 2/9] eal/windows: add necessary macros Jie Zhou
2021-06-24 23:10                               ` Dmitry Kozlyuk
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 3/9] eal/windows: add device event stubs Jie Zhou
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-06-24 23:10                               ` Dmitry Kozlyuk
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 5/9] app/testpmd: resolve name collisions Jie Zhou
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-06-28 10:55                               ` Andrew Rybchenko
2021-06-28 14:29                                 ` Tyler Retzlaff
2021-06-29 18:34                                   ` Jie Zhou
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 7/9] app/testpmd: replace POSIX specific code Jie Zhou
2021-06-24 23:10                               ` Dmitry Kozlyuk
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 8/9] app/testpmd: fix unused function warnings Jie Zhou
2021-06-24 23:10                               ` Dmitry Kozlyuk
2021-06-23 22:34                             ` [dpdk-dev] [PATCH v14 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-06-29 20:23                             ` [dpdk-dev] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 1/9] lib: build libraries that testpmd depends on Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 2/9] eal/windows: add necessary macros Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 3/9] eal/windows: add device event stubs Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 5/9] app/testpmd: resolve name collisions Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 7/9] app/testpmd: replace POSIX specific code Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 8/9] app/testpmd: fix unused function warnings Jie Zhou
2021-06-29 20:23                               ` [dpdk-dev] [PATCH v15 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-06-29 20:50                               ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 1/9] lib: build libraries that testpmd depends on Jie Zhou
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 2/9] eal/windows: add necessary macros Jie Zhou
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 3/9] eal/windows: add device event stubs Jie Zhou
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 5/9] app/testpmd: resolve name collisions Jie Zhou
2021-07-01 13:41                                   ` Andrew Rybchenko
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-07-01 13:34                                   ` Andrew Rybchenko
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 7/9] app/testpmd: replace POSIX specific code Jie Zhou
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 8/9] app/testpmd: fix unused function warnings Jie Zhou
2021-06-29 20:50                                 ` [dpdk-dev] [PATCH v16 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-07-01 13:49                                 ` [dpdk-dev] [PATCH v16 0/9] app/testpmd: enable " Andrew Rybchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).