From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9159B93C8 for ; Wed, 27 Jan 2016 03:46:43 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 26 Jan 2016 18:46:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,353,1449561600"; d="scan'208";a="641957445" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jan 2016 18:46:44 -0800 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 26 Jan 2016 18:46:42 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 26 Jan 2016 18:46:41 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.215]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.117]) with mapi id 14.03.0248.002; Wed, 27 Jan 2016 10:46:39 +0800 From: "Xie, Huawei" To: Yuanhan Liu , "dev@dpdk.org" Thread-Topic: [PATCH 4/5] vhost: do not use rte_memcpy for virtio_hdr copy Thread-Index: AdFYrPIunwVMxkBCQWGWJqaoNIdiPQ== Date: Wed, 27 Jan 2016 02:46:39 +0000 Message-ID: References: <1449122773-25510-1-git-send-email-yuanhan.liu@linux.intel.com> <1449122773-25510-5-git-send-email-yuanhan.liu@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Victor Kaplansky , "Michael S. Tsirkin" Subject: Re: [dpdk-dev] [PATCH 4/5] vhost: do not use rte_memcpy for virtio_hdr copy 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: Wed, 27 Jan 2016 02:46:44 -0000 On 12/3/2015 2:03 PM, Yuanhan Liu wrote:=0A= > + if (vq->vhost_hlen =3D=3D sizeof(struct virtio_net_hdr_mrg_rxbuf)) {=0A= > + *(struct virtio_net_hdr_mrg_rxbuf *)(uintptr_t)desc_addr =3D hdr;=0A= > + } else {=0A= > + *(struct virtio_net_hdr *)(uintptr_t)desc_addr =3D hdr.hdr;=0A= > + }=0A= =0A= Thanks!=0A= We might simplify this further. Just reset the first two fields flags=0A= and gso_type.=0A=