net/mlx5: add flow prepare function
In current implementation the calculation of the flow size is done
during the validation stage, and the same function is also used to
translate the input parameters into verbs spec. This is hard to
maintain and error prone.
Another issue is dev-flows (flows that are created implicitly in order
to support the requested flow for example when the user request RSS on
UDP 2 rules need to be created one for IPv4 and one for IPv6).
In current implementation the dev-flows are created on the same
memory allocation. This will be harder to implement in future drivers.
The commits extract the calculation and creation of the dev-flow from
the translation part (the part that converts the parameters into the
format required by the driver). This results in that the prepare
function only function is to allocate the dev-flow.
Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>