From: Long Wu <long...@corigine.com> The flow position acquire and free interfaces use different index, and this will cause the flow free logic failed.
Fix this problem by using the same flow position index. Fixes: 0b9079d24808 ("net/nfp: support flow API for CoreNIC firmware") Cc: chaoyong...@corigine.com Cc: sta...@dpdk.org Signed-off-by: Long Wu <long...@corigine.com> Reviewed-by: Chaoyong He <chaoyong...@corigine.com> Reviewed-by: Peng Zhang <peng.zh...@corigine.com> --- drivers/net/nfp/nfp_net_flow.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c index 2dab317a5f..2c7801ed41 100644 --- a/drivers/net/nfp/nfp_net_flow.c +++ b/drivers/net/nfp/nfp_net_flow.c @@ -123,7 +123,11 @@ static void nfp_net_flow_position_free(struct nfp_net_priv *priv, struct rte_flow *nfp_flow) { - priv->flow_position[nfp_flow->position] = false; + uint32_t index; + + index = NFP_NET_FLOW_LIMIT - 1 - nfp_flow->position; + + priv->flow_position[index] = false; } static struct rte_flow * -- 2.39.1