patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Aman Singh <aman.deep.singh@intel.com>,
	Ori Kam <orika@nvidia.com>, <dev@dpdk.org>,
	Bing Zhao <bingz@nvidia.com>, <stable@dpdk.org>
Subject: Re: [PATCH] app/testpmd: fix flow queue job leaks
Date: Thu, 8 Jan 2026 16:54:51 +0100	[thread overview]
Message-ID: <nor7njfsxbxngnpsxrccsfm65j7q5kqic2qbulyyjd37xd4msv@d2tixwd737fu> (raw)
In-Reply-To: <20251202160406.2b166c90@phoenix.local>

On Tue, Dec 02, 2025 at 04:04:06PM -0800, Stephen Hemminger wrote:
> On Tue, 18 Nov 2025 11:45:18 +0100
> Dariusz Sosnowski <dsosnowski@nvidia.com> wrote:
> 
> > +	polled = 0;
> > +	success = 0;
> > +	while (expected_ops > 0) {
> > +		/* Poisoning to make sure PMDs update it in case of error. */
> > +		memset(&error, 0x55, sizeof(error));
> > +		ret = rte_flow_pull(port_id, queue_id, res, expected_ops, &error);
> > +		if (ret < 0) {
> > +			port_flow_complain(&error);
> > +			free(res);
> > +			return ret;
> > +		}
> > +		if (ret == 0) {
> > +			rte_delay_us_sleep(FLOW_QUEUE_FLUSH_SLEEP_US);
> > +			continue;
> > +		}
> 
> Infinite loops with sleep are bad. The poisoning seems unnecessary and not done
> elsewhere. Sleeping for 10 us is just unlikely to help much.

Regarding poisoning, it's not exactly true.
At least in most other cases in testpmd where flow API is used
(e.g. in port_flow_create() or port_flow_destroy()),
the error struct is poisoned.
It's not a perfect mechanism, but it allows catching bugs where
driver does not populate error struct on failure.
Due to lack of other mechanism and for consistency with rest of the code,
I'd keep the poisoning in this patch.

What do you think?

Regarding the loop logic, I agree.
I'll fix it in v2.

  reply	other threads:[~2026-01-08 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 10:45 Dariusz Sosnowski
2025-12-03  0:04 ` Stephen Hemminger
2026-01-08 15:54   ` Dariusz Sosnowski [this message]
2026-01-09 15:26 ` [PATCH v2] " Dariusz Sosnowski

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=nor7njfsxbxngnpsxrccsfm65j7q5kqic2qbulyyjd37xd4msv@d2tixwd737fu \
    --to=dsosnowski@nvidia.com \
    --cc=aman.deep.singh@intel.com \
    --cc=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=orika@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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).