DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: getelson@nvidia.com, ferruh.yigit@intel.com, thomas@monjalon.net,
	Xiaoyun Li <xiaoyun.li@intel.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Subject: [dpdk-dev] [PATCH] app/testpmd: remove warning on flex flow flush
Date: Tue,  2 Nov 2021 19:38:48 +0100	[thread overview]
Message-ID: <20211102183848.32422-1-david.marchand@redhat.com> (raw)

Building DPDK without JSON, warnings get displayed when stopping testpmd
without entering any flex flow rule.

Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/cmd_flex_item.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/cmd_flex_item.c b/app/test-pmd/cmd_flex_item.c
index 45103e45a8..337dcdd565 100644
--- a/app/test-pmd/cmd_flex_item.c
+++ b/app/test-pmd/cmd_flex_item.c
@@ -415,6 +415,8 @@ port_flex_item_flush(portid_t port_id)
 	uint16_t i;
 
 	for (i = 0; i < FLEX_MAX_PARSERS_NUM; i++) {
+		if (flex_items[port_id][i] == NULL)
+			continue;
 		flex_item_destroy(port_id, i);
 		flex_items[port_id][i] = NULL;
 	}
-- 
2.23.0


             reply	other threads:[~2021-11-02 18:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 18:38 David Marchand [this message]
2021-11-02 19:39 ` Gregory Etelson
2021-11-02 19:44   ` David Marchand

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=20211102183848.32422-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=getelson@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=xiaoyun.li@intel.com \
    /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).