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 9B3B81BAE4 for ; Fri, 22 Jun 2018 10:05:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jun 2018 01:05:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,256,1526367600"; d="scan'208";a="66293275" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 22 Jun 2018 01:05:44 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 22 Jun 2018 01:05:44 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 22 Jun 2018 01:05:44 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.51]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.87]) with mapi id 14.03.0319.002; Fri, 22 Jun 2018 16:05:41 +0800 From: "Liu, Yong" To: "Bie, Tiwei" CC: "maxime.coquelin@redhat.com" , "Wang, Zhihong" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 5/7] net/virtio: support IN_ORDER Rx and Tx Thread-Index: AQHT/scM1SDL9XfvX0ChLqJt9jibOqRoUHyAgAOxA1A= Date: Fri, 22 Jun 2018 08:05:41 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E630C831A@SHSMSX103.ccr.corp.intel.com> References: <20180608090724.20855-1-yong.liu@intel.com> <20180608090724.20855-6-yong.liu@intel.com> <20180620074119.GA4686@debian> In-Reply-To: <20180620074119.GA4686@debian> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODI2NGVjNTItZDE1OC00YmIyLThmZjMtOGVhMzE0MDhlZGRjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYWt5akIxUHk3Z2ZmUUs5ZUdqMWkyM2wxVmdSR1NRQXU2UXZZYXZBWnhRVVd6bDlcL1F2aDBSNmlubWhuU21JUDkifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 5/7] net/virtio: support IN_ORDER Rx and Tx 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, 22 Jun 2018 08:05:47 -0000 DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogZGV2IFttYWlsdG86ZGV2 LWJvdW5jZXNAZHBkay5vcmddIE9uIEJlaGFsZiBPZiBUaXdlaSBCaWUNCj4gU2VudDogV2VkbmVz ZGF5LCBKdW5lIDIwLCAyMDE4IDM6NDEgUE0NCj4gVG86IExpdSwgWW9uZyA8eW9uZy5saXVAaW50 ZWwuY29tPg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