From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 33F94C658 for ; Wed, 15 Jun 2016 16:06:29 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 15 Jun 2016 07:06:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,476,1459839600"; d="scan'208";a="122367678" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 15 Jun 2016 07:06:27 -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 u5FE6Qj7013542; Wed, 15 Jun 2016 15:06:26 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u5FE6QTQ006436; Wed, 15 Jun 2016 15:06:26 +0100 Received: (from reshmapa@localhost) by sivswdev02.ir.intel.com with id u5FE6Q6s006432; Wed, 15 Jun 2016 15:06:26 +0100 From: Reshma Pattan To: dev@dpdk.org Cc: Reshma Pattan Date: Wed, 15 Jun 2016 15:06:24 +0100 Message-Id: <1465999584-6343-8-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1465999584-6343-1-git-send-email-reshma.pattan@intel.com> References: <1465897108-26548-1-git-send-email-reshma.pattan@intel.com> <1465999584-6343-1-git-send-email-reshma.pattan@intel.com> Subject: [dpdk-dev] [PATCH v10 7/7] app/testpmd: 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: , X-List-Received-Date: Wed, 15 Jun 2016 14:06:29 -0000 Call rte_pdump_init and rte_pdump_uninit for packet capturing initialization and uninitialization. Signed-off-by: Reshma Pattan --- 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 dd6b046..b26f5be 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -76,6 +76,9 @@ #ifdef RTE_LIBRTE_PMD_XENVIRT #include #endif +#ifdef RTE_LIBRTE_PDUMP +#include +#endif #include "testpmd.h" @@ -2029,6 +2032,10 @@ signal_handler(int signum) if (signum == SIGINT || signum == SIGTERM) { printf("\nSignal %d received, preparing to exit...\n", signum); +#ifdef RTE_LIBRTE_PDUMP + /* uninitialize packet capture framework */ + rte_pdump_uninit(); +#endif force_quit(); /* exit with the expected status */ signal(signum, SIG_DFL); @@ -2049,6 +2056,11 @@ main(int argc, char** argv) if (diag < 0) rte_panic("Cannot init EAL\n"); +#ifdef RTE_LIBRTE_PDUMP + /* initialize packet capture framework */ + rte_pdump_init(NULL); +#endif + nb_ports = (portid_t) rte_eth_dev_count(); if (nb_ports == 0) RTE_LOG(WARNING, EAL, "No probed ethernet devices\n"); -- 2.5.0