From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C4FFA0547; Fri, 29 Oct 2021 17:50:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B2BF426DC; Fri, 29 Oct 2021 17:50:35 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id DB0CD4111F; Fri, 29 Oct 2021 17:50:32 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10151"; a="230642896" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="230642896" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 08:50:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="574723672" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by FMSMGA003.fm.intel.com with ESMTP; 29 Oct 2021 08:50:29 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 29 Oct 2021 08:50:29 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 29 Oct 2021 08:50:29 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.108) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Fri, 29 Oct 2021 08:50:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cndy+1RK6yyHz1XSDlzv9cAzeD7cHa8Hx0E7g8so+fHYuaRMiKnf8gU5tAp7kQWz+uBTbLMgkgc98xNty6JNPdI2Qrf3nJB+3KIMyim9FyTCTjo/yp/tspJC+SR69Bdw6lbyul+rWNPnhmQGGbDW06CryTchoI7QG3RE1r7FL4h4GrB8snJBaAk0nkFlV0tSSljIddgomXRpvW13/hIjT2jh688ECOfV74asEryQpI+CJTQDP38XwW4aFIDyek80krLd4++kWw+Hj2NGuJkTqnMPHv3VZMLQUay/oREfp+dzneGL8VA86E1RoHoePoLcTz55aXy6Q7LB3GgesjUHjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NyQY3Rfxc5iyLcZhcH+vbY3GPqrajeERVm/OfeQ2o6c=; b=guliDenGb1nZTma52N6xMjY+w/KNQ1O75hikhAdUj7+RVwh3glDMccVjqFxvK4u+hMKzgkqIE89l236Uns7G4frshwN2hUxRruaXo1TYB5ReNh5edVvu6JHBT7Oxjc3bnINYBv1DBxjy8PnI2OvDrT6uZgJ5CthDjCTHd5Ei0w1BJCXnBLkH8jrbBj5NiS77YqUpqk2Z+EqY8VZUE1SERPRuiCWjMrgMrRohZo0IiL8hybrX8+3yFalRG73HZeJ4UshqezxoXjKeo8T48xmGkC4JAyXv8VmU2go+nzPH3/dwO6ieszs5Sott8NNanm5tjiWtqK4DTRCAPxcproNsFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NyQY3Rfxc5iyLcZhcH+vbY3GPqrajeERVm/OfeQ2o6c=; b=beTXOicJQ3TDKz77HhPw8LJGuVc9bGnxtO7adcy5WcYryNREwwkwCrlr3d6XdMGU9j75WAK0tq5G7rzohA+roHiOogSXRoDzxE5d7FZ+xoCdJ8LXJv2ugXeTlJEiJv+VmyTHLqugAdcLZwTY4FBuZRq71eTjuW4bmtwXbHRJ2cw= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) by PH0PR11MB5045.namprd11.prod.outlook.com (2603:10b6:510:3f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Fri, 29 Oct 2021 15:50:20 +0000 Received: from PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::a80e:d881:3c58:9730]) by PH0PR11MB5093.namprd11.prod.outlook.com ([fe80::a80e:d881:3c58:9730%3]) with mapi id 15.20.4649.015; Fri, 29 Oct 2021 15:50:20 +0000 Message-ID: <48b90c93-4b28-5e7c-051a-48bc0ca9bc6c@intel.com> Date: Fri, 29 Oct 2021 16:50:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.2.1 Content-Language: en-US To: Harneet Singh , CC: , David Hunt References: <20211029140556.1913267-1-harneet.singh@intel.com> From: "Burakov, Anatoly" In-Reply-To: <20211029140556.1913267-1-harneet.singh@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB7PR02CA0031.eurprd02.prod.outlook.com (2603:10a6:10:52::44) To PH0PR11MB5093.namprd11.prod.outlook.com (2603:10b6:510:3e::23) MIME-Version: 1.0 Received: from [192.168.1.10] (212.17.34.161) by DB7PR02CA0031.eurprd02.prod.outlook.com (2603:10a6:10:52::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Fri, 29 Oct 2021 15:50:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e6c35b07-ef08-4f97-2b27-08d99af3cf75 X-MS-TrafficTypeDiagnostic: PH0PR11MB5045: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SI5bBzv1dhJTss2aPKVhmG4eFpQ/X5gPNoqzzBB76Kciim9Rrju5ihbmIx9TX5pDi85FtX/bPEoI7pt573Av57YU7gb0vzQaKXesuV8L+LoXadiPwKdm43s87Fy+7W7SUaHf6Z0puJYGRc4QdLJP+uR8xKqMw/pJbpMF5JoVVKgJ9Gk9a/etutJP0AqTwaSiUnm244WULW7uNc5crs/8yJ7gLMzoqJ4Nl7i4yHH1wrPzGw3x9GHrrNvz1ZyoDmHFfwjuW0Gq7zKFT/dPzwodGN/Ie0WCcR8aSn02pdlAEzSxt13Ep1StGXTL1qCMMTpFrZBfb+7zK3Cqk2isPKTlbe8pHnCG7rsNgCAOFgfHDz6rG1ie0D/2a1d+F3+j1E694Dqm50jeLfP9785Coskmqe1fv2naIPSjGtv2OZPy9Efvg7wy0u9Hebdg4zjzw8k6DITfW/JN/rc5di7m501e67wermEjFGDnFinz+7GZAikI1P1X+g2yKDLGGXxXe2Zo4203z4QdphdaEOQj0Lftq9kRWZ+XzTU7h4sARIwpy5D7ikhmrdBG3NZNIxDAEeiRKqLxFZbxM2mL+gXQcGM3tlnNMf5x1rUAZy8nnLAl+JfVRYCmVrkBf1pitUIGlZLL1F63jhx6p/f6RGFjRR3aikdol2P1FFbV44FlwZ1D0Pcy2rv8QCDWVwoW32bax6WNKbv8Tu4u/6w2qnXYgwK/L0j3SE5lXvQfn5nQJ2keQV8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5093.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2906002)(83380400001)(66476007)(53546011)(186003)(4326008)(16576012)(8676002)(508600001)(36756003)(66556008)(6666004)(316002)(450100002)(5660300002)(107886003)(2616005)(86362001)(82960400001)(8936002)(38100700002)(31686004)(66946007)(31696002)(26005)(6486002)(956004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U3A3Q0RSRVdmZHJWaHN5Mis2NVVtN0ozd0Y2alY2RWVjbVRyQXYxNjd4Wmhn?= =?utf-8?B?ZFJhWS9ZSUJTY05weEtMcTVUSjg0TTRBNDFhdWtEbnVxb2UrWmdOYmo3c3Z4?= =?utf-8?B?QkZSZW1qZVloTHZoWFZaSENRcFR5bkZyc1U5ajRKNkxDdEFzQlE2WWhVMlZR?= =?utf-8?B?amtDR1FWbjdqVGhuSDNYNGRsUlV0RWJYYWcyYnJIam5Fblk1N2pVblB5aExh?= =?utf-8?B?MlJWWnovSzRpb3dCNVQ1UHcyMHZ3UEdTY3MwUkY1NG12M2tnYmlQR2VrZzhY?= =?utf-8?B?YlpDS1o1NERZK1F4THhjeGZKa1FZaUorbXpKT3pITkRFcmtJdm9MdkxNc0NQ?= =?utf-8?B?THpGSEE2MUJKblN6Z1B0UUVlN2dtZUlxc0FmMmI2ZWJDWFFUcHRyanFQOHhW?= =?utf-8?B?M2xXWmd0MCtvTFZsM1VYbDgvZE5qMFRtck1xUFRL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RVmRHaW85VlAwWkFRQm5yeVpRPT0=?= X-MS-Exchange-CrossTenant-Network-Message-Id: e6c35b07-ef08-4f97-2b27-08d99af3cf75 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5093.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2021 15:50:20.0597 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YkQ1yuwe0XLyKAW/IZVouVyL7+vPT3f5Qj/Y5HCNeIq1j7Zx26lakTL6M2bRNqEiiK+idRbAuswG6s1vinHtdIGkTEjyKersS/gOeWkpWBE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5045 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] examples/l3fwd-power: fix ctrl+c issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 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 > > 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 -- Thanks, Anatoly