From patchwork Sun Oct 14 02:34:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 46791 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4CDF02C2F; Sun, 14 Oct 2018 04:39:18 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7C1882C28; Sun, 14 Oct 2018 04:39:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2018 19:39:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,379,1534834800"; d="scan'208";a="99210072" Received: from dpdk-s2600bmp.sh.intel.com ([10.67.110.173]) by orsmga001.jf.intel.com with ESMTP; 13 Oct 2018 19:39:14 -0700 From: Haiyue Wang To: dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com Cc: stable@dpdk.org, Haiyue Wang Date: Sun, 14 Oct 2018 10:34:05 +0800 Message-Id: <1539484445-209216-1-git-send-email-haiyue.wang@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH v1] net/avf: fix DEBUG_DUMP_DESC causing build issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Ferruh Yigit --- 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(