From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH 4/4] eal: add assert macro for debug
Date: Fri, 22 Apr 2016 12:51:10 -0700 [thread overview]
Message-ID: <20160422195110.GE7603@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <1461332640-24273-5-git-send-email-thomas.monjalon@6wind.com>
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
next prev parent reply other threads:[~2016-04-22 19:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 13:43 [PATCH 0/4] cleanup debug and dead code Thomas Monjalon
2016-04-22 13:43 ` [PATCH 1/4] eal: increase log level of some messages Thomas Monjalon
2016-04-22 13:43 ` [PATCH 2/4] log: increase default level to info Thomas Monjalon
2016-04-22 13:43 ` [PATCH 3/4] examples: remove useless debug flags Thomas Monjalon
2016-04-28 20:15 ` Yuanhan Liu
2016-04-22 13:44 ` [PATCH 4/4] eal: add assert macro for debug Thomas Monjalon
2016-04-22 19:51 ` Yuanhan Liu [this message]
2016-04-22 21:14 ` Thomas Monjalon
2016-04-22 22:08 ` Yuanhan Liu
2016-04-22 22:42 ` Stephen Hemminger
2016-04-29 9:04 ` Thomas Monjalon
2016-05-02 13:37 ` [PATCH 0/4] cleanup debug and dead code Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160422195110.GE7603@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.