From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D551A0093 for ; Thu, 23 Jun 2022 14:10:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3E984003F; Thu, 23 Jun 2022 14:10:32 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 2DF344003F; Thu, 23 Jun 2022 14:10:31 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id AEE12AC; Thu, 23 Jun 2022 15:10:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru AEE12AC DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1655986230; bh=5WYLPs3SFDTounEc1enYV1AsI//G/KKxRuS+hCKG8qc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kw8/JTys8alCfE0g/C24zksZTjOrTMoUArfyRcuaPowMvmRbuJvmaN/vVgggVSl70 AkAN33vJ8Gq6bdEXnhESpkXfeI/OZywnxibBXDM+Xr560x3KQEJnm6L5q19CKrxQjd cTWeMVcXksx8jU1Czpue4J5UAMzuCs7Dsw21t+IE= Message-ID: <5bd19b16-f878-98fe-e1ea-d992c1ffcaa7@oktetlabs.ru> Date: Thu, 23 Jun 2022 15:10:30 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH] app/testpmd: fix secondary process cannot dump packet Content-Language: en-US To: peng1x.zhang@intel.com, dev@dpdk.org Cc: aman.deep.singh@intel.com, yuying.zhang@intel.com, stable@dpdk.org References: <20220623181502.181567-1-peng1x.zhang@intel.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20220623181502.181567-1-peng1x.zhang@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 6/23/22 21:15, peng1x.zhang@intel.com wrote: > From: Peng Zhang > > The origin design is whether testpmd is primary or not, if state of > receive queue is stop, then packets will not be dumped for show. > While to secondary process, receive queue will not be set up, and state > will still be stop even if testpmd is started. So packets of stated > secondary process cannot be dumped for show. > > The current design is to secondary process state of queue will be set > to start after testpmd is started. Then packets of started secondary > process can be dumped for show. > > Fixes: a550baf24af9 ("app/testpmd: support multi-process") > Cc: stable@dpdk.org > > Signed-off-by: Peng Zhang > --- > app/test-pmd/testpmd.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 205d98ee3d..93ba7e7c9b 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -3007,6 +3007,18 @@ start_port(portid_t pid) > if (setup_hairpin_queues(pi, p_pi, cnt_pi) != 0) > return -1; > } > + > + if (port->need_reconfig_queues > 0 && !is_proc_primary()) { > + struct rte_eth_rxconf *rx_conf; > + for (qi = 0; qi < nb_rxq; qi++) { > + rx_conf = &(port->rxq[qi].conf); > + ports[pi].rxq[qi].state = > + rx_conf->rx_deferred_start ? > + RTE_ETH_QUEUE_STATE_STOPPED : > + RTE_ETH_QUEUE_STATE_STARTED; I'm not sure why it is correct to assume that deferred queue is not yet started. > + } > + } > + > configure_rxtx_dump_callbacks(verbose_level); > if (clear_ptypes) { > diag = rte_eth_dev_set_ptypes(pi, RTE_PTYPE_UNKNOWN,