patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Harneet Singh <harneet.singh@intel.com>, <dev@dpdk.org>
Cc: <stable@dpdk.org>, David Hunt <david.hunt@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/l3fwd-power: fix ctrl+c issue
Date: Fri, 29 Oct 2021 16:50:14 +0100
Message-ID: <48b90c93-4b28-5e7c-051a-48bc0ca9bc6c@intel.com> (raw)
In-Reply-To: <20211029140556.1913267-1-harneet.singh@intel.com>

On 29-Oct-21 3:05 PM, Harneet Singh wrote:
> Currently, EAL init cannot be interrupted with SIGINT because the
> signal  handler is already overridden by the time EAL init happens.
> 
> Fix it by moving signal handler installation to after EAL
> initialization, to allow SIGNIT to interrupt EAL initialization.
> 
> Fixes: d7937e2e3d12 ("power: initial import")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Harneet Singh <harneet.singh@intel.com>
> 
> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index 21c79567b1..002ba011c3 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -2532,9 +2532,6 @@ main(int argc, char **argv)
>   	uint16_t portid;
>   	const char *ptr_strings[NUM_TELSTATS];
>   
> -	/* catch SIGINT and restore cpufreq governor to ondemand */
> -	signal(SIGINT, signal_exit_now);
> -
>   	/* init EAL */
>   	ret = rte_eal_init(argc, argv);
>   	if (ret < 0)
> @@ -2542,6 +2539,9 @@ main(int argc, char **argv)
>   	argc -= ret;
>   	argv += ret;
>   
> +	/* catch SIGINT and restore cpufreq governor to ondemand */
> +	signal(SIGINT, signal_exit_now);
> +
>   	/* init RTE timer library to be used late */
>   	rte_timer_subsystem_init();
>   
> 

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

  reply	other threads:[~2021-10-29 15:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 14:05 [dpdk-stable] " Harneet Singh
2021-10-29 15:50 ` Burakov, Anatoly [this message]
2021-11-16 14:24   ` [dpdk-stable] [dpdk-dev] " David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48b90c93-4b28-5e7c-051a-48bc0ca9bc6c@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=harneet.singh@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git