Rte_flow_create_async() pushes flows immediately

Hi.
I’m trying to use rte_flow_create_async() to batching rule insertion with connectX-6.

I expected that rte_flow_create_async() does not push the rule when postpone is marked as 1.
But it does push even though I does not call rte_flow_push().

What’s the reason for this issue? I just want to postpone pushing.

P.S.
I checked the code in the PMD, and saw below.

if (unlikely(mlx5dr_table_is_root(matcher->tbl)))
	ret = mlx5dr_rule_create_root(rule_handle,
				      attr,
				      items,
				      at_idx,
				      rule_actions);
else
	ret = mlx5dr_rule_create_hws(rule_handle,
				     attr,
				     mt_idx,
				     items,
				     at_idx,
				     rule_actions);

Here, I understood that the root means table with group 0.
I guess mlx5dr_rule_create_hws() does not push immediately, but mlx5dr_rule_create_root() pushes immediately. Am I right?

Is there any example code for testing rte_flow_create_async() and checking whether it pushes the rule immediately?

Thank you

Hi,

According to my check, if you call rte_flow_async_create(), and set postpone to 1, it should not be pushing immediately.

It does make sense to check if all rules in the queue were created with postpone 1, otherwise, if one of rules in the queue was created with postpone 0, it will push all the rules added before without postpone.

Further investigation may require an investigation of the code you are running, and opening of a support case in Nvidia portal.

Best Regards,
Anatoly