From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 0143A1B2AE for ; Fri, 21 Dec 2018 17:19:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2018 08:19:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,382,1539673200"; d="scan'208";a="304119505" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga006.fm.intel.com with ESMTP; 21 Dec 2018 08:19:51 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.26]) by IRSMSX102.ger.corp.intel.com ([169.254.2.29]) with mapi id 14.03.0415.000; Fri, 21 Dec 2018 16:15:54 +0000 From: "Dumitrescu, Cristian" To: Eelco Chaudron CC: "dev@dpdk.org" Thread-Topic: [PATCH v3 1/2] lib/librte_meter: add RFC4115 trTCM meter support Thread-Index: AQHUlufNf3K/DJxDp0eUkyZn9TDftKWJXx9Q Date: Fri, 21 Dec 2018 16:15:53 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E81857C@IRSMSX108.ger.corp.intel.com> References: <20181218153551.10961.2569.stgit@iMac> <20181218153842.10961.32000.stgit@iMac> In-Reply-To: <20181218153842.10961.32000.stgit@iMac> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGZmMWVjMWQtZmZmOC00NjE0LTliZDUtYzhlNzlmZmU4ZTcyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRXhudm9IYXY1d2FoR0tcL1l3cGRLcHhKY2Y2d3BKRFl5T3dEK0EyUlZWaVdtdzhvb0ltZXNhSVIwbGdodHh4V2QifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 1/2] lib/librte_meter: add RFC4115 trTCM meter support 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: Fri, 21 Dec 2018 16:19:56 -0000 SGkgRWVsY28sDQoNCjxzbmlwPg0KDQo+IA0KPiArLyoqIHRyVENNIHBhcmFtZXRlcnMgcGVyIG1l dGVyZWQgdHJhZmZpYyBmbG93LiBUaGUgQ0lSLCBFSVQsIENCUyBhbmQgRUJTDQoNClNtYWxsIHR5 cG8gaGVyZTogRUlUIHRvIGJlIHJlcGxhY2VkIGJ5IEVJUi4NCg0KPiArcGFyYW1ldGVycyBvbmx5 IGNvdW50IGJ5dGVzIG9mIElQIHBhY2tldHMgYW5kIGRvIG5vdCBpbmNsdWRlIGxpbmsgc3BlY2lm aWMNCj4gK2hlYWRlcnMuIFRoZSBDQlMgYW5kIEVCUyBuZWVkIHRvIGJlIGdyZWF0ZXIgdGhhbiB6 ZXJvIGlmIENJUiBhbmQgRUlSIGFyZQ0KPiArbm9uZS16ZXJvIHJlc3BlY3RpdmVseS4qLw0KPiAr c3RydWN0IHJ0ZV9tZXRlcl90cnRjbV9yZmM0MTE1X3BhcmFtcyB7DQo+ICsJd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