From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id EE7F02A5B for ; Tue, 24 Jan 2017 01:43:07 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2017 16:43:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,276,1477983600"; d="scan'208,217";a="925859525" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 23 Jan 2017 16:43:02 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 23 Jan 2017 16:43:01 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Tue, 24 Jan 2017 08:42:59 +0800 From: "Lu, Wenzhuo" To: Billy McFall CC: "thomas.monjalon@6wind.com" , "dev@dpdk.org" Thread-Topic: [PATCH v3 2/3] net/e1000: e1000 igb support to free consumed buffers Thread-Index: AQHSczaBpBs0713TmEOqgKSsuKWfyqFD3LIggAG1rICAATyVsA== Date: Tue, 24 Jan 2017 00:42:59 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B55D593@shsmsx102.ccr.corp.intel.com> References: <20170120160109.1088-1-bmcfall@redhat.com> <20170120160109.1088-3-bmcfall@redhat.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B55CADD@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 2/3] net/e1000: e1000 igb support to free consumed buffers 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, 24 Jan 2017 00:43:09 -0000 SGkgQmlsbHksDQpUaGFua3MgZm9yIHlvdXIgZXhwbGFuYXRpb24uIEl0IG1ha2VzIGEgcGljdHVy ZSB0byBtZSDimLoNCg0KDQpCZXN0IHJlZ2FyZHMNCldlbnpodW8gTHUNCg0KRnJvbTogQmlsbHkg TWNGYWxsIFttYWlsdG86Ym1jZmFsbEByZWRoYXQuY29tXQ0KU2VudDogTW9uZGF5LCBKYW51YXJ5 IDIzLCAyMDE3IDk6NDkgUE0NClRvOiBMdSwgV2Vuemh1bw0KQ2M6IHRob21hcy5tb25qYWxvbkA2 d2luZC5jb207IGRldkBkcGRrLm9yZw0KU3ViamVjdDogUmU6IFtQQVRDSCB2MyAyLzNdIG5ldC9l MTAwMDogZTEwMDAgaWdiIHN1cHBvcnQgdG8gZnJlZSBjb25zdW1lZCBidWZmZXJzDQoNClRoZXJl IGFyZSB0d28gc2NlbmFyaW9zIHRoZSBBUFAgY2FsbHMgdGhpcyBBUEkgKHRoZXJlIG1heSBiZSBv dGhlcnMsIGJ1dCB0aGUgQVBJIHdhcyBkZXNpZ25lZCB3aXRoIHRoZXNlIHR3byBpbiBtaW5kKToN Cg0KMSkgQVBQIHJlY2VpdmVzIGEgcGFja2V0IHRoYXQgbmVlZHMgdG8gYmUgZmxvb2RlZC4gSW5z dGVhZCBvZiBtYWtpbmcgYSBjb3B5IG9mIHRoZSBwYWNrZXQgKHdoZXRoZXIgaXQgaXMgdGhlIHdo b2xlIHBhY2tldCwganVzdCB0aGUgaGVhZGVyIG9yIGEgY2xvbmUgYnVmZmVyIGlzIHVzZWQsIGFz IGRvbmUgdG9kYXkpLCB0aGUgQ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gICAgICAgICAgIHR4ciA9IHR4cS0+dHhfcmluZzsNCj4gKw0KPiArICAgICAgICAg ICAgIC8qDQo+ICsgICAgICAgICAgICAgICogdHhfdGFpbCBpcyB0aGUgbGFzdCBzZW50IHBhY2tl dCBvbiB0aGUgc3dfcmluZy4gR290byB0aGUgZW5kDQo+ICsgICAgICAgICAgICAgICogb2YgdGhh dCBwYWNrZXQgKHRoZSBsYXN0IHNlZ21lbnQgaW4gdGhlIHBhY2tldCBjaGFpbikgYW5kDQo+ICsg ICAgICAgICAgICAgICogdGhlbiB0aGUgbmV4dCBzZWdtZW50IHdpbGwgYmUgdGhlIHN0YXJ0IG9m IHRoZSBvbGRlc3QNCj4gc2VnbWVudA0KPiArICAgICAgICAgICAgICAqIGluIHRoZSBzd19yaW5n LiBUaGlzIGlzIHRoZSBmaXJzdCBwYWNrZXQgdGhhdCB3aWxsIGJlDQo+ICsgICAgICAgICAgICAg ICogYXR0ZW1wdGVkIHRvIGJlIGZyZWVkLg0KPiArICAgICAgICAgICAgICAqLw0KPiArDQo+ICsg ICAgICAgICAgICAgLyogR2V0IGxhc3Qgc2VnbWVudCBpbiBtb3N0IHJlY2VudGx5IGFkZGVkIHBh Y2tldC4gKi8NCj4gKyAgICAgICAgICAgICB0eF9maXJzdCA9IHN3X3JpbmdbdHhxLT50eF90YWls XS5sYXN0X2lkOw0KPiArDQo+ICsgICAgICAgICAgICAgLyogR2V0IHRoZSBuZXh0IHNlZ21lbnQs IHdoaWNoIGlzIHRoZSBvbGRlc3Qgc2VnbWVudCBpbiByaW5nLg0KPiAqLw0KPiArICAgICAgICAg ICAgIHR4X2ZpcnN0ID0gc3dfcmluZ1t0eF9maXJzdF0ubmV4dF9pZDsNCj4gKw0KPiArICAgICAg ICAgICAgIC8qIFNldCB0aGUgY3VycmVudCBpbmRleCB0byB0aGUgZmlyc3QuICovDQo+ICsgICAg ICAgICAgICAgdHhfaWQgPSB0eF9maXJzdDsNCj4gKw0KPiArICAgICAgICAgICAgIC8qDQo+ICsg ICAgICAgICAgICAgICogTG9vcCB0aHJvdWdoIGVhY2ggcGFja2V0LiBGb3IgZWFjaCBwYWNrZXQs IHZlcmlmeSB0aGF0IGFuDQo+ICsgICAgICAgICAgICAgICogbWJ1ZiBleGlzdHMgYW5kIHRoYXQg dGhlIGxhc3Qgc2VnbWVudCBpcyBmcmVlLiBJZiBzbywgZnJlZQ0KPiArICAgICAgICAgICAgICAq IGl0IGFuZCBtb3ZlIG9uLg0KPiArICAgICAgICAgICAgICAqLw0KPiArICAgICAgICAgICAgIHdo aWxlICgxKSB7DQo+ICsgICAgICAgICAgICAgICAgICAgICB0eF9sYXN0ID0gc3dfcmluZ1t0eF9p ZF0ubGFzdF9pZDsNCj4gKw0KPiArICAgICAgICAgICAgICAgICAgICAgaWYgKHN3X3JpbmdbdHhf bGFzdF0ubWJ1Zikgew0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHhyW3R4 X2xhc3RdLndiLnN0YXR1cyAmDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBFMTAwMF9UWERfU1RBVF9ERCkgew0KPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC8qDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICogSW5jcmVtZW50IHRoZSBudW1iZXIgb2YgcGFja2V0cw0KPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAqIGZyZWVkLg0KPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAqLw0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGNvdW50Kys7DQo+ICsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAvKiBHZXQgdGhlIHN0YXJ0IG9mIHRoZSBuZXh0IHBhY2tldC4gKi8NCj4gKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB0eF9uZXh0ID0gc3dfcmluZ1t0eF9sYXN0XS5uZXh0 X2lkOw0KPiArDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoNCj4g KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBMb29wIHRocm91Z2ggYWxs IHNlZ21lbnRzIGluIGENCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KiBwYWNrZXQuDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovDQo+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8gew0KPiArDQo+ICAgICAg IHJ0ZV9wa3RtYnVmX2ZyZWVfc2VnKHN3X3JpbmdbdHhfaWRdLm1idWYpOw0KPiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dfcmluZ1t0eF9pZF0ubWJ1ZiA9 IE5VTEw7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBz d19yaW5nW3R4X2lkXS5sYXN0X2lkID0gdHhfaWQ7DQo+ICsNCj4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIE1vdmUgdG8gbmV4dCBzZWdlbW50LiAqLw0K PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHhfaWQgPSBz d19yaW5nW3R4X2lkXS5uZXh0X2lkOw0KPiArDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgfSB3aGlsZSAodHhfaWQgIT0gdHhfbmV4dCk7DQo+ICsNCj4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodW5saWtlbHkoY291bnQgPT0gKGludClm cmVlX2NudCkpDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBicmVhazsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlDQo+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoNCj4gKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKiBtYnVmIHN0aWxsIGluIHVzZSwgbm90aGluZyBsZWZ0IHRv DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogZnJlZS4NCj4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8NCj4gKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCj4gKyAgICAgICAgICAgICAgICAgICAgIH0g ZWxzZSB7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qDQo+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAqIFRoZXJlIGFyZSBtdWx0aXBsZSByZWFzb25zIHRvIGJlIGhl cmU6DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIDEpIEFsbCB0aGUgcGFja2V0 cyBvbiB0aGUgcmluZyBoYXZlIGJlZW4NCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICogICAgZnJlZWQgLSB0eF9pZCBpcyBlcXVhbCB0byB0eF9maXJzdA0KPiArICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKiAgICBhbmQgc29tZSBwYWNrZXRzIGhhdmUgYmVlbiBmcmVlZC4N Cj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICAgLSBEb25lLCBleGl0DQo+ICsg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIDIpIEludGVyZmFjZXMgaGFzIG5vdCBzZW50 IGEgcmluZ3Mgd29ydGggb2YNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICAg cGFja2V0cyB5ZXQsIHNvIHRoZSBzZWdtZW50IGFmdGVyIHRhaWwgaXMNCj4gKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICogICAgc3RpbGwgZW1wdHkuIE9yIGEgcHJldmlvdXMgY2FsbCB0 byB0aGlzDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqICAgIGZ1bmN0aW9uIGZy ZWVkIHNvbWUgb2YgdGhlIHNlZ21lbnRzIGJ1dA0KPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKiAgICBub3QgYWxsIHNvIHRoZXJlIGlzIGEgaG9sZSBpbiB0aGUgbGlzdC4NCj4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICAgSG9wZWZ1bGx5IHRoaXMgaXMgYSByYXJl IGNhc2UuDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqICAgIC0gV2FsayB0aGUg bGlzdCBhbmQgZmluZCB0aGUgbmV4dCBtYnVmLiBJZg0KPiArICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKiAgICAgIHRoZXJlIGlzbid0IG9uZSwgdGhlbiBkb25lLg0KPiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKi8NCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg aWYgKGxpa2VseSgodHhfaWQgPT0gdHhfZmlyc3QpICYmIChjb3VudCAhPSAwKSkpDQo+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQo+ICsNCj4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgLyoNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICogV2FsayB0aGUgbGlzdCBhbmQgZmluZCB0aGUgbmV4dCBtYnVmLCBpZiBhbnkuDQo+ICsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAqLw0KPiArICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBkbyB7DQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogTW92 ZSB0byBuZXh0IHNlZ2VtbnQuICovDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdHhfaWQgPSBzd19yaW5nW3R4X2lkXS5uZXh0X2lkOw0KPiArDQo+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN3X3JpbmdbdHhfaWRdLm1idWYpDQo+ICsg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCj4gKw0K PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICh0eF9pZCAhPSB0eF9maXJz dCk7DQo+ICsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoNCj4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICogRGV0ZXJtaW5lIHdoeSBwcmV2aW91cyBsb29wIGJhaWxl ZC4gSWYNCj4gdGhlcmUNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogaXMgbm90 IGFuIG1idWYsIGRvbmUuDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLw0KPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3dfcmluZ1t0eF9pZF0ubWJ1ZiA9PSBO VUxMKQ0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KPiAr ICAgICAgICAgICAgICAgICAgICAgfQ0KPiArICAgICAgICAgICAgIH0NCj4gKyAgICAgfSBlbHNl DQo+ICsgICAgICAgICAgICAgY291bnQgPSAtRU5PREVWOw0KPiArDQo+ICsgICAgIHJldHVybiBj b3VudDsNCj4gK30NCj4gKw0KPiAraW50DQo+ICtldGhfaWdiX3R4X2RvbmVfY2xlYW51cCh2b2lk ICp0eHEsIHVpbnQzMl90IGZyZWVfY250KSB7DQo+ICsgICAgIHJldHVybiBpZ2JfdHhfZG9uZV9j bGVhbnVwKHR4cSwgZnJlZV9jbnQpOyB9DQo+ICsNCj4gIHN0YXRpYyB2b2lkDQo+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