DPDK patches and discussions
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <thomas@monjalon.net>, <dev@dpdk.org>,
	<aman.deep.singh@intel.com>, <liuyonglong@huawei.com>,
	<yangxingui@huawei.com>, <lihuisong@huawei.com>
Subject: Re: [PATCH 0/3] testpmd support stop specify lcore
Date: Wed, 5 Nov 2025 08:43:29 +0800	[thread overview]
Message-ID: <dcb52244-1814-411e-bab3-853fa9665ab8@huawei.com> (raw)
In-Reply-To: <20251104162146.46daf538@phoenix>

On 11/5/2025 8:21 AM, Stephen Hemminger wrote:
> On Tue, 4 Nov 2025 12:09:13 +0800
> Chengwen Feng <fengchengwen@huawei.com> wrote:
> 
>> This patch support stop specify lcore for testpmd, and also include
>> two bugfix which found when test DCB function.
>>
>> Chengwen Feng (3):
>>   app/testpmd: fix invalid txp when setup DCB forward
>>   app/testpmd: fix wrong Rx queues when setup DCB forward
>>   app/testpmd: support stop specify lcore
>>
>>  app/test-pmd/cmdline.c                      | 63 +++++++++++++++++++++
>>  app/test-pmd/config.c                       |  9 +--
>>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  7 +++
>>  3 files changed, 73 insertions(+), 6 deletions(-)
>>
> 
> If there is a stop lcore, why is there not a command to restart the lcore?

The restart lcore is more complex which include data prepare (init).

But I think could impl such pause / restart function by config fc->stopped a special value:

Current:
	run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
	{
		do {
			forwarding logic
		} while(!fc->stopped);
	}

We could adjust the logic to support pause / restart function:
	run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
	{
	_restart:
		do {
			forwarding logic
		} while(!fc->stopped);
 		while (fc->stopped == 2) {
			nop
		}
		if (fc->stopped == 1)
			return;
		if (fc->stopped == 0)
			// means restart
			goto _restart;
	}
So we could configure fc->stopped = 2 to pause forwarding, and config it to 0 to restart forwarding.

> Looks like this just an optimization for DCB.

Yes, mainly for test the Tx direction's DCB function.

> Could it be handled better by having testpmd not spawn lcores that
> have no queues? 

The lcore spawned by testpmd always has queues. In this patchset, we just stop some queue's forwarding.

> 



  reply	other threads:[~2025-11-05  0:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-04  4:09 Chengwen Feng
2025-11-04  4:09 ` [PATCH 1/3] app/testpmd: fix invalid txp when setup DCB forward Chengwen Feng
2025-11-04  4:09 ` [PATCH 2/3] app/testpmd: fix wrong Rx queues " Chengwen Feng
2025-11-04  4:09 ` [PATCH 3/3] app/testpmd: support stop specify lcore Chengwen Feng
2025-11-05  0:21 ` [PATCH 0/3] testpmd " Stephen Hemminger
2025-11-05  0:43   ` fengchengwen [this message]
2025-11-05  9:47 ` [PATCH v2 0/3] testpmd support pause/resume specify lcore's fwd Chengwen Feng
2025-11-05  9:47   ` [PATCH v2 1/3] app/testpmd: fix invalid txp when setup DCB forward Chengwen Feng
2025-11-05  9:47   ` [PATCH v2 2/3] app/testpmd: fix wrong Rx queues " Chengwen Feng
2025-11-05  9:47   ` [PATCH v2 3/3] app/testpmd: support pause/resume specify lcore Chengwen Feng

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=dcb52244-1814-411e-bab3-853fa9665ab8@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=lihuisong@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=yangxingui@huawei.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).