DPDK patches and discussions
 help / color / mirror / Atom feed
From: Haiyue Wang <haiyue.wang@intel.com>
To: dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com
Cc: stable@dpdk.org, Haiyue Wang <haiyue.wang@intel.com>
Subject: [dpdk-dev] [PATCH v1] net/avf: fix DEBUG_DUMP_DESC causing build issue
Date: Sun, 14 Oct 2018 10:34:05 +0800	[thread overview]
Message-ID: <1539484445-209216-1-git-send-email-haiyue.wang@intel.com> (raw)

Add the missed 'volatile' keyword to avoid the warning for type
mismatch, which will be treated as compiler error if WERROR_FLAGS
is enabled.

Fixes: bfd38e4d708b ("net/avf: fix missing compiler error flags")

CC: stable@dpdk.org

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/avf/avf_rxtx.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/avf/avf_rxtx.h b/drivers/net/avf/avf_rxtx.h
index c4120f8..898d2f3 100644
--- a/drivers/net/avf/avf_rxtx.h
+++ b/drivers/net/avf/avf_rxtx.h
@@ -201,17 +201,17 @@ uint16_t avf_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 static inline
 void avf_dump_rx_descriptor(struct avf_rx_queue *rxq,
-			    const void *desc,
+			    const volatile void *desc,
 			    uint16_t rx_id)
 {
 #ifdef RTE_LIBRTE_AVF_16BYTE_RX_DESC
-	const union avf_16byte_rx_desc *rx_desc = desc;
+	const volatile union avf_16byte_rx_desc *rx_desc = desc;
 
 	printf("Queue %d Rx_desc %d: QW0: 0x%016"PRIx64" QW1: 0x%016"PRIx64"\n",
 	       rxq->queue_id, rx_id, rx_desc->read.pkt_addr,
 	       rx_desc->read.hdr_addr);
 #else
-	const union avf_32byte_rx_desc *rx_desc = desc;
+	const volatile union avf_32byte_rx_desc *rx_desc = desc;
 
 	printf("Queue %d Rx_desc %d: QW0: 0x%016"PRIx64" QW1: 0x%016"PRIx64
 	       " QW2: 0x%016"PRIx64" QW3: 0x%016"PRIx64"\n", rxq->queue_id,
@@ -225,10 +225,10 @@ void avf_dump_rx_descriptor(struct avf_rx_queue *rxq,
  */
 static inline
 void avf_dump_tx_descriptor(const struct avf_tx_queue *txq,
-			    const void *desc, uint16_t tx_id)
+			    const volatile void *desc, uint16_t tx_id)
 {
 	const char *name;
-	const struct avf_tx_desc *tx_desc = desc;
+	const volatile struct avf_tx_desc *tx_desc = desc;
 	enum avf_tx_desc_dtype_value type;
 
 	type = (enum avf_tx_desc_dtype_value)rte_le_to_cpu_64(
-- 
1.8.3.1

             reply	other threads:[~2018-10-14  2:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-14  2:34 Haiyue Wang [this message]
2018-10-15  9:47 ` Ferruh Yigit

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=1539484445-209216-1-git-send-email-haiyue.wang@intel.com \
    --to=haiyue.wang@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).