Added calls to rte_pdump_init and rte_pdump_uninit for
packet capture framework initialization and uninitialization.

Signed-off-by: Reshma Pattan <reshma.pattan at intel.com>
---
 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 <rte_eth_xenvirt.h>
 #endif
+#include <rte_pdump.h>

 #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");
-- 
2.5.0

Reply via email to