From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0084.outbound.protection.outlook.com [104.47.36.84]) by dpdk.org (Postfix) with ESMTP id 9C27C4CA6; Mon, 4 Jun 2018 10:20:17 +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=EMW3DkhlgOHP+KT2Wa5c1kfttcLFyaFVW0jhKBada6M=; b=Ud+fY/D2RK8ShuhZAjYq1NYSyWs5/X4RAD+fIOnUfG8aJDOefiG0fKFm0p+QxF+8pER3mqbZFDFTGuPwIndWD9RNDjxA4GvGrliSQp5yYVGgbieuH7MfKEY4n0Cw607VomPtOvmpsBjy+wN2jYAsui/59L1UBrp5Qp+SRvbmvmU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by CY1PR07MB2521.namprd07.prod.outlook.com (2a01:111:e400:c636::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.15; Mon, 4 Jun 2018 08:20:13 +0000 Date: Mon, 4 Jun 2018 13:50:00 +0530 From: Jerin Jacob To: bugzilla@dpdk.org Cc: dev@dpdk.org, harry.van.haaren@intel.com, liang.j.ma@intel.com, hemant.agrawal@nxp.com, sunil.kori@nxp.com, nipun.gupta@nxp.com Message-ID: <20180604081959.GA20978@jerin> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0072.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::12) To CY1PR07MB2521.namprd07.prod.outlook.com (2a01:111:e400:c636::12) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:(109105607167333); BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CY1PR07MB2521; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 3:SEd7FBM+oG/myJaBbqM7aJG7YOF90vihIy0+C0ikC4V2QlqzJlZ0Yx87qVInjZP4Y2USsUXzeHkUBndPpaf6t4oP2hLZu51ZG6h/WnbY3dNQ55+nFEDppDoFn3cIH7wFejfKTvoSkNUxBaH3woTAuxwBFTFQzWW4pAaXOATAhoooMTqSy2JtFzm6LDtv6Owt0ApgeSbp+YNyBXrXQGPU4/qGwk/XgrhVK2Ko96kIY91wICBetKGS0azsJDc9rJL+Er8UlvLDXdimE/4SPb0jIJODZ3oDmdUccxTBC1a9OM0=; 25:/Lm8uKY/gjNaS3OVemFkOZr0UvPqhT4ep6pGONVOkmIL5CJ2UL3b5eCMmr/Ve8anfD+8slthHiZ1CloJ1QU4hJznkQjaAgr/tINq/lAFIAdi5m6+233Jn3uzUSOnsV0DNs4Va82wxgxywgVoyhrSCrfMVN9rMMSqG0IPaN7jOInIuk5sUMbeM3fGLO5umH5FQ5vhMuJt/XXRDJ3kvTiR8xtujtY8hBIlQc+sGvdilkNOJmBaHO3plt3YfyRZAoDxzc26/j28LnlLcjPChGs5h8yvpt277YEyLUzxPUxTXFthfHxVS+1tkA1Qxv+SKxc3aqd5vRPCCg0L8HI+C52t/Q==; 31:Gs9/AGY10xIb+nN/dBNYInO6ho5xj0kqIzW3+1+BJbiaP+wCb3fL3nmIINQQvY4XFvT/PArN3Ioq0StuBAytx8/YXOfXTUVr+VqqiBWADTKu/b/JrBfOM2SaT+IP32wXW3YTY0xS1m3x708F+f4IBEes99VnM/zbU9eM62WBAalzQPqzzTPKb4lKgUFMwnRXxQxpVsWJFTmthbkMtTzTFwtLRmjtAKFzOQOfAyVadHE= X-MS-TrafficTypeDiagnostic: CY1PR07MB2521: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 20:8Uy2rL2BqDfRdNzM+GVJXqIjqNSUqVMn3m5NZ8ymaLBY13j1JqRhUv1Jvmr7VmgYs0KqAYv6Ak4N8imsTQ9WpVfmSMEXT4JnLjOBZPTRjOeWONcnjwzATXVA4VfunZLC53J77DurGKVUysWVt+s92uClM6fs+cTrciTNXY11svCzTafdcXIiaDswHesdFacylOOe5XIAlkBmimkDHfZDWy6AxVAyZ+k/jBgNqguzp1knWDHeGtL0LOHUTHMF9RzWRuWh363AIvsm9Ma6YdZWpYxS28mgwtrmCvcNpbV16Tscd4hppmDX76h0FQZcixxtWhwsSehi1jIkgCzQ3hMusgwHRMiMOxq/Do+SC85uYHT7Yvk8+O1cJwylpiH7Lh6uaX9CRD3Bzjgkf0b3C7kKo0BxqRFrZXwEijke5moGECn1fuSKmyVih2F3xBaFonUgAUAfFhCpKR/ToXRH3C1Bqr+wmBzcZ6ZfGxZh4K5wLE6d+245mqVIfeuz6ov7o2bzQGSd/bYGiBYftNqrjnvSqojRVlgG27OZGfG+vEySgw2lK0YwQlue9G0/OJNKC3yHYxzmzJcNiuTBfu8jCiTF9qm1YmL2PDBKK6KhkJteTo0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(82608151540597)(109105607167333)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:CY1PR07MB2521; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2521; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 4:AET+oG+Ob+Tf2Rc5NPsNkPnCqAS+eMUKYyQQlOwI/WV1plYupvgIYAoprhEG6IHc4UhkM3Hq8MxKk106ixumTh+/mPzyEuq29UbV6t6ZCqTMcpCsafUhURYjGBymiQTwtzcidA8mSv58GW56d8q/jQGkbeUc2sTbAyqz9bEwVW4euD1tqzH2oCm497mLxaTPfK1J8QpuvGI4VO9ldYQPuXW6miYnnhg6HHx6Pol5bmirn47qLSYu96SfMj7BHW9jtAkqAEY3qW8hHXThODt0kj4KzbUlTQ0P7CODWt1hb5+Bcu4UTxeWOD6O1fA3gofb/Z33AZedbKgzCEKnOMSDluPEJOcDQyRLCYpVUrVLpCO/mHjuaFUaUVjZLW2yut41 X-Forefront-PRVS: 069373DFB6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(39850400004)(396003)(39380400002)(199004)(189003)(13464003)(44832011)(1076002)(6306002)(50466002)(6116002)(33656002)(446003)(72206003)(186003)(956004)(966005)(16526019)(6916009)(68736007)(5009440100003)(42882007)(5660300001)(6666003)(3846002)(25786009)(53936002)(9686003)(6246003)(23726003)(55016002)(2351001)(26005)(2361001)(105586002)(11346002)(478600001)(8676002)(81156014)(8656006)(53546011)(33716001)(386003)(7736002)(52116002)(76176011)(476003)(4326008)(81166006)(16586007)(6496006)(97736004)(33896004)(486006)(229853002)(8936002)(106356001)(2906002)(5890100001)(305945005)(47776003)(66066001)(58126008)(316002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2521; H:jerin; 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; CY1PR07MB2521; 23:athAyhol2qcDjGf8NG2YbeheyWrnOM05AgKUElLnO?= =?us-ascii?Q?BSvAbZOrOOdXAQw1ZihJk7MON5MrYAAOnCNMGZjdbyWFgmZd/t0fubWLeA9L?= =?us-ascii?Q?PJ6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QLgD2sOZhxTO6dmnZ4g6TKo8NGK0eJk+2jrhCZhrd+1h39l7xqWSKL6IgdrFoeVBk3aL717cfLIoQB2rr6e125MJB27bdc7d4ko5dBb2BN0tGmAMwdb79A2jF3Kafo2Nup/AWdiBkilGCHvuvhuBkYk2NDMmIQ8LOZp7suvnDWFOX5r4J5jo1T/jblmkwLCueYP1gPKZdtM/5OqzvHjWphBNIAJuCOykmxkLLtU1VYrTM98WQW590QuJvCattXGW/iDTdk5YPBcBu7Ix26Csk4H/SzNIrr6Nh5gwZyO4x3rN/5Mc+S7Pw==; 5:Ut1bEf2g1EIEVRIZQ7MMXDx5AhLI7Vq7lY3IPtZyz75sp3G1BuwCKQ5z786DGnmjnXOu1sQLg22jefeau2VBk7F48/3sZxGd7CWUiYXcm3puJifK4ELlpnx1gSzEwHi/BjkRRiap1fbAE9clJ/UO88KcVZURZ7LvAGSSYiokKDY=; 24:UuN6Aj/QTp3attT10agHu1WnWQbbkeSfqZFLhxSttUDo/0ukjCbgvFCKfVUYVp2upIHPBIEGCsQBf7doZtLOywhuWqNRNo7aICWvmK1yc5k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 7:U2xrCym3M0MbDGxXR7yYPFx1a7gcPbPLmnqnzN+oEG9OzlsCxPzHknNw5Zz0nf/MC1CPqFxw48IkpmsHLKCYypKsUH07d+lxjtALTQ7Lv3PjI/RSAkmP1LeLnjOLCEUDKV9izhY5zUqIBCaTf3RrOeniKP8OST5QS4QC8N4C7Zo5qDLzU7d7G4d/I+OmnRnl22V5C3revi60kfdyDhtDjLO5NABqPjqmPGBtmJ9xIAKGrSBDCqW5XL6PwFnIpXXM X-MS-Office365-Filtering-Correlation-Id: 3e474537-a111-4005-6422-08d5c9f400a7 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2018 08:20:13.7075 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3e474537-a111-4005-6422-08d5c9f400a7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2521 Subject: Re: [dpdk-dev] [Bug 60] rte_event_port_unlink() causes subsequent events to end up in wrong port 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: Mon, 04 Jun 2018 08:20:18 -0000 -----Original Message----- > Date: Mon, 4 Jun 2018 07:21:18 +0000 > From: bugzilla@dpdk.org > To: dev@dpdk.org > Subject: [dpdk-dev] [Bug 60] rte_event_port_unlink() causes subsequent > events to end up in wrong port > > https://dpdk.org/tracker/show_bug.cgi?id=60 > > Bug ID: 60 > Summary: rte_event_port_unlink() causes subsequent events to > end up in wrong port > Product: DPDK > Version: 17.11 > Hardware: x86 > OS: Linux > Status: CONFIRMED > Severity: major > Priority: Normal > Component: eventdev > Assignee: dev@dpdk.org > Reporter: matias.elo@nokia.com > Target Milestone: --- > > Created attachment 8 > --> https://dpdk.org/tracker/attachment.cgi?id=8&action=edit > Test application > > I'm seeing some unexpected(?) behavior when calling rte_event_port_unlink() > with the SW eventdev driver (DPDK 17.11.2/18.02.1, > RTE_EVENT_MAX_QUEUES_PER_DEV=255). After calling rte_event_port_unlink(), > the enqueued events may end up either back to the unlinked port or to port > zero. > > Scenario: > > - Run SW evendev on a service core > - Start eventdev with e.g. 16 ports. Each core will have a dedicated port. > - Create 1 atomic queue and link all active ports to it (some ports may not > be linked). > - Allocate some events and enqueue them to the created queue > - Next, each worker core does a number of scheduling rounds concurrently. > E.g. > > uint64_t rx_events = 0; > while(rx_events < SCHED_ROUNDS) { > num_deq = rte_event_dequeue_burst(dev_id, port_id, ev, 1, 0); > > if (num_deq) { > rx_events++; > rte_event_enqueue_burst(dev_id, port_id, ev, 1); > } > } > > - This works fine but problems occur when doing cleanup after the first > loop finishes on some core. > E.g. > > rte_event_port_unlink(dev_id, port_id, NULL, 0); > > while(1) { > num_deq = rte_event_dequeue_burst(dev_id, port_id, ev, 1, 0); > > if (num_deq == 0) > break; > > rte_event_enqueue_burst(dev_id, port_id, ev, 1); > } > > - The events enqueued in the cleanup loop will ramdomly end up either back to > the same port (which has already been unlinked) or to port zero, which is not > used (mapping rte_lcore_id to port_id). > > As far as I understand the eventdev API, an eventdev port shouldn't have to be > linked to the target queue for enqueue to work properly. That is a grey area in the spec. octeontx drivers works as the way you described. I am not sure about SW driver(CC: harry.van.haaren@intel.com), If there is no performance impact for none of the drivers and it is do able for all HW and SW implementation then can do that way(CC: all PMD maintainers) No related to this question, Are you planning to use rte_event_port_unlink() in fastpath? Does rte_event_stop() works for you, if it is in slow path.