From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id 27F845F44 for ; Tue, 30 Apr 2019 05:46:10 +0200 (CEST) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 28DEFBE8559CDA7A8F5E for ; Tue, 30 Apr 2019 11:46:09 +0800 (CST) Received: from [127.0.0.1] (10.177.131.206) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Tue, 30 Apr 2019 11:46:08 +0800 To: "Varghese, Vipin" , "dev@dpdk.org" CC: "Burakov, Anatoly" References: <1556428025-49290-1-git-send-email-mousuanming@huawei.com> <1556595548-53745-1-git-send-email-mousuanming@huawei.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33FA5F@BGSMSX101.gar.corp.intel.com> From: Suanming.Mou Message-ID: Date: Tue, 30 Apr 2019 11:43:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33FA5F@BGSMSX101.gar.corp.intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.177.131.206] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v4] app/pdump: add pudmp exits with primary support. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2019 03:46:11 -0000 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 >> Sent: Tuesday, April 30, 2019 9:09 AM >> To: dev@dpdk.org >> Cc: Varghese, Vipin ; Burakov, Anatoly >> >> 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 >> Suggested-by: Burakov, Anatoly >> Signed-off-by: Suanming.Mou >> --- >> 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 >> #include >> #include >> +#include >> >> #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 > > . > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 63B2AA0679 for ; Tue, 30 Apr 2019 05:46:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C5725F72; Tue, 30 Apr 2019 05:46:12 +0200 (CEST) Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id 27F845F44 for ; Tue, 30 Apr 2019 05:46:10 +0200 (CEST) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 28DEFBE8559CDA7A8F5E for ; Tue, 30 Apr 2019 11:46:09 +0800 (CST) Received: from [127.0.0.1] (10.177.131.206) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Tue, 30 Apr 2019 11:46:08 +0800 To: "Varghese, Vipin" , "dev@dpdk.org" CC: "Burakov, Anatoly" References: <1556428025-49290-1-git-send-email-mousuanming@huawei.com> <1556595548-53745-1-git-send-email-mousuanming@huawei.com> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33FA5F@BGSMSX101.gar.corp.intel.com> From: Suanming.Mou Message-ID: Date: Tue, 30 Apr 2019 11:43:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D33FA5F@BGSMSX101.gar.corp.intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.177.131.206] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v4] app/pdump: add pudmp exits with primary support. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190430034338.yfplHEnd_7T-7PlQA8J4iEaaufoCqNn65SvumsQB1o8@z> 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 >> Sent: Tuesday, April 30, 2019 9:09 AM >> To: dev@dpdk.org >> Cc: Varghese, Vipin ; Burakov, Anatoly >> >> 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 >> Suggested-by: Burakov, Anatoly >> Signed-off-by: Suanming.Mou >> --- >> 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 >> #include >> #include >> +#include >> >> #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 > > . >