From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id AC4281BE39 for ; Thu, 5 Jul 2018 16:28:23 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11C6885627; Thu, 5 Jul 2018 14:28:23 +0000 (UTC) Received: from [10.36.112.37] (ovpn-112-37.ams2.redhat.com [10.36.112.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 882F92156889; Thu, 5 Jul 2018 14:28:21 +0000 (UTC) To: Tiwei Bie Cc: zhihong.wang@intel.com, jfreimann@redhat.com, dev@dpdk.org, mst@redhat.com, jasowang@redhat.com, wexu@redhat.com References: <20180704215438.5579-1-maxime.coquelin@redhat.com> <20180704215438.5579-10-maxime.coquelin@redhat.com> <20180705071508.GA21112@debian> <7b2e9f2f-cefd-c4d5-2995-28f3353e49b4@redhat.com> <20180705140351.GA28449@debian> From: Maxime Coquelin Message-ID: Date: Thu, 5 Jul 2018 16:28:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180705140351.GA28449@debian> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 05 Jul 2018 14:28:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 05 Jul 2018 14:28:23 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' 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 14:28:23 -0000 On 07/05/2018 04:03 PM, Tiwei Bie wrote: > On Thu, Jul 05, 2018 at 02:49:34PM +0200, Maxime Coquelin wrote: >> 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. >> Oops, I meant "This *now* fixed using __rte_unused" :) > > Why not? This can be fixed by something like this > on my machine: > > -static __rte_always_inline void > +static __rte_always_inline __rte_unused void > flush_shadow_used_ring_packed(struct virtio_net *dev, > struct vhost_virtqueue *vq) > { > > And __rte_unused can be removed in the patch that > above function is called. > > Best regards, > Tiwei Bie >