From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0042.outbound.protection.outlook.com [104.47.34.42]) by dpdk.org (Postfix) with ESMTP id 9F8CF1B1FA for ; Thu, 11 Jan 2018 08:30:32 +0100 (CET) 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; bh=nsGlmDeUAQVuu/IG6wMEj3V/FeBy0t/DcZLH4i6DyRs=; b=Z3tjpfJwQydK5wLdXIfJoKfQXjPeCD6xcN0I8ic7uh13hFMmvVBvVf42j08dmNUbQHLBEhKghg4V8qkKP4e4hXCZn88p5feQ/CKYXss8BYC/ox3xaDl1yF4nAOSBZF5KCW7k2beNyunas5ZIGKmO5f+Lxoq/9irN2zx6pJSBRds= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.61.92.144) by BN3PR07MB2514.namprd07.prod.outlook.com (10.167.4.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Thu, 11 Jan 2018 07:30:26 +0000 Date: Thu, 11 Jan 2018 13:00:11 +0530 From: Jerin Jacob To: "Eads, Gage" Cc: "dev@dpdk.org" , "santosh.shukla@caviumnetworks.com" , Hemant Agrawal , "nipun.gupta@nxp.com" , "Van Haaren, Harry" , "Richardson, Bruce" Message-ID: <20180111073009.GA8336@jerin> References: <9184057F7FC11744A2107296B6B8EB1E369CE6E6@fmsmsx101.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E369CE6E6@fmsmsx101.amr.corp.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Originating-IP: [171.61.92.144] X-ClientProxiedBy: BM1PR01CA0073.INDPRD01.PROD.OUTLOOK.COM (10.174.208.141) To BN3PR07MB2514.namprd07.prod.outlook.com (10.167.4.139) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4b7c30b6-4994-4f61-66ac-08d558c530e9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020062)(4652020)(5600026)(4604075)(4534092)(4602075)(4627188)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:BN3PR07MB2514; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 3:dAM9ldzE1XtGljssB7q5JroMhW8Arfm68HTqciSqlq5ikRaCFAHPDua0QLbybe/QBs5Emj1IKtW/J0XGna5JEk+o6LI85Y5Jr1L4E216HE4yge14EuQgUZmEA6GWv75AraVAzZp+5WwTG00t/e2Txp3qsBiLJm7mhxaqekprSA4b5fYc9Nr2EV3T/Cfh4ZAN9/0fiA0hDW2qE/FgVp70TOqdTNSalHFjJBRgxa+fVLiIVSuFEPEA1C/Mf7kSZE10; 25:jye3NLCruOXqMtQGPUGwMGCUvgkyDqWnkupCAcbhWW3u524Fhc4+npuFOHd85TP6MwfedS22mNo/d/210xTNhDn/JTVg+dO8nINzkpkFOn64UsbTdvPGaUH21xknz0g8j8RNxsFQdW4ai+bDb9sk6JxlKVNo8Z0P6hTNnS6OVAzBiksMx5B0MJLMHwRUg2cIEDz1r5DSSeR5jOdlTsYVKkU4+krUwfDE4SXQ0znvd9pCPtcoJhbuef018RM/s8ti3kY1XnhG91K3a7JNmbrjc3PW0Q3zE/IsgCbTSIQswMUE6d/LU7GwAu2Qrw+o74gjiUlmEw34CiLOSbz768n1Bw==; 31:SGvU6RezUBVbU8Qvtfr1qm4e3yYHg6ButrEhSB3PnJRSWqrLqzXmIFBuw+jw7U4vRdqeTqfmJNufsQV8QBMwnKbaEOlMwGTT8YNNNW83SwEHvq1NZo0pDaGREW63VjEAOglwqcgn9WF2nH3rHW2M7HFgJmK1n4dhZUZFzSji8xt+7UhD4D9QwM3LAtwC7nw/31cjkSR8Tb3DgthuUxjeB2IHBRZB53jYg5ZvkKs0Htc= X-MS-TrafficTypeDiagnostic: BN3PR07MB2514: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 20:+O+PeKdB7PyzxN6/Gi8yz7IJVK0unJftzxTLQi/KQXAeTfZfcaUcvILL08DAQD1sFmcy6LWUg1kLguQZRct6Ea3yQn/fOIms93ryyOG6fhkdhdxoPJQRKeAnlUdgigUJTb+vymnWt59HO2p+jfhcutzfDU/XOxofMQdj+U6x+N3ey7m8En7yZcd4tVF93TUX1Bm4J0ZdsawsnuY16rYu1oMbCyh0FdMmxXNtl/g79ctIJUZwd9j3O1qrOyYG4glJkORRQKgiTdKg8GJFNyq2tIeKuJQMzV9HZApTkRUH4SARBwf0pMatZfOt9Kav+HaPSnqEpyzJnAzM2nU5dGEjVS7DX6jt7q1OSWPm73ILW69Gnu8c81CKCphUfaLOKv17GBA7glkg4jlZS0UhkmZrggaoih7VYwVcrB47nIirwohQ6EgjVuGznOWMItS2g165yAJf2HHZ4V8jzPX0gu5snT7VNCSXaVpLGlppnaYdaNiJElazUDjdKmDCegw/Tm4WssMOQKxqNg5UwK+YSuI6tNTNZR3xnBx9Ciidqiw9mxBSc3HOy0oYXW2Cdb63RvtHRHa6vJafbOIxHrKEKu897Ls6aWOmVYnfYzd5uILUfww= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501134)(93006095)(10201501046)(3002001)(6041268)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BN3PR07MB2514; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN3PR07MB2514; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2514; 4:VfwWC1d2c2XuXnGRf74V3tbfhNRgvVQPoDlW/hOwbRiqbpPZIgN9gF4nAM89qd1TKTitMhD4OpprfkWdbQXKVh7arxdnfTlBTNHF8i3PxyMzSC/qBrJq+YGhkI2W5NeoqFynxwBQ5JHfS2pMR/YV3D0QT23ZbppyvrNGY/ELGjgTojqOfTA6MFeeEuQhifyVOI4e8nVdbWPeD+1EAaypZ3S/ZoUQdnvYoA1ExM1rvqPaT6aWE8hiiLjB52lkrkG86Bm3MCRdb3JbwxzIIvt7vN2ySEk42Iz8eP2Q+d5GefpIpkadVw6QT6sIUD9bL5TeUF2XYfYeihEy7I7HLlxN4Pqd5OKOh7DC9/BeiP7kzv8= X-Forefront-PRVS: 0549E6FD50 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(396003)(39380400002)(376002)(39860400002)(189003)(199004)(13464003)(2906002)(6306002)(50466002)(16586007)(58126008)(54906003)(8656006)(316002)(81156014)(8936002)(81166006)(305945005)(16526018)(9686003)(105586002)(7736002)(8676002)(106356001)(2950100002)(55016002)(72206003)(478600001)(83506002)(25786009)(33656002)(3846002)(6116002)(97736004)(1076002)(23726003)(33896004)(42882006)(53376002)(76176011)(386003)(52116002)(3480700004)(4326008)(6246003)(47776003)(229853002)(6496006)(33716001)(53936002)(5660300001)(6666003)(59450400001)(68736007)(66066001)(6916009)(533714002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2514; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2514; 23:KOXiXn+AFYxDEUUTLNaxWa13133E6IMNC4MmyR5mI?= =?us-ascii?Q?ZkzVkk0bqtyCvwdgeTsR8btF4+tWNrA4LNPB2x4I1X8bEZ8xIcFBvyt8CzeK?= =?us-ascii?Q?gWPufi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9zS0joDwo=; 24:DD3FP2QvdH3KSR0PdbY/dppyGwsC0GInco4kzOEPJ8fVhm8+woDL70ptGIrCOoZCAHJdPrj9Uo6b87ckVYevKEu4LRQp3fCW73b5EYsQmb0=; 7:rp/gqdj82xH3VqqxjLVY8t8Il4BQ3gfJMUT+oWoClRGAi2jXwgv7RD8ho9z9kWAyhu1RrhP7ykz9084SvN1Wh1QFD+n8QFJeadwZ/9NpQiqOFSGUFRb51SSMpZSj3HhGxjI8zJs/EB4UqoVxwoNgrJ1fzNJppLLAGOiEnziAUcuCqXbqBmMb7214dubazrKRdVLQJ5hzivaP9zFsjLkz6qKBBQXRTfJRApUhQtoAK5Uy2BbHLN5ZRK4qAnKm8EwF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2018 07:30:26.6759 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b7c30b6-4994-4f61-66ac-08d558c530e9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2514 Subject: Re: [dpdk-dev] Documenting eventdev reconfiguration behavior 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: Thu, 11 Jan 2018 07:30:33 -0000 -----Original Message----- > Date: Tue, 9 Jan 2018 17:00:16 +0000 > From: "Eads, Gage" > To: "dev@dpdk.org" > CC: "jerin.jacob@caviumnetworks.com" , > "santosh.shukla@caviumnetworks.com" , > Hemant Agrawal , "nipun.gupta@nxp.com" > , "Van Haaren, Harry" , > "Richardson, Bruce" > Subject: Documenting eventdev reconfiguration behavior > > Hi folks, > > As mentioned in a previous thread*, the eventdev documentation is unclear on what the user can expect when a device is stopped, possibly re-configured, and restarted. The documentation states that: > > * If the application wants to change the configuration (i.e. call > * rte_event_dev_configure(), rte_event_queue_setup(), or > * rte_event_port_setup()), it must call rte_event_dev_stop() first to stop the > * device and then do the reconfiguration before calling rte_event_dev_start() > * again. The schedule, enqueue and dequeue functions should not be invoked > * when the device is stopped. > > And: > > /** > * Stop an event device. The device can be restarted with a call to > * rte_event_dev_start() > * > * @param dev_id > * Event device identifier. > */ > void > rte_event_dev_stop(uint8_t dev_id); > > Specifically, the documentation is unclear on whether events that are queued in the device when rte_event_dev_stop() is called will remain there after rte_event_dev_start()? And does this depend on whether rte_event_dev_configure() or rte_event_queue_setup() are called? (There are probably other aspects that need clarification, but this is a starting point.) > > Hopefully we can agree on a common behavior, or else perhaps capabilities flags are in order. I propose we take the (in my view) simplest approach, that eventdevs will not preserve events when a device is stopped and restarted. (Thus to avoid memory leaks, the application is responsible for flushing events out of the device before stopping it.) This is simple to support in the sw PMD, and I would expect this to be simpler for hardware devices as well. > > Thoughts? Currently in octeontx driver, we are flushing the events on stop(). I agree the application should be involved in flushing the events as the events are opaque. On the same time, if we application needs to flush the events, it will translate to 1) Some sort of sync up between fastpath and control path as stop() typically will be called on control path 2) Some HW may have separate operation for flush in addition to just call the dequeue() in loop Considering the above points, How about, # Registering a callback to eventdev, on stop(), driver will flush the events one by one, by invoking the application specific callback routine _and then_ call driver specific flush. Thoughts? > > Thanks, > Gage > > *http://dpdk.org/ml/archives/dev/2018-January/085777.html