On 2019/4/30 10:33, Varghese, Vipin wrote:
Thanks for the patch work with rte_eal_alaram. But I am not able to find

1. the documentation update.

I'd like to reconfirm that since Anatoly suggested to make the option default, I deleted the option supporting code.

Is it aligned that we can make it default?

If it is aligned to make it default, then if I understand correctly, to add a new note in the documentation to describe pdump will exit with primary will be OK?

2. cover letter.
Sorry for that. Will add the cover letter in the V5 patch.
3. for signal SIGINT, set for ` rte_eal_alarm_cancel`.
Ah, yes.

Can you share a new patch as v5 with these changes?
Thanks for your reviewing. I will send the next patch after Q1 confirmed.

Thanks
Vipin Varghese

-----Original Message-----
From: Suanming.Mou <mousuanm...@huawei.com>
Sent: Tuesday, April 30, 2019 9:09 AM
To: dev@dpdk.org
Cc: Varghese, Vipin <vipin.vargh...@intel.com>; Burakov, Anatoly
<anatoly.bura...@intel.com>
Subject: [PATCH v4] app/pdump: add pudmp exits with primary support.

When primary app exits, the residual running pdump will stop the primary app to
restart. Add pdump exits with primary support.

Suggested-by: Varghese, Vipin <vipin.vargh...@intel.com>
Suggested-by: Burakov, Anatoly <anatoly.bura...@intel.com>
Signed-off-by: Suanming.Mou <mousuanm...@huawei.com>
---
  app/pdump/main.c | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)

diff --git a/app/pdump/main.c b/app/pdump/main.c index 3d20854..c3413da
100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -26,6 +26,7 @@
  #include <rte_ring.h>
  #include <rte_string_fns.h>
  #include <rte_pdump.h>
+#include <rte_alarm.h>

  #define CMD_LINE_OPT_PDUMP "pdump"
  #define CMD_LINE_OPT_PDUMP_NUM 256
@@ -65,6 +66,7 @@
  #define SIZE 256
  #define BURST_SIZE 32
  #define NUM_VDEVS 2
+#define MONITOR_INTERVAL (500 * 1000)

  /* true if x is a power of 2 */
  #define POWEROF2(x) ((((x)-1) & (x)) == 0) @@ -864,12 +866,26 @@ struct
parse_val {
        return 0;
  }

+static void monitor_primary(void *arg __rte_unused) {
+       if (quit_signal)
+               return;
+
+       if (rte_eal_primary_proc_alive(NULL))
+               rte_eal_alarm_set(MONITOR_INTERVAL, monitor_primary,
NULL);
+       else
+               quit_signal = 1;
+}
+
  static inline void
  dump_packets(void)
  {
        int i;
        uint32_t lcore_id = 0;

+       /* Once primary exits, so will pdump. */
+       rte_eal_alarm_set(MONITOR_INTERVAL, monitor_primary, NULL);
+
        if (!multiple_core_capture) {
                printf(" core (%u), capture for (%d) tuples\n",
                                rte_lcore_id(), num_tuples);
--
1.8.3.4

.


Reply via email to