From patchwork Thu May 5 15:39:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Iremonger, Bernard" X-Patchwork-Id: 12409 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 0D8265A49; Thu, 5 May 2016 17:40:33 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 02FC25A03 for ; Thu, 5 May 2016 17:40:31 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 05 May 2016 08:40:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,582,1455004800"; d="scan'208";a="959597568" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 05 May 2016 08:40:30 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u45FeTSw022319; Thu, 5 May 2016 16:40:29 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id u45FeTIk019298; Thu, 5 May 2016 16:40:29 +0100 Received: (from bairemon@localhost) by sivswdev01.ir.intel.com with id u45FeS94019294; Thu, 5 May 2016 16:40:28 +0100 From: Bernard Iremonger To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, Bernard Iremonger Date: Thu, 5 May 2016 16:39:53 +0100 Message-Id: <1462462795-18767-7-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1462462795-18767-1-git-send-email-bernard.iremonger@intel.com> References: <1461156779-24737-1-git-send-email-bernard.iremonger@intel.com> <1462462795-18767-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH v2 6/8] app/testpmd: move call to init_fwd_streams X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Move call to init_fwd_streams from start_port function to start_packet_forwarding function. Signed-off-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index e5e50ca..e632a5b 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -981,6 +981,12 @@ start_packet_forwarding(int with_tx_first) printf("Packet forwarding already started\n"); return; } + + if (init_fwd_streams() < 0) { + printf("Fail from init_fwd_streams()\n"); + return; + } + if(dcb_test) { for (i = 0; i < nb_fwd_ports; i++) { pt_id = fwd_ports_ids[i]; @@ -1271,11 +1277,6 @@ start_port(portid_t pid) if (port_id_is_invalid(pid, ENABLED_WARN)) return 0; - if (init_fwd_streams() < 0) { - printf("Fail from init_fwd_streams()\n"); - return -1; - } - if(dcb_config) dcb_test = 1; FOREACH_PORT(pi, ports) {