Re: [PATCH v3 1/5] vhost: rewrite enqueue
From: Yuanhan Liu <hidden>
Date: 2016-08-25 03:50:44
From: Yuanhan Liu <hidden>
Date: 2016-08-25 03:50:44
On Mon, Aug 22, 2016 at 11:35:47AM +0200, Maxime Coquelin wrote:
quoted
- 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.quoted
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