Remove unnecessary variable "meta" in ice_flow_create and
ice_flow_validate, it should be defined when really needed:
its ice_parse_engine_create and ice_parse_engine_validate.
A meta data 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, it is unnecessary to create a meta during parser, so
NULL will passed 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 potential memory
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: 4e27d3ed02 ("net/ice: fix flow API framework")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>