[dpdk-dev] [PATCH] app/testpmd: fix flow list command

Adrien Mazarguil adrien.mazarguil at 6wind.com
Wed Oct 10 18:35:43 CEST 2018


On Wed, Oct 10, 2018 at 04:27:59PM +0000, Mordechay Haimovsky wrote:
> Hi Adrien,
>  You are correct, the bug is not where we thought it is, moreover the fix breaks
> the CLI and should be rejected.
> We investigated more and found that the bug is in the port_flow_query routine
> Which passes an incorrect argument to rte_flow_conv as follows:
> 	     ret = rte_flow_conv(RTE_FLOW_CONV_OP_ACTION_NAME_PTR,
> 					         &name, sizeof(name), action, &error);
> While it should pass onlt the action type as follows:
> 	ret = rte_flow_conv(RTE_FLOW_CONV_OP_ACTION_NAME_PTR,
> 			    &name, sizeof(name),
> 			    (void *)(uintptr_t)action->type, &error);
> As done in port_flow_list routine (which works)
> 	if (rte_flow_conv(RTE_FLOW_CONV_OP_ACTION_NAME_PTR,
> 						  &name, sizeof(name),
> 						  (void *)(uintptr_t)action->type,
> 						  NULL) <= 0)
> And according to the  parameters description of rte_flow_conv_name (called by  rte_flow_conv):
> 	* @param[in] src
>  	*   Depending on @p is_action, source pattern item or action type cast as a
> 	 *   pointer.
> 
> Modifying port_flow_query accordingly solves the issue.
> I will issue a new patch tonight.

Indeed, I confirm this is the right bug to address (and seems like I did not
validate rte_flow_query() properly.) Thanks for taking care of it! 

-- 
Adrien Mazarguil
6WIND


More information about the dev mailing list