From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 09 Dec 2015 06:12:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,403,1444719600"; d="scan'208";a="868027779" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 09 Dec 2015 06:12:55 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 9 Dec 2015 06:12:54 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.138]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.193]) with mapi id 14.03.0248.002; Wed, 9 Dec 2015 22:12:52 +0800 From: "Xie, Huawei" To: "De Lara Guarch, Pablo" , "dev@dpdk.org" Thread-Topic: [PATCH v4] Fixes following error on gcc 4.4.7: Thread-Index: AdEyhYQkJqwW9beVQpmjjkGV/HFzhw== 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> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] Fixes following error on gcc 4.4.7: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2015 14:13:21 -0000 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=