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 37C85A0093; Thu, 23 Jun 2022 12:23:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 738864069D; Thu, 23 Jun 2022 12:23:04 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 976494003F; Thu, 23 Jun 2022 12:23:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655979782; x=1687515782; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ZM7trwY0xlLyWgHMaLOJH4L39SnmQkw08hbmTjUpeuY=; b=EG09HXfzpzi46/9MEVxILfe51Sw9FFwUjxZ23+2ID4Fu+SJXiqUfDJbZ phHFmT2peN6yjBIrSzZoQs3qdOwNJ6rnZ9D0OmujJto5RdRaUEnmHShgw hfxw1t1RJL23aAika1062dh3DRAvs+vY9qzSqn9KFVLYKpv9MPIm8ogWE ktWgD93RhFnXZnMcR7oEv8eXz4g2YhaphMkqQWkCuGRlfC30qmJbFh9ev 1Df3XBA4YvqmJd6iXc9No3cPygk522KP0G75fJNDkdW5cK9I1oDPcxeXI dumO3D13hcyshsHxIbFAixLW4oEgCNN3Zcy3dFmbCzVpzTwwAjORBw8dM Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="261112628" X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="261112628" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 03:23:01 -0700 X-IronPort-AV: E=Sophos;i="5.92,215,1650956400"; d="scan'208";a="644671433" Received: from unknown (HELO localhost.localdomain) ([10.239.252.253]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 03:22:59 -0700 From: peng1x.zhang@intel.com To: dev@dpdk.org Cc: aman.deep.singh@intel.com, yuying.zhang@intel.com, Peng Zhang , stable@dpdk.org Subject: [PATCH] app/testpmd: fix secondary process cannot dump packet Date: Fri, 24 Jun 2022 02:15:02 +0800 Message-Id: <20220623181502.181567-1-peng1x.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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; + } + } + configure_rxtx_dump_callbacks(verbose_level); if (clear_ptypes) { diag = rte_eth_dev_set_ptypes(pi, RTE_PTYPE_UNKNOWN, -- 2.25.1