On 03/04, Qi Zhang wrote: >Remove unnecessary variable "meta" in ice_flow_create and >ice_flow_validate, it should be defined when really be needed: >its ice_parse_engine_create and ice_parse_engine_validate. > >A meta data be created by parser->parse_pattern_action should be >freed inside parser->engine->create. > >During a validate operation, since parser->engine_>create will not >be invoked, a meta is not necessary be created during parser, so >NULL will parsed to engine->parse_pattern_action and all parser's >parse_pattern_action need to be modified to handle meta = NULL >properly. > >With above implementation, the patch also fixes a potentional memory
s/potentional/potential >leak in ice_parse_engine_validate, since meta may not be freed. > >BTW, an engine without a create op should be regarded as a bug. So >use RTE_ASSERT to replace runtime engine->create == NULL check in >ice_parse_engine_create. > >Fixes: 4e27d3ed02bd ("net/ice: fix flow API framework") >Cc: sta...@dpdk.org > >Signed-off-by: Qi Zhang <qi.z.zh...@intel.com> >--- > Reviewed-by: Xiaolong Ye <xiaolong...@intel.com> Applied to dpdk-next-net-intel with above fix, Thanks.