[dpdk-dev] [PATCH v2] app/test-pmd: enable testpmd on windows

Kadam, Pallavi pallavi.kadam at intel.com
Wed Mar 31 21:10:03 CEST 2021


On 3/19/2021 9:51 AM, Jie Zhou wrote:
> From: Jie Zhou <jizh at 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 at linux.microsoft.com>
> Signed-off-by: Jie Zhou <jizh at 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
>   


More information about the dev mailing list