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 CDBB34242B; Fri, 20 Jan 2023 06:56:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE7F240223; Fri, 20 Jan 2023 06:56:30 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 20AF0400D5 for ; Fri, 20 Jan 2023 06:56:29 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30K2EUQY030850; Thu, 19 Jan 2023 21:56:28 -0800 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3n71cewyuh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 21:56:28 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UyGLoispqQLLZuDaRsfVbohEoNM+8sSMa9jeTeL1WJVYcJ3T8gkXcWeEtTPzo+68x5cFttt9TvSCLxaSE+xygE8TORM2vhWrH4Gz5CaRgCVdSCTog8OiRpcBo8aLEvzUpEFfBi/pg6r/KBcidQHEk0a2NALBfsijdiuNEQVzVi0+xz2UQzLCu74xmq0jScSWkSKmD8St8jLAF2IIuXT2E0fWma8rcBuuGcviEbVhfDcamZc48vFm26nGxm8TQDkZALN49GI9UQ68FRIdXNdJyTNC9zOtyCySaPX+bPNKzUarVttdgO4dN03xoeN1VcPW7mdiiChsWlPWWqabD9aXNg== 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=Hy5zfhPVlPU7IlGc3vomIGFBHZU6lk+5zN6M0VdMmtQ=; b=BmH6VgqSbOZiG1fHTRxMAAKjv1tNvhVPtJ6ZABuXDwmMl87uC4Bhlc4R12mjgLFBtdBLIlCFcjd88Heo5DF2hTN9giejnHt1BPlvqlkBEb3h8qBl3NWkcJToDkcdp1duwYxJWEGUEIKAL766Qhb5eobarVIm3mLhv5SFsr6uv2hqxeiSJbHHr4/LNXUDagWpNt360eDKdveaWJPX2i4WEUabRt4/SDW7NrfLiJGDkGtFb2hX6Mv8ZaytiHurtvnXNoM4rY7nz05yiztqHiGWn2VJvjUnBfmRTueGRRbDFBt0QZnU1849MEP2iXKXjpTKB73LdoYCgZTOfffRMxnm5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hy5zfhPVlPU7IlGc3vomIGFBHZU6lk+5zN6M0VdMmtQ=; b=Y7Cg8SMKvDmLZ/RENbtm0CIkwoQd5BOEX/f7kvEesStCwS95IxX8d2KZZefgwF7Fx9LcWioyX/+QllIctWeQxK4fXTh4xukb5fb83gr7C+COjTi7fnBkh4bqtWTa6Va19KYUbkQDnKvE1jdzTqGA28UpUuinR+WbIKsh+xEZjrw= Received: from CO6PR18MB3844.namprd18.prod.outlook.com (2603:10b6:5:340::7) by SA1PR18MB4743.namprd18.prod.outlook.com (2603:10b6:806:1da::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.27; Fri, 20 Jan 2023 05:56:25 +0000 Received: from CO6PR18MB3844.namprd18.prod.outlook.com ([fe80::18a9:bdb1:3a87:c1c5]) by CO6PR18MB3844.namprd18.prod.outlook.com ([fe80::18a9:bdb1:3a87:c1c5%8]) with mapi id 15.20.6002.027; Fri, 20 Jan 2023 05:56:25 +0000 From: Rahul Bhansali To: "dev@dpdk.org" , Kirill Rybalchenko Subject: RE: [PATCH] examples/ptpclient: add signal handler for cleanup Thread-Topic: [PATCH] examples/ptpclient: add signal handler for cleanup Thread-Index: AQHYvQXOm4bs8qMoPEqh9VOKCstcXq4sPBjwgENFaEA= Date: Fri, 20 Jan 2023 05:56:25 +0000 Message-ID: References: <20220831064925.2580881-1-rbhansali@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-ref: =?us-ascii?Q?PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNccmJoYW5zYWxp?= =?us-ascii?Q?XGFwcGRhdGFccm9hbWluZ1wwOWQ4NDliNi0zMmQzLTRhNDAtODVlZS02Yjg0?= =?us-ascii?Q?YmEyOWUzNWJcbXNnc1xtc2ctMjk1NmJhZTAtOTg4Ny0xMWVkLTllMWEtOGM4?= =?us-ascii?Q?Y2FhMjAxMGUyXGFtZS10ZXN0XDI5NTZiYWUyLTk4ODctMTFlZC05ZTFhLThj?= =?us-ascii?Q?OGNhYTIwMTBlMmJvZHkudHh0IiBzej0iMzQ3NyIgdD0iMTMzMTg2Njc3ODEw?= =?us-ascii?Q?MTY2OTUyIiBoPSJZa1A4d0NGSnlYUlB0TjVBWU1aSmoybWpiVlU9IiBpZD0i?= =?us-ascii?Q?IiBibD0iMCIgYm89IjEiIGNpPSJjQUFBQUVSSFUxUlNSVUZOQ2dVQUFOZ0hB?= =?us-ascii?Q?QUNvZkxEcmt5elpBVEloUGlnMjAvRTVNaUUrS0RiV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ZXRhPg== x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO6PR18MB3844:EE_|SA1PR18MB4743:EE_ x-ms-office365-filtering-correlation-id: 5ecfbb5f-d3a7-4876-57d2-08dafaab10ac x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JkFfYb5Qi23btWW4If50Ejerhi4DsHzZjeO/Aa7V70hQQn5hfEgX2BNEkMMKtJmNHFPs5s3l6pa+VmNw35/EG2otuAvfHqhOY3vnHYPnceTtyOuK136h2KJfXFIkKRDStUnn8LLIWHI3ZZf9Qiej7ZUs7PMpOcLHPFcRhBXt2pGc7vY9EJEaME1DY22UU3RFrUu61TNMUHKmAe9IEUvOEW3QPOCTVBx1xcVO4JaJidIFxGaPvvfla3jBXMJWhFxagm7kXVKUP7ljML6fB4OoTQgW5kWPT01G1CCuEbcIboNZPrvok7jLIPdMphL7CHSUrjptSt84hftcIMV4IXaOKPbK1gms6Yuty7odxVFLvPJuzbaVvfJBmFI5WSAjF3oN8B4fhuE4RlVScduAbdMEJRd63EQSRDF5XtgkNxRA2+e+Ne7U6emujjit2+mCiuKbXDUvLN62dt81nS275cq3+HhbHj00mNBvXHeykFkhIFgiiakxiL0TuHsrvnB9ZWTe7UdhQsGjUe4Ny643TcK+3zxxRx2xk7ktl712BW3RPPuODHStrbcQ+qmhhxo0Oxyx3FnoiBNbuLaG/5bFv+gTKEwoDTicjdColbNcKn6htRxJcDCas9nxzS8RI17fNKXGGneVwViEr6b4iozGIjE4xfYLs5QhCA3dh1hUfZ45j+5aRKxgq8R3KyGrixhE8MVC x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB3844.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(346002)(136003)(396003)(376002)(39860400002)(451199015)(76116006)(52536014)(86362001)(8936002)(122000001)(5660300002)(71200400001)(186003)(66556008)(64756008)(66446008)(66476007)(33656002)(66946007)(8676002)(38070700005)(6506007)(2906002)(316002)(478600001)(53546011)(38100700002)(110136005)(83380400001)(7696005)(55016003)(9686003)(41300700001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?iEXRITtMk6oKLfzKMd9HVkzShxfA+o3dVQJNCVTRDwBKg0WGSgriQy/8mCiV?= =?us-ascii?Q?O3k6Vv8UQIcFYnPWySJatkZxll4Ukq711HSBQEbJ/koWtqyjrYxaK+iVNUAs?= =?us-ascii?Q?/eEumvmryW45s3puG58wf1aROhUga93bPA+iTtC4iuseooYialjQckbK5UaG?= =?us-ascii?Q?cDMXB5qOOyHOTojeuZ+2tkjJ2SfqBH5fF58MT776jbAjywze9lmhexm5thvR?= =?us-ascii?Q?TZEKjkzyPuQYgaAcj3PC3MOBzS5l9g/pQi8cXeuHgDojjakXRW/vWEBANtno?= =?us-ascii?Q?xmkel7A45xGwt0Z1rzdpjcWsJt2Pg7k6aipIe2LvQ2QQLqBmT/rX6e5Rtt+c?= =?us-ascii?Q?vPJqbNS6Kc0bBt2e5Lv26XTndHI0sI6WjeOMnFEURp5lh3jE0+RIvXc71J+u?= =?us-ascii?Q?IpTJXXtHrF4p7QAQ1LAgeEEASVcZHUmXGxgbauO2OGPQmkl7b/QiGk7ZfaF3?= =?us-ascii?Q?V6wcQ86vRSu3XeNnrYVU6uE8KAisGYvTLjr3o+ZBQxaqO3dQionQ8VAZOoMX?= =?us-ascii?Q?xZzcKKi3ajbmmX3OFJRxYGHALxCBderVr6oH+rVzuTg2xa5+nWu7WI/UcxFE?= =?us-ascii?Q?vlJzLnhRJ3bpuQhoXh3OQEhIvW32wMZSd7m1PHX9KunLwU1mCvv6EM2PKIHn?= =?us-ascii?Q?IrKqtd9XeRwok7bwR+ZnVemSL4uO71BFF+J3Dol/ATvPu/YdUl6WcRVBxFhb?= =?us-ascii?Q?Oa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E9EqAHHCVGto1x5kVwGqLe?= =?us-ascii?Q?rFd/MOE2H8WFVMAkQunPOe0cCEeIxlmyu2lDB6dnOO/L?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB3844.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ecfbb5f-d3a7-4876-57d2-08dafaab10ac X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jan 2023 05:56:25.1959 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PDxm6W8vzrGblbz3lFv1pK/BHoy4zHJD9dOIsqQDChBhA0XR/WgRsW77o6W78pzvd5uyiuiyzpmTBFNpsAAamg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR18MB4743 X-Proofpoint-GUID: TmkqhdjN6jAz-HmYznyEA-T3-dtLqyMB X-Proofpoint-ORIG-GUID: TmkqhdjN6jAz-HmYznyEA-T3-dtLqyMB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-20_02,2023-01-19_01,2022-06-22_01 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 Ping. > -----Original Message----- > From: Rahul Bhansali > Sent: Wednesday, November 2, 2022 10:21 PM > To: dev@dpdk.org; Kirill Rybalchenko > Subject: RE: [PATCH] examples/ptpclient: add signal handler for cleanup >=20 > Ping. >=20 > > -----Original Message----- > > From: Rahul Bhansali > > Sent: Wednesday, August 31, 2022 12:19 PM > > To: dev@dpdk.org; Kirill Rybalchenko > > Cc: Rahul Bhansali > > Subject: [PATCH] examples/ptpclient: add signal handler for cleanup > > > > This adds the signal handler for SIGINT, SIGTERM. > > Also, this will come out from infinite loop and do cleanup once it > > receives any of the registered signal. > > > > Signed-off-by: Rahul Bhansali > > --- > > examples/ptpclient/ptpclient.c | 32 ++++++++++++++++++++++++++++++-- > > 1 file changed, 30 insertions(+), 2 deletions(-) > > > > diff --git a/examples/ptpclient/ptpclient.c > > b/examples/ptpclient/ptpclient.c index 1f1c9c9c52..8b69716be1 100644 > > --- a/examples/ptpclient/ptpclient.c > > +++ b/examples/ptpclient/ptpclient.c > > @@ -19,6 +19,9 @@ > > #include > > #include > > #include > > +#include > > + > > +static volatile bool force_quit; > > > > #define RX_RING_SIZE 1024 > > #define TX_RING_SIZE 1024 > > @@ -609,7 +612,7 @@ parse_ptp_frames(uint16_t portid, struct rte_mbuf > > *m) { > > * The lcore main. This is the main thread that does the work, reading= from an > > * input port and writing to an output port. > > */ > > -static __rte_noreturn void > > +static void > > lcore_main(void) > > { > > uint16_t portid; > > @@ -621,7 +624,7 @@ lcore_main(void) > > > > /* Run until the application is quit or killed. */ > > > > - while (1) { > > + while (!force_quit) { > > /* Read packet from RX queues. 8< */ > > for (portid =3D 0; portid < ptp_enabled_port_nb; portid++) { > > > > @@ -734,6 +737,13 @@ ptp_parse_args(int argc, char **argv) > > return 0; > > } > > > > +static void > > +signal_handler(int signum) > > +{ > > + if (signum =3D=3D SIGINT || signum =3D=3D SIGTERM) > > + force_quit =3D true; > > +} > > + > > /* > > * The main function, which does initialization and calls the per-lcor= e > > * functions. > > @@ -758,6 +768,10 @@ main(int argc, char *argv[]) > > argc -=3D ret; > > argv +=3D ret; > > > > + force_quit =3D false; > > + signal(SIGINT, signal_handler); > > + signal(SIGTERM, signal_handler); > > + > > ret =3D ptp_parse_args(argc, argv); > > if (ret < 0) > > rte_exit(EXIT_FAILURE, "Error with PTP initialization\n"); @@ - > > 802,6 +816,20 @@ main(int argc, char *argv[]) > > /* Call lcore_main on the main core only. */ > > lcore_main(); > > > > + RTE_ETH_FOREACH_DEV(portid) { > > + if ((ptp_enabled_port_mask & (1 << portid)) =3D=3D 0) > > + continue; > > + > > + /* Disable timesync timestamping for the Ethernet device */ > > + rte_eth_timesync_disable(portid); > > + > > + ret =3D rte_eth_dev_stop(portid); > > + if (ret !=3D 0) > > + printf("rte_eth_dev_stop: err=3D%d, port=3D%d\n", ret, > > portid); > > + > > + rte_eth_dev_close(portid); > > + } > > + > > /* clean up the EAL */ > > rte_eal_cleanup(); > > > > -- > > 2.25.1