From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 767E82BD4 for ; Fri, 22 Apr 2016 21:49:32 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 22 Apr 2016 12:49:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,518,1455004800"; d="scan'208";a="960822684" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga002.jf.intel.com with ESMTP; 22 Apr 2016 12:49:30 -0700 Date: Fri, 22 Apr 2016 12:51:10 -0700 From: Yuanhan Liu To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20160422195110.GE7603@yliu-dev.sh.intel.com> References: <1461332640-24273-1-git-send-email-thomas.monjalon@6wind.com> <1461332640-24273-5-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1461332640-24273-5-git-send-email-thomas.monjalon@6wind.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 4/4] eal: add assert macro for debug 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: Fri, 22 Apr 2016 19:49:32 -0000 On Fri, Apr 22, 2016 at 03:44:00PM +0200, Thomas Monjalon wrote: > diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c > index 4ac0456..b7486cd 100644 > --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c > +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c > @@ -296,7 +296,7 @@ vmxnet3_unmap_pkt(uint16_t eop_idx, vmxnet3_tx_queue_t *txq) > struct rte_mbuf *mbuf; > > /* Release cmd_ring descriptor and free mbuf */ > - VMXNET3_ASSERT(txq->cmd_ring.base[eop_idx].txd.eop == 1); > + RTE_ASSERT(txq->cmd_ring.base[eop_idx].txd.eop == 1); > > mbuf = txq->cmd_ring.buf_info[eop_idx].m; > if (mbuf == NULL) > @@ -307,7 +307,7 @@ vmxnet3_unmap_pkt(uint16_t eop_idx, vmxnet3_tx_queue_t *txq) > > while (txq->cmd_ring.next2comp != eop_idx) { > /* no out-of-order completion */ > - VMXNET3_ASSERT(txq->cmd_ring.base[txq->cmd_ring.next2comp].txd.cq == 0); > + RTE_ASSERT(txq->cmd_ring.base[txq->cmd_ring.next2comp].txd.cq == 0); > vmxnet3_cmd_ring_adv_next2comp(&txq->cmd_ring); > completed++; > } > @@ -454,7 +454,7 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > if (tso) { > uint16_t mss = txm->tso_segsz; > > - VMXNET3_ASSERT(mss > 0); > + RTE_ASSERT(mss > 0); > > gdesc->txd.hlen = txm->l2_len + txm->l3_len + txm->l4_len; > gdesc->txd.om = VMXNET3_OM_TSO; > @@ -662,8 +662,8 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) > > PMD_RX_LOG(DEBUG, "rxd idx: %d ring idx: %d.", idx, ring_idx); > > - VMXNET3_ASSERT(rcd->len <= rxd->len); > - VMXNET3_ASSERT(rbi->m); > + RTE_ASSERT(rcd->len <= rxd->len); > + RTE_ASSERT(rbi->m); > Seems this piece of code introduces a build error: drivers/net/vmxnet3/vmxnet3_rxtx.c: In function ‘vmxnet3_recv_pkts’: drivers/net/vmxnet3/vmxnet3_rxtx.c:635:18: error: variable ‘rxd’ set but not used [-Werror=unused-but-set-variable] Vmxnet3_RxDesc *rxd; ^ cc1: all warnings being treated as errors make[6]: *** [vmxnet3_rxtx.o] Error 1 --yliu