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 32195A0562; Mon, 3 May 2021 17:19:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 828CD40150; Mon, 3 May 2021 17:19:22 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id BF7E84014E for ; Mon, 3 May 2021 17:19:21 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Date: Mon, 3 May 2021 17:19:18 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C6173F@smartserver.smartshare.dk> In-Reply-To: <20210430001531.GA2751@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [dpdk-dev] Questions about API with no parameter check Thread-Index: Adc9VfIVTs42O5HhSsiHpbwimaIBQgC1jxQw References: <6114bde2-423a-da82-ac4d-608141235e39@huawei.com> <1672555.D3d3fyF7jD@thomas> <39bb5d09-9e95-db2d-929f-b0b3e922d921@oss.nxp.com> <68bb19fb-2d1a-677d-05f2-e2029d5095a5@intel.com> <20210429161645.GB21799@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20210429214924.308a636b@sovereign> <20210430001531.GA2751@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> From: =?utf-8?B?TW9ydGVuIEJyw7hydXA=?= To: "Tyler Retzlaff" , "Dmitry Kozlyuk" Cc: "Ferruh Yigit" , , "Ajit Khaparde" , "Jerin Jacob" , "Ananyev, Konstantin" , "Thomas Monjalon" , "Andrew Rybchenko" , "Min Hu (Connor)" , , , , , "Richardson, Bruce" Subject: Re: [dpdk-dev] Questions about API with no parameter check 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 Sender: "dev" PiBGcm9tOiBkZXYgW21haWx0bzpkZXYtYm91bmNlc0BkcGRrLm9yZ10gT24gQmVoYWxmIE9mIFR5 bGVyIFJldHpsYWZmDQo+IFNlbnQ6IEZyaWRheSwgQXByaWwgMzAsIDIwMjEgMjoxNiBBTQ0KPiAN Cj4gT24gVGh1LCBBcHIgMjksIDIwMjEgYXQgMDk6NDk6MjRQTSArMDMwMCwgRG1pdHJ5IEtvemx5 dWsgd3JvdGU6DQo+ID4gMjAyMS0wNC0yOSAwOToxNiAoVVRDLTA3MDApLCBUeWxlciBSZXR6bGFm ZjoNCj4gPiA+IE9uIFdlZCwgQXByIDA3LCAyMDIxIGF0IDA1OjEwOjAwUE0gKzAxMDAsIEZlcnJ1 aCBZaWdpdCB3cm90ZToNCj4gPiA+ID4gT24gNC83LzIwMjEgNDoyNSBQTSwgSGVtYW50IEFncmF3 YWwgd3JvdGU6DQo+ID4gPiA+ID4+KzENCj4gPiA+ID4gPj5CdXQgYXJlIHdlIGdvaW5nIHRvIGNo ZWNrIGFsbCBwYXJhbWV0ZXJzPw0KPiA+ID4gPiA+DQo+ID4gPiA+ID4rMQ0KPiA+ID4gPiA+DQo+ ID4gPiA+ID5JdCBtYXkgYmUgYmV0dGVyIHRvIGxpbWl0IHRoZSBudW1iZXIgb2YgY2hlY2tzLg0K PiA+ID4gPiA+DQo+ID4gPiA+DQo+ID4gPiA+ICsxIHRvIHZlcmlmeSBpbnB1dCBmb3IgQVBJcy4N Cj4gPiA+ID4NCj4gPiA+ID4gV2h5IG5vdCBkbyBhbGwsIHdoYXQgaXMgdGhlIGRvd25zaWRlIG9m IGNoZWNraW5nIGFsbCBp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