[PATCH v10 3/6] flow_parser: add shared parser library

Stephen Hemminger stephen at networkplumber.org
Mon Feb 2 21:03:13 CET 2026


On Mon,  2 Feb 2026 12:36:55 +0100
Lukas Sismis <sismis at dyna-nic.com> wrote:

> +int
> +rte_flow_parser_run(const char *src)
> +{
> +	uint8_t buf[4096];
> +	struct rte_flow_parser_output *out = (struct rte_flow_parser_output *)buf;
> +	int ret;
> +
> +	ret = rte_flow_parser_parse(src,
> +				    (struct rte_flow_parser_output *)buf,
> +				    sizeof(buf));
> +	if (ret < 0)
> +		return ret;
> +	switch (out->command) {
> +	case RTE_FLOW_PARSER_CMD_SET_SAMPLE_ACTIONS:
> +	case RTE_FLOW_PARSER_CMD_SET_IPV6_EXT_PUSH:
> +	case RTE_FLOW_PARSER_CMD_SET_IPV6_EXT_REMOVE:
> +	case RTE_FLOW_PARSER_CMD_SET_RAW_ENCAP:
> +	case RTE_FLOW_PARSER_CMD_SET_RAW_DECAP:
> +		cmd_set_raw_parsed(out);
> +		break;
> +	default:
> +		return cmd_flow_parsed(out);
> +		break;

The kernel version of checkpatch complains here. The DPDK shell script
seems to be set to ignore this but. 

WARNING: break is not useful after a return
#15008: FILE: lib/flow_parser/rte_flow_parser.c:14763:
+		return cmd_flow_parsed(out);
+		break;



More information about the dev mailing list