From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Xie, Huawei" Subject: Re: [PATCH v4] Fixes following error on gcc 4.4.7: Date: Wed, 9 Dec 2015 14:12:52 +0000 Message-ID: References: <1449659374-78252-1-git-send-email-pablo.de.lara.guarch@intel.com> <1449663630-83289-1-git-send-email-pablo.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "De Lara Guarch, Pablo" , "dev@dpdk.org" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6B101590C for ; Wed, 9 Dec 2015 15:13:21 +0100 (CET) Content-Language: en-US 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 12/9/2015 10:01 PM, De Lara Guarch, Pablo wrote:=0A= >=0A= >> -----Original Message-----=0A= >> From: Xie, Huawei=0A= >> Sent: Wednesday, December 09, 2015 1:29 PM=0A= >> To: De Lara Guarch, Pablo; dev@dpdk.org=0A= >> Cc: yuanhan.liu@linux.intel.com=0A= >> Subject: Re: [PATCH v4] Fixes following error on gcc 4.4.7:=0A= >>=0A= >> On 12/9/2015 8:20 PM, De Lara Guarch, Pablo wrote:=0A= >>> make: Entering directory `/tmp/dpdk-tmp/examples/vhost'=0A= >>> CC main.o=0A= >> [...]=0A= >>> - rte_ring_sc_dequeue(vpool->ring, (void **)&mbuf);=0A= >>> + rte_ring_sc_dequeue(vpool->ring, (void *)mbuf);=0A= >> Here we are expecting the address of &mbuf, not mbuf, which is NULL.=0A= >>> if (unlikely(mbuf =3D=3D NULL)) {=0A= >>> LOG_DEBUG(VHOST_DATA,=0A= >>> "(%"PRIu64") in attach_rxmbuf_zcp: "=0A= >>> @@ -1801,7 +1801,7 @@ virtio_tx_route_zcp(struct virtio_net *dev,=0A= >> struct rte_mbuf *m,=0A= >>> /* Allocate an mbuf and populate the structure. */=0A= >>> vpool =3D &vpool_array[MAX_QUEUES + vmdq_rx_q];=0A= >>> - rte_ring_sc_dequeue(vpool->ring, (void **)&mbuf);=0A= >>> + rte_ring_sc_dequeue(vpool->ring, (void *)mbuf);=0A= >> Same as above.=0A= >>> if (unlikely(mbuf =3D=3D NULL)) {=0A= >>> struct vhost_virtqueue *vq =3D dev->virtqueue[VIRTIO_TXQ];=0A= >>> RTE_LOG(ERR, VHOST_DATA,=0A= > Right, I will revert to v3 (and fix the title as well, sorry about that).= =0A= Actually we could try defining mbufs[1], and use (void **)mbufs as=0A= parameter, like in examples/qos_sched to save a variable, but weird it=0A= failed. For the time being, this fix is OK.=0A= Another thing is would you fix examples/ip_pipeline as well?=0A= >=0A= =0A=