From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0089.outbound.protection.outlook.com [104.47.41.89]) by dpdk.org (Postfix) with ESMTP id 9C1F723C for ; Wed, 18 Jul 2018 19:36:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g5x4wgn5PAWDEaTbI4uisEBxVPh78NajAUSfam3CeTg=; b=JHh1KNLbiZVT6jI6PS6CUXkwYFcPBYC6ZeQAXR/zegNdbMMeuipUGJZDpIVJzrCl6pyYAOjvot7P09Fo5NJ17ui2tJrBHeEcmIL8gT3LtZabOW1NkiEfThvypIBEJZThXzvN4bNUYDbh2sZnYHOfLme4JIhkQf7jPwvIc7rxgVo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by BYAPR07MB4999.namprd07.prod.outlook.com (2603:10b6:a03:5b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Wed, 18 Jul 2018 17:36:35 +0000 Date: Wed, 18 Jul 2018 23:06:15 +0530 From: Jerin Jacob To: Pavan Nikhilesh Cc: santosh.shukla@caviumnetworks.com, dev@dpdk.org Message-ID: <20180718173613.GC29741@jerin> References: <20180717143307.5270-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180717143307.5270-1-pbhagavatula@caviumnetworks.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR0101CA0039.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::25) To BYAPR07MB4999.namprd07.prod.outlook.com (2603:10b6:a03:5b::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 793010f7-6a7b-4a20-ed9d-08d5ecd50329 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4999; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4999; 3:zMir/8qSUAbNmTCeH5VLTSvn7oM0C96soXcs+oHWGETyw67Gi0EiZK1RjxEomOuDz9NQUZ6Rx+IROKxwsMkiH/vYOpDqu1ATFhMvAp5iMa/DLPkBFDODFvmhapam/hJaSUE9eUMTo+Pkwu4HvDQ+YiINyBraNsMkf9TFAJoeP2mSyEbgy/r/vmXjh1MiBje6zFr9uMbHo5g5f+nbSTqlrE8BJ12WB4ftMF+/NoKmo3VDlvcj8SfGn3lq4Lyywwgy; 25:C4HJXQ/TPa8VjZldQapw/MONOk/bwLPS7DkIIH/dDTzftQ2PrM3vonNqhuxqBXJzNkPfWFTvLTkW0ICw8RZzd1LDw67iVC0WExdUSXycAaGIKOPXoqFCvIu+B6Ur2z9uKW8K9abn1awYG0T4ccQYf8V/2dJPqRMmeJYD+kV7skh6RKDS2CGwZZ7xI1sno416uEEoV+1Z742rkAIVaVbSmjgvT3DzOYwQS9w17KMOKzwRAzxr5TRmp1xPn3Wo9fmqZwBofjUrM/VGoK3T5UF/wsmAQD2ShLdwof5coPYoHdFPP6aRx/LToqOXocBdGfvsEFRaMKTr1lmtAovDb3WLdw==; 31:+BDC/FwPLHUZ1cZgK40S4qUvociXhXqmQjxe/kce6E+tfWZOjaQgIrB8TfWkmOBXyiwRiPGWxTE/I/n0aiDxyHvmKGTEk6pAMMr6e1ndvQaprSdRBKkZM9QtbvprKi82Dia0hBBUl127iBQx+/T9Mu5W8YcFI/sfsJwH6fJiWasSK38XRpHr4DxHpAIp+WSl36gT3MtXxG13yu+Hnak4zi9WvwgSHYlDhyDKfvuOWs8= X-MS-TrafficTypeDiagnostic: BYAPR07MB4999: X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4999; 20:2TRCV74DJvcYmBhZC2MEqmoX9prR8KH9JftUCIR/K1wcgJkYzpKgRB7VWPzrO8/BWVGsgqvn781ijdVjup9de6vf5+98nVfW8gnzmZnOdcdsbj+5PgKCL53a6oAOpPTnlGUEPnIv8gZC22UJzahbpjADfYwswPJVFK55PcNVnUd/5qQVR4thynCBF16q5viA0bDr/eu2iSCOLnMRK7Pc0l3p6kjcDYX7hxVQLXYwyn8shtWTPIcniXfeJOy00SadGycitWQ8gLpMI8qDJXndGF8e619urB191YnkMEPCdUU/Yor5QvCQ9a3oPH120j2pvRSR4IzJcRT67GlTxmNHPQnGa4jS3x+l2gqzJr6g34DMPCRlu8BzJyI9G72bcdPqul3MCLg2A6KT1giTDXsd/lfwJvwATb/KMaJEAKtFYxLYDyno7jly1RwTHROMDEokwaUcBOK1JQ4639v3f4LbHLoWYO9E6KDjS7wNKI4mqkatL6Ir+NECYgGz4/RQoXITM3e2Icq0HTufQNJUxO9T28HdV9IJ6PLAza9F0/GzXyzwwYdqiZXDqbSt7Z87xku76RyTPhOXIXnHG5nAgGnI/nlpdMv49zARbxTUx2SJZrQ=; 4:gjBUBZPcTROpssisWUQqLLhY8tFQbBXOz6ir90BRmlBbeTCV13pf4UpIqZIv4GjV8ShehwsJPsUULMDpFglE/IH2E0qCqi/iVFKAsI5KfP6bLMTLA7dGWcK9qoRj3fAqrTaqgOVLoMGbILRvZnrA/3dHZVj8gSIoLrg6ZwUXtu3YsCCbAK0l6hHnHQ8sTjTZES/kqnX9TQ3S1YPLVjSUJkkR3de+FY4Mr+/E0BWPIrknzyIkvJvIT2X2wdy2i1tikJpeAjx0MJqLIPt55BDXuQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(3002001)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:BYAPR07MB4999; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4999; X-Forefront-PRVS: 0737B96801 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(136003)(366004)(376002)(346002)(396003)(13464003)(189003)(199004)(14444005)(2906002)(3846002)(476003)(6116002)(16586007)(58126008)(81166006)(8676002)(446003)(81156014)(55016002)(8936002)(316002)(11346002)(5009440100003)(42882007)(229853002)(305945005)(1076002)(33896004)(33656002)(956004)(50466002)(52116002)(76176011)(6666003)(6496006)(23726003)(7736002)(9686003)(6636002)(386003)(66066001)(486006)(53936002)(47776003)(26005)(97736004)(33716001)(105586002)(16526019)(6862004)(6246003)(68736007)(5660300001)(106356001)(478600001)(72206003)(44832011)(4326008)(25786009)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4999; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4999; 23:ceDgbHisIdd6daXJJEGUe0Rm+INDo+OcoxLCb4vE4?= =?us-ascii?Q?KvjKFIdxn3FyqxXavkt6VTeHysQ5rSiq7mqhKaLYlCl7ONspg+5W02xzwzqi?= =?us-ascii?Q?NQ/wVQBIfceAhIj/JQt86PjKwudmuaAaqUhr7NgW/+F2CZtcUFRQ+z/EkmRU?= =?us-ascii?Q?545yFcD4AlG3yjIULAwe/1iv1z7ppMzuJr0sYY5qKpEgvFEnZExXGe1UDz7W?= =?us-ascii?Q?YuDjzTR/1zOIPllUrXZBbHikeo2CwKeAIKPydr+gArBwq19XC/PBQk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H3IVn48nuMhxImBzPZ/iux1MydYxc0/?= =?us-ascii?Q?/Mw84EGZ8HwIggKbR7iowzzoEfuxxggGleN4yxmtLmBb+r1psGXL07NeukEX?= =?us-ascii?Q?s3BPD+AJEkKlUBCv6no86DEIlRvtr5p8XVLvZTl5pyXZSILU7a3+Jwk/5+vl?= =?us-ascii?Q?3RwDs4exb/C9sgnJ9Llkau0RHjbj/X7F2nc0bw4Ou0pCzGD53E4fG55R5tng?= =?us-ascii?Q?+nnq5kI259owuE/IxPPOMf/ZfE=3D?= X-Microsoft-Antispam-Message-Info: CsKSriXC0RbAkfy3VlVe1DThDaaUAHftIp16o49ozG8pwIemoExGI3eMY7sLnesxPSAWHqI2Q6GVVBAGve35MbkfyOe8cGZYgVskKxClJyCP23XRfTMU96pdrO5Ifdo0zqvRhsLaVrtqYfXgjmmxPK6tRd8sHSJpX9B3XtWhXARo5haVDvQ34LTy36hIgjaSrLuEMv3IoiR9vpDwsYppP73nJ0KnV+ibKtDNGZ2OA/UlSMwyOQ6a0uVfPJTBZV3i9ZPviUM4FkzenasP+9BkcfiE6QbsrG4GC+0H3+nyMDknpZDWDmUxSx+ESI1rApxfGfqIYsUlRESoxHKYxBAcBgFehyVTgaV7ojhqfbsuURM= X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4999; 6:T6l6mZCMzyAYOOjRnCsSCU8nLKLn2gj1wpH8mPEzeDfSbhya20xDQICQ90pcWg0shIIqh738ta25nEW4r9xXHhnbupaN4pYlJIvNVytHtqzJuthEcIrLRdCGpRqJj3zcZrTCRUnRkmseD1KlHw+I85wAwZVtZmCHnkKOmSYmPjNKuNkAAhKNuySf91u3ySVAqd6F35CmI8S3izxRdIC5bKSnef7dIa7Fw+vyD7vBQfv3QBaFgpxsUiWXX7MJJZdEoCEL8PSsMdfcGh7NN6SJB/ZkGto3Oditux21Qsavmv2mV4QfUPkd57vAfCVGqf578vbHjjW9jIAUUElOJMDXM/SxxbgpenHEtfzusChhbbeovcwNJCsbp4bEMjv14JOfmUh2naQAKL1UQpYUMJe2Ouj7X3JpA0mndsvfYWmtTwEcj5W2xxlO4adfCtO5wNpFQruM2lVumOYKDL7tf8tk7A==; 5:WoodRY2EMhAaFf3qHbCC8hqzv/8M4vf0yD+6Xi7haBm5k/dVy7g/uBzYc8JRwHGm02iNN4Exc/rTGbOt7lOL4TK+RQKe+HI2KjHpEZWq+tXLmozgcSi1Nr7VtQbre795/LF5EZxx9LMH6ve0x38a/H1PH0dR1sD/dzAkx3F3kBY=; 7:BdAMWBKRwdtdO0D0olni3/VpkI5Z3beTShf+bXizi0ltgSyf6kAklEByCQwvSkIs6uy1IzTZQh4cHdXvaD4fa/jGZ1KV94bzeeVw6vTnBZrGFJOu6z33eW+ZRS1yg5vDKBxMOqBNy/v11nQzT13geNF/3LpHSsEycIaWau8+pbIVFSJzrmexR3l4AyeBH/WjTiK1JQHpZx1cu+hlbTdIq/BaxZtEtzDWSmH1MyvtjRO6uuKW/KtFb4ugKwZpZKCs SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2018 17:36:35.4155 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 793010f7-6a7b-4a20-ed9d-08d5ecd50329 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4999 Subject: Re: [dpdk-dev] [PATCH] app/eventdev: use proper teardown sequence 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: Wed, 18 Jul 2018 17:36:39 -0000 -----Original Message----- > Date: Tue, 17 Jul 2018 20:03:07 +0530 > From: Pavan Nikhilesh > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com > Cc: dev@dpdk.org, Pavan Nikhilesh > Subject: [dpdk-dev] [PATCH] app/eventdev: use proper teardown sequence > X-Mailer: git-send-email 2.18.0 > > Use proper teardown sequence when SIGINT is caught to prevent > eventdev from going into undefined state. > > Signed-off-by: Pavan Nikhilesh > --- > app/test-eventdev/evt_main.c | 6 +++++- > app/test-eventdev/test_pipeline_common.c | 1 - > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c > index 57bb94570..bc25fb386 100644 > --- a/app/test-eventdev/evt_main.c > +++ b/app/test-eventdev/evt_main.c > @@ -25,8 +25,12 @@ signal_handler(int signum) > signum); > /* request all lcores to exit from the main loop */ > *(int *)test->test_priv = true; > - rte_wmb(); > > + if (test->ops.ethdev_destroy) > + test->ops.ethdev_destroy(test, &opt); I think, stopping the producer should be enough to have proper tear down sequence, as, When producer stops, the dequeue eventually will not have the events and it will exit properly. > + > + rte_event_dev_stop(opt.dev_id); > + rte_wmb(); > rte_eal_mp_wait_lcore(); > > if (test->ops.test_result) > diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c > index 719518ff3..70fd04517 100644 > --- a/app/test-eventdev/test_pipeline_common.c > +++ b/app/test-eventdev/test_pipeline_common.c > @@ -476,7 +476,6 @@ pipeline_eventdev_destroy(struct evt_test *test, struct evt_options *opt) > { > RTE_SET_USED(test); > > - rte_event_dev_stop(opt->dev_id); > rte_event_dev_close(opt->dev_id); > } > > -- > 2.18.0 >