DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Tianhao Zhang <zhang.tianhao2@zte.com.cn>
Cc: wang.junlong1@zte.com.cn, yang.yonggang@zte.com.cn, dev@dpdk.org
Subject: Re: [PATCH v1] net/zxdh: support multiple PF process flow table
Date: Wed, 24 Sep 2025 13:31:07 -0700	[thread overview]
Message-ID: <20250924133107.23414572@hermes.local> (raw)
In-Reply-To: <20250924082331.39962-1-zhang.tianhao2@zte.com.cn>

On Wed, 24 Sep 2025 16:23:31 +0800
Tianhao Zhang <zhang.tianhao2@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;
}

  parent reply	other threads:[~2025-09-24 20:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24  8:23 Tianhao Zhang
2025-09-24 20:28 ` Stephen Hemminger
2025-09-24 20:31 ` Stephen Hemminger [this message]
2025-09-25  2:45 ` [PATCH v1] " Tianhao Zhang
2025-09-26  1:04 ` Tianhao Zhang
2025-09-26  1:28 ` [PATCH v2] net/zxdh: " Tianhao Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250924133107.23414572@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=wang.junlong1@zte.com.cn \
    --cc=yang.yonggang@zte.com.cn \
    --cc=zhang.tianhao2@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).