<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi all,<div><br></div><div>It is great that we have rte_flow async/template api integrated to mlx5 </div><div>driver code and it is being established as the new standard rte_flow API.</div><div><br></div><div>I have the following raw_encap problem when using the rte_flow async/template API </div><div>with mlx5 driver:</div><div>- raw_encap rte_flow action template fails during validation when the action mask</div><div>conf is NULL but this clearly contradicts the explanation from Suanming Mou's </div><div>commit 7f6daa490d9 which clearly states that the raw encap action mask is allowed </div><div>to be NULL.</div><div><Excerpt from commit 7f6daa490d9></div><div><div>    2. RAW encap (encap_data: raw)     </div><div>            action conf (raw_data)                               </div><div>                                                                 </div><div>            a. action mask conf (not NULL)                 </div><div>              - encap_data constant.                             </div><div>            b. action mask conf (NULL)                                                                                            </div><div>              - encap_data will change.</div></div><div></Excerpt from commit 7f6daa490d9><br></div><div><br></div><div>Commenting out the raw_encap validation would make it possible to create</div><div>rte_flow template with null mask conf which can be concretized later on. </div><div>Things seem to work after relaxing the rte_flow raw_encap validation.</div><div>The change would look like:</div><div><br></div><div><Excerpt></div><div><div>diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c</div><div>index 35f1ed7a03..3f57fd9286 100644</div><div>--- a/drivers/net/mlx5/mlx5_flow_hw.c</div><div>+++ b/drivers/net/mlx5/mlx5_flow_hw.c</div><div>@@ -6020,10 +6020,10 @@ flow_hw_validate_action_raw_encap(const struct rte_flow_action *action,</div><div>        const struct rte_flow_action_raw_encap *mask_conf = mask->conf;</div><div>        const struct rte_flow_action_raw_encap *action_conf = action->conf;</div><div> </div><div>-       if (!mask_conf || !mask_conf->size)</div><div>+/*     if (!mask_conf || !mask_conf->size)</div><div>                return rte_flow_error_set(error, EINVAL,</div><div>                                          RTE_FLOW_ERROR_TYPE_ACTION, mask,</div><div>-                                         "raw_encap: size must be masked");</div><div>+                                         "raw_encap: size must be masked"); */</div><div>        if (!action_conf || !action_conf->size)</div><div>                return rte_flow_error_set(error, EINVAL,</div><div>                                          RTE_FLOW_ERROR_TYPE_ACTION, action,</div></div><div></Excerpt><br></div><div><br></div><div>But this can not be the proper solution. Please advise a solution how to make the </div><div>raw_encap work with rte_flow template/async API. If relaxing the validation is ok, I can </div><div>also prepare and send a patch.</div><div><br></div><div>Thanks in advance,</div><div><br></div><div>Guvenc Gulce</div><div>  </div></div></div></div></div></div></div></div></div>