From: Reshma Pattan Date: Wed, 15 Jun 2016 14:06:24 +0000 (+0100) Subject: app/testpmd: initialize pdump X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=102b7329507e95d13e82bbad5565bc93e352951e;p=dpdk.git app/testpmd: initialize pdump Call rte_pdump_init and rte_pdump_uninit for packet capturing initialization and uninitialization. Signed-off-by: Reshma Pattan Acked-by: Konstantin Ananyev --- diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 8060c99802..06885ceba1 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" @@ -2033,6 +2036,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); @@ -2053,6 +2060,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");