From patchwork Tue May 17 16:37:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pattan, Reshma" X-Patchwork-Id: 12814 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 93B7F6CD3; Tue, 17 May 2016 18:37:27 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C06F26CC0 for ; Tue, 17 May 2016 18:37:21 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 17 May 2016 09:37:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,324,1459839600"; d="scan'208";a="808749639" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga003.jf.intel.com with ESMTP; 17 May 2016 09:37:19 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u4HGbJd1023146; Tue, 17 May 2016 17:37:19 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u4HGbIfS010421; Tue, 17 May 2016 17:37:18 +0100 Received: (from reshmapa@localhost) by sivswdev02.ir.intel.com with id u4HGbISG010417; Tue, 17 May 2016 17:37:18 +0100 From: Reshma Pattan To: dev@dpdk.org Cc: Reshma Pattan Date: Tue, 17 May 2016 17:37:09 +0100 Message-Id: <1463503030-10318-8-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1463503030-10318-1-git-send-email-reshma.pattan@intel.com> References: <1462873202-3314-1-git-send-email-reshma.pattan@intel.com> <1463503030-10318-1-git-send-email-reshma.pattan@intel.com> Subject: [dpdk-dev] [PATCH v3 7/8] app/test-pmd: add pdump initialization uninitialization 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" Call rte_pdump_init and rte_pdump_uninit for packet capturing initialization and uninitialization. Signed-off-by: Reshma Pattan --- app/test-pmd/testpmd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 26a174c..e131363 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -75,6 +75,7 @@ #ifdef RTE_LIBRTE_PMD_XENVIRT #include #endif +#include #include "testpmd.h" #include "mempool_osdep.h" @@ -2018,6 +2019,8 @@ signal_handler(int signum) if (signum == SIGINT || signum == SIGTERM) { printf("\nSignal %d received, preparing to exit...\n", signum); + /* uninitialize packet capture framework */ + rte_pdump_uninit(); force_quit(); /* exit with the expected status */ signal(signum, SIG_DFL); @@ -2038,6 +2041,9 @@ main(int argc, char** argv) if (diag < 0) rte_panic("Cannot init EAL\n"); + /* initialize packet capture framework */ + rte_pdump_init(); + nb_ports = (portid_t) rte_eth_dev_count(); if (nb_ports == 0) RTE_LOG(WARNING, EAL, "No probed ethernet devices\n");