[PATCH v1] net/zxdh: support multiple PF process flow table

Stephen Hemminger stephen at networkplumber.org
Wed Sep 24 22:31:07 CEST 2025


On Wed, 24 Sep 2025 16:23:31 +0800
Tianhao Zhang <zhang.tianhao2 at zte.com.cn> wrote:

> +static void
> +zxdh_priv_res_free(struct zxdh_hw *priv)
> +{
> +	rte_free(priv->vfinfo);
> +	priv->vfinfo = NULL;
> +	if (priv->channel_context != NULL) {
> +		rte_free(priv->channel_context);
> +		priv->channel_context = NULL;
> +	}
> +}
> +

You don't need the check for channel_context.
It is better to make both pieces consistent:

Like:

static void
zxdh_priv_res_free(struct zxdh_hw *priv)
{
	rte_free(priv->vfinfo);
	priv->vfinfo = NULL;

	rte_free(priv->channel_context);
	priv->channel_context = NULL;
}


More information about the dev mailing list