[PATCH v5 03/27] net/intel/common: add common flow action parsing

Burakov, Anatoly anatoly.burakov at intel.com
Fri May 29 16:35:27 CEST 2026


On 5/27/2026 3:25 PM, Bruce Richardson wrote:
> On Mon, May 25, 2026 at 03:06:22PM +0100, Anatoly Burakov wrote:
>> Currently, each driver has their own code for action parsing, which results
>> in a lot of duplication and subtle mismatches in behavior between drivers.
>>
>> Add common infrastructure, based on the following assumptions:
>>
>> - All drivers support at most 4 actions at once, but usually less
>> - Not every action is supported by all drivers
>> - We can check a few common things to filter out obviously wrong actions
>> - Driver performs semantic checks on all valid actions
>>
>> So, the intention is to reject everything we can reasonably reject at the
>> outset without knowing anything about the drivers, parametrize what is
>> trivial to parametrize, and leave the rest for the driver to implement.
>>
>> While we're at it, also add logging infrastructure for Intel common code,
>> using the new component name defines that are automatically passed to each
>> DPDK driver as it is being built.
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
>> ---
> <snip>
> 
>> +
>> +static inline int
>> +__flow_action_check_rss(const struct rte_flow_action_rss *rss,
>> +		const struct ci_flow_actions_check_param *param,
>> +		struct rte_flow_error *error)
>> +{
>> +	uint32_t qnum, q;
>> +
>> +	qnum = rss->queue_num;
>> +
>> +	/* either we have both queues and queue number, or we have neither */
>> +	if ((qnum == 0) != (rss->queue == NULL)) {
>> +		return rte_flow_error_set(error, EINVAL,
>> +			RTE_FLOW_ERROR_TYPE_ACTION_CONF, rss,
>> +			"If queue number is specified, queue array must also be specified");
>> +	}
>> +	/* check if queues are monotonic */
>> +	for (q = 1; q < qnum; q++) {
>> +		if (rss->queue[q] < rss->queue[q - 1]) {
>> +			return rte_flow_error_set(error, EINVAL,
>> +				RTE_FLOW_ERROR_TYPE_ACTION_CONF, rss,
>> +				"RSS queues must be in ascending order");
>> +		}
>> +		/* if user has requested contiguousness, check that as well */
>> +		if (param == NULL || !param->rss_queues_contig)
>> +			continue;
>> +		if (rss->queue[q] != rss->queue[0] + q) {
>> +			return rte_flow_error_set(error, EINVAL,
>> +				RTE_FLOW_ERROR_TYPE_ACTION_CONF, rss,
>> +				"RSS queues must be contiguous");
>> +		}
>> +	}
>> +	/* if user has requested to check for queue contiguousness, do it */
>> +	if (param != NULL && param->rss_queues_contig) {
>> +	}
>> +
> 
> Empty block, and I don't see it filled in later patches. Is this for future
> use, or just an oversight? I see the check for contiguity done in the loop
> above.
> 

It's rather a merge rebase error...

-- 
Thanks,
Anatoly


More information about the dev mailing list