On 07/05/2018 09:15 AM, Tiwei Bie wrote:
On Wed, Jul 04, 2018 at 11:54:32PM +0200, Maxime Coquelin wrote: [...]+ +static __rte_always_inline void +flush_shadow_used_ring_packed(struct virtio_net *dev, + struct vhost_virtqueue *vq) +{[...]+} + +static __rte_always_inline void +update_shadow_used_ring_packed(struct vhost_virtqueue *vq, + uint16_t desc_idx, uint16_t len, uint16_t count) +{ + uint16_t i = vq->shadow_used_idx++; + + vq->shadow_used_packed[i].id = desc_idx; + vq->shadow_used_packed[i].len = len; + vq->shadow_used_packed[i].count = count; }I met below build errors in this patch when doing per-patch build test with clang: lib/librte_vhost/virtio_net.c:134:1: error: unused function 'flush_shadow_used_ring_packed' [-Werror,-Wunused-function] flush_shadow_used_ring_packed(struct virtio_net *dev, ^ lib/librte_vhost/virtio_net.c:188:1: error: unused function 'update_shadow_used_ring_packed' [-Werror,-Wunused-function] update_shadow_used_ring_packed(struct vhost_virtqueue *vq, ^ It's better to add __rte_unused in this patch, and remove it when functions are used. PS. I also saw similar errors with fill_vec_buf_packed() in patch 11/15.
Thanks for the report, I missed these build issues... This is not fixed using __rte_unused as you suggested. Maxime

