From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 119075697 for ; Thu, 7 May 2015 13:38:19 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 07 May 2015 04:38:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,384,1427785200"; d="scan'208,217";a="725251412" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by orsmga002.jf.intel.com with ESMTP; 07 May 2015 04:38:17 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.204]) by IRSMSX107.ger.corp.intel.com ([169.254.10.215]) with mapi id 14.03.0224.002; Thu, 7 May 2015 12:38:16 +0100 From: "Chilikin, Andrey" To: Vladimir Medvedkin Thread-Topic: [dpdk-dev] [PATCH v2] Add toeplitz hash algorithm used by RSS Thread-Index: AQHQhzav/ZJ9PSesFk6LhY3AS/Lmdp1thwyQgAK63oCAACA74A== Date: Thu, 7 May 2015 11:38:16 +0000 Message-ID: References: <1428519973-10550-1-git-send-email-medvedkinv@gmail.com> <1430832011-17764-1-git-send-email-medvedkinv@gmail.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2] Add toeplitz hash algorithm used by RSS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 11:38:21 -0000 SGkgVmxhZGltaXIsDQoNClllcywgYXQgdGhlIG1vbWVudCBOSUNzIHN1cHBvcnQ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DQo+ICsgKiAgIENhbGN1bGF0ZWQgaGFzaCB2YWx1ZS4NCj4gKyAq Lw0KPiArc3RhdGljIGlubGluZSB1aW50MzJfdA0KPiArcnRlX3NvZnRyc3NfYmUodW5pb24gcnRl X3RoYXNoX3R1cGxlICppbnB1dF90dXBsZSwgZW51bSBydGVfdGhhc2hfbGVuDQo+IGlucHV0X2xl biwNCj4gKyAgICAgICAgICAgICBjb25zdCB1aW50OF90ICpyc3Nfa2V5KQ0KPiArew0KPiArICAg ICB1aW50MzJfdCBpLCBqLCByZXQgPSAwOw0KPiArDQo+ICsgICAgIGZvciAoaiA9IDA7IGogPCBp bnB1dF9sZW47IGorKykgew0KPiArICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCAzMjsgaSsr KSB7DQo+ICsgICAgICAgICAgICAgICAgICAgICBpZiAoKCh1aW50MzJfdCAqKWlucHV0X3R1cGxl KVtqXSAmICgxIDw8ICgzMSAtIGkpKSkgew0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICByZXQgXj0gKChjb25zdCB1aW50MzJfdCAqKXJzc19rZXkpW2pdIDw8IGkgfA0KPiArICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1aW50MzJfdCkoKHVpbnQ2NF90KSgoKGNv bnN0IHVpbnQzMl90DQo+ICopcnNzX2tleSlbaiArIDFdKSA+PiAoMzIgLSBpKSk7DQo+ICsgICAg ICAgICAgICAgICAgICAgICB9DQo+ICsgICAgICAgICAgICAgfQ0KPiArICAgICB9DQo+ICsgICAg IHJldHVybiByZXQ7DQo+ICt9DQo+ICsNCj4gKyNpZmRlZiBfX2NwbHVzcGx1cw0KPiArfQ0KPiAr I2VuZGlmDQo+ICsNCj4gKyNlbmRpZiAvKiBfUlRFX1RIQVNIX0ggKi8NCj4gLS0NCj4gMS44LjMu Mg0KDQo=