From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0087.outbound.protection.outlook.com [104.47.41.87]) by dpdk.org (Postfix) with ESMTP id 849DB1C01 for ; Tue, 17 Jul 2018 16:33:28 +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=GG8t4GL/QlMkApThSCrAluVAhYCSTYqcVO5OOtmFOIA=; b=Hm3R4aFASxxpojvM9JQyCYqMNQrjnZ1tQPsLuhR5qCsXWr21GqhVzW1dkLtOGVObLRm66/xLpi4Qwe8dfMWzFuWuo2CDLzRuCF0fxDWyyfj831FWCuewC8bL7GqjsYernGaI7+RdMQADTM+GKbNz3RMjidCk8dNH4nTe+rtSLHU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn.caveonetworks.com (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (2603:10b6:405:64::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.18; Tue, 17 Jul 2018 14:33:23 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Tue, 17 Jul 2018 20:03:07 +0530 Message-Id: <20180717143307.5270-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BN6PR2001CA0029.namprd20.prod.outlook.com (2603:10b6:405:16::15) To BN6PR07MB3458.namprd07.prod.outlook.com (2603:10b6:405:64::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aea2d9bc-7af5-419e-6de4-08d5ebf2413f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(2017052603328)(7153060)(7193020); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:PJ2runjBugFuKJb70BgWDCF/RW/lmK+oQfaKKNRRdKjsMpnls9jjSeNsALTCu4o71hxq4qH6bF6y7Sp8S4wZ40wG4XXt5Rhh6T5W/8YHr+4QmZUJFA0/YNQPbB2SHYdNiw+/SEJvce3COj65YevMQxz7UMxkgd6oPLxw0rxhHcxOeOrYfIPiCAMp8bRy42SBFZzxsXRukBmBwugfVcgyrZIJLzlWAyHmcOWhVKn5hBlZ5dAO5lZuYRKUmMEJfJcf; 25:DMN/hxxa696dUpLOEOg9ZVvaK/gRBn+a+Ho1loisVxs3/e3T0AQeeCdf+tUCMYU19O9vE23jQ4ZGNQqGpQIIBto3ALsNixJSOmCBDWfJItuv4FwEII7RUtli+i3w0cPqeNiY5+Ak55YfEFSGClLx+KIvRGEbjy8ZArJ+M1Ji4kw1YG43cfhPteZpbVqw0f4Jl7aBua3h3J/HqQ2Z8IsqmC5EbgwxXYAMgvLdAl9gdPOUwi0TAe8tJzH8Cct2ID4m9AaCLK9CWoVX1PBgafled/L+5dn+EN3vX+uLLXWqqSK/9L07k0QZ4sAuuO3inZu/jJ+SPtF3US9Dk/6sZ8wGTA==; 31:vr4dLoTBHxFBi03zRgEMuRNhEujcXU7wFgTG5oa83vefb7HJcx8u0QNZNFftTKmn70/KO80+QTBX8dYpZbGCyjpkN0PhXq8mjAmc0W/uwArdPY5dThzkILzKaQtyI1KaPwzxtPyHNNACQIrsN0BVsUaFwduXVRXwcJa/OOF6IkTYhzo2XlBH6QtonBFNNRo8rzYkqRFENf6TAOqE4XyZspR27vl7YoyJOhWBclQirA0= X-MS-TrafficTypeDiagnostic: BN6PR07MB3458: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 20:RoIVw5SCSXQ84BFFphzPHXsQ8D6JdO3kSmm5ZlIW8e7YNVdGUEdy4Pk0+uI5yYuNfkCWcY0B5JlpPHq15FUmzzY+1Ue5pq9DtsE3bTYrhGDIxfSKH54IJ4I7MPv9WRli8oB11glVH4qH9edb1tD9RE/IG9VQudXxOVUTWfc6cuPkJwCBZegbuUmBAfl3HGRoXsO/kAPtUM4Xu45f72bhf9zW1THALoVqP76cXS/kJYpou11XAMpHqCymWB4TZAavbefZpqYC903JTW0LaTC1IN4wtl9Mag/j9UPTg2ky9qKKAGNQfM7LObAatATSHiJ5UJ7G+UIzQzyif8F7FPCQbnS5gMl6h+XYtCXU1Y/DlpJ/BKYqDvuVtUCa7WO6qWGq0akKHecWcrG/wjtQ3GOWQUEspmjrmsfYu1ceKvpyBeLb/8iOI0ld68/bukV/iJhTVdmnEKqZTUXAiz0FHYVNsyNVRO9cawgs09jACLRn3dF3ELbjgdgyZubaQCSW/mV0sNvTn4M7t7t0naclBEBF5/ZWJ8DGXkSl4h8Mj1b7M7UkJgbeNNOwvZ52j+6AfYV9G5milSmdXPFozb9W16/7zESwVo8LUF7+t4drHDnjklM=; 4:FkU1BXZioIL1awDV79CJQHLWidiqbcCtbh1tCPEQismFwExZKqrQQWJP/xANxz5WpSDqzstlrgXfv3sfbyUxHnBpIpVRgBVGY9UCWw5FsQ9uJp9Mwsc2yFEAaAgTyXefaaTdBr8WOg4AmTZB6Sbcf5em03xlEjj95hRUgD+pAHipehosvP1+oIirfBxPW/YkJFpwRzKNSNwO8jHuYpxhLgpI4L+05OebEOVSLb5EKZ93tr8bXxj/hlyrZRq5infZtg6309saDhjjeWRXE+oOpw== 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)(8121501046)(5005006)(93006095)(10201501046)(3002001)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3458; X-Forefront-PRVS: 073631BD3D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(396003)(136003)(39860400002)(346002)(199004)(189003)(1076002)(107886003)(5660300001)(51416003)(68736007)(50226002)(6116002)(36756003)(106356001)(305945005)(7736002)(85306007)(53416004)(5009440100003)(52116002)(53936002)(316002)(2906002)(6636002)(3846002)(105586002)(6666003)(16586007)(6512007)(478600001)(8936002)(486006)(14444005)(26005)(97736004)(50466002)(72206003)(69596002)(8676002)(48376002)(66066001)(6506007)(386003)(4326008)(25786009)(6486002)(81166006)(16526019)(956004)(42882007)(476003)(47776003)(2616005)(81156014)(1857600001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; H:ltp-pvn.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3458; 23:v87V5ClnlHrMQii626OcbEiQJCJY05jlEpiOnYHyk?= =?us-ascii?Q?VLuxk8lQw3A0cRVPwzMHZfrmnh6dpEVvN3ej9H/GL1tNGkwEZw4e/ZemV7qb?= =?us-ascii?Q?CwxfhxAAitjWx9T/tewl+w1Ofy3YQ94zo3A2/MMUgFpYiHHCfb+sZ4yW41sZ?= =?us-ascii?Q?Yb5swR2rhPWEhy7Oeliv301qSKMYD93iKZ7zmG8TdchwmmA/csvpdzly0Vvp?= =?us-ascii?Q?BQhjHbp+9CB1svgmceoXU/WOTehzHqx0VpDy8/dPk5aIVccFJHCHFxwgXwFt?= =?us-ascii?Q?5pQpF33ZA1Ccnv02uYLvm72Zj4A0UEfvx6pcB/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Fqesi6TyQnRFknlI2my5htgYin4LReBBaB1j/XI4ictKiyTok5TymDra?= =?us-ascii?Q?f+BFp/BSSoB4HK99vpYxEuV89vo02urYEudoL4zybM43X28ZasDirlM8DlC3?= =?us-ascii?Q?4omldnLZa2NEppVkSxQZXE=3D?= X-Microsoft-Antispam-Message-Info: SE9PhbuqTTSaKLfEt5ftYP9P1KF0F6qm85HMFuNCOXpFPi/VsLf/iTcGnQFa00iHIIo3F4V8mSUQcs+ImYfowpLhKruCmI3IsrqN1E717FYJuzXsNLoYVR/k+fwbbbbn8w0U95SoXUBOWh1dFjXjvdivL1kDc8xl0oooEIg6Zg0M/jnhcZu1AWgwmZ16cQN5nQN/su6mr+VL4+C94wICIE81UA7f+G53WLWINlJkQh9onJGbOPp/WkbWIlpGIhCBoMcIC352cf34DBpAu4o/gFyCzHnVmmHYjeLFvyUqFGi0rnCRP5bQ7OoCSyQeSTuMkeXBIQm+SzNtSNPvaA52slWPGtxf7LBOdJtHn57RVEo= X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 6:ikhruDX7G+yKsEXr9j594g54Jrcs1DVH8aqT7ozRswUSdx1LjzWrweWqXhsjmF2g0i6FlIqL6fyAWVCdufXv2fdK3OcfBBiAry5/g2O296N3/AYrIAJ9zoa/MS5aRcuz+KYbpub971Kzq1yTsrGARZVSyhCGxKpkkpecKyff4yhAWbFqegByLolCKMNAefzhLyPozF9j489aCLAxOUftn2QfgWeBA7WhE47TBRhTXd61Kwkfud1Qo5UG95pbPX4HL/BKrcqdsmz29gDcoQmTpRloG0Dm0Ut23lzNTF+tiJIoO/ZVX7FEwLnw9Js4yEnfkF0Cm1kdAC0/lbNxGbRb+VFIlSB1ZBNSnAtwAg19+Lnh3wW55BGZbobTUcxQVw6B4aUChWvXLWb0vkHfFBBMc5vXfbVzHUrhbIiqT/qLvZUfiD/JrlO3kot2yzI7CWEZ8DpS0g0Q9UlZrbA+byWZ6g==; 5:KoJAExPvxsSgvsBNYYI1LR0mxcSIrbEc6mruRJ1/h4zSDDvdK1ildbG0EVTykK2YpQvHjw8lFal/yQ82jw68vXWTVxkkhZF4ghYY88F4gHutXN8nfJIPV/MTpb0qrYmeh1y9ZSNtJgS5suxjUNd/xsL032++xJzMUb988AQqVWY=; 24:d1xWMXUGIc21DUpPNhrr39SYqpllPE5JYNB/3wtpKnT1TiP9QufArftQVvMlhqTUflAEiJ8BFfEjcxgWlO4ef5c68PPkPVf5fKT4D2cjWwE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 7:70NnTfkUaJFCM7fmCb+lbft6PM397sxi1Pc1eCp9FBQWhOakfT2ptcKTPmchBiV9uO2K74ZIk980Yd+Q00b0Qprui+CQmPvG9cRlGk82bXUETTYvu6eq+wcApUWdMgPy6FJHrL1wguKgpuXp0C9cGr694mLm0cx0GYndEKO8aVlc+uQMP9bcIgNYYt7zLmHZ6xwsd4WG0VIycEMtThyJZ/DSk7KJ4wlOGnkvojh8NGMHqBe9ojW0fM47wUrchr9L X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2018 14:33:23.7881 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aea2d9bc-7af5-419e-6de4-08d5ebf2413f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: [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: Tue, 17 Jul 2018 14:33:29 -0000 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); + + 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