From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 522961BDFE for ; Thu, 5 Jul 2018 09:15:24 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jul 2018 00:15:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,311,1526367600"; d="scan'208";a="237971779" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.228]) by orsmga005.jf.intel.com with ESMTP; 05 Jul 2018 00:15:21 -0700 Date: Thu, 5 Jul 2018 15:15:08 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: zhihong.wang@intel.com, jfreimann@redhat.com, dev@dpdk.org, mst@redhat.com, jasowang@redhat.com, wexu@redhat.com Message-ID: <20180705071508.GA21112@debian> References: <20180704215438.5579-1-maxime.coquelin@redhat.com> <20180704215438.5579-10-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180704215438.5579-10-maxime.coquelin@redhat.com> User-Agent: Mutt/1.10.0 (2018-05-17) Subject: Re: [dpdk-dev] [PATCH v7 09/15] vhost: add shadow used ring support for packed rings 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: Thu, 05 Jul 2018 07:15:24 -0000 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.