From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v3 1/5] vhost: rewrite enqueue Date: Thu, 25 Aug 2016 12:00:45 +0800 Message-ID: <20160825040045.GX30752@yliu-dev.sh.intel.com> References: <1471585430-125925-1-git-send-email-zhihong.wang@intel.com> <1471585430-125925-2-git-send-email-zhihong.wang@intel.com> <11aee27f-3604-7706-ca6f-fcee77aa09cb@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Zhihong Wang , dev@dpdk.org To: Maxime Coquelin Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8041C2BD5 for ; Thu, 25 Aug 2016 05:50:44 +0200 (CEST) Content-Disposition: inline In-Reply-To: <11aee27f-3604-7706-ca6f-fcee77aa09cb@redhat.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Aug 22, 2016 at 11:35:47AM +0200, Maxime Coquelin wrote: > >- virtio_enqueue_offload(m, &virtio_hdr.hdr); > >- copy_virtio_net_hdr(dev, desc_addr, virtio_hdr); > >+ /* handle virtio header */ > >+ virtio_hdr = (struct virtio_net_hdr_mrg_rxbuf *)(uintptr_t)desc_addr; > >+ virtio_enqueue_offload(mbuf, &(virtio_hdr->hdr)); > Parenthesis around virtio_hdr->hdr shouldn't be needed. > > vhost_log_write(dev, desc->addr, dev->vhost_hlen); > >- PRINT_PACKET(dev, (uintptr_t)desc_addr, dev->vhost_hlen, 0); > Looks like you remove the PRINT_PACKET calls. > Does it impact performance? Yes, it does. But it's only enabled for debug mode. Besides that, it's just a NOOP. > In any case, it should be mentionned in the commit message. Agreed. But for this case, we should not remove it: it breaks the debug-ability. --yliu