DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Jingjing Wu <jingjing.wu@intel.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com,
	Bruce Richardson <bruce.richardson@intel.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH v3 2/2] net/avf: fix missing compiler error flags
Date: Tue, 18 Sep 2018 15:22:55 +0100	[thread overview]
Message-ID: <20180918142255.28119-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20180918142255.28119-1-bruce.richardson@intel.com>

The AVF driver was missing $(WERROR_FLAGS) in it's cflags, which means
that a number of compilation errors were getting missed. This patch adds
in the flag and fixes most of the errors, just disabling the
strict-aliasing ones.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")

CC: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/avf/Makefile           | 2 +-
 drivers/net/avf/avf_ethdev.c       | 2 +-
 drivers/net/avf/avf_rxtx.h         | 2 +-
 drivers/net/avf/avf_rxtx_vec_sse.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/avf/Makefile b/drivers/net/avf/Makefile
index 3f815bbc4..0a142c104 100644
--- a/drivers/net/avf/Makefile
+++ b/drivers/net/avf/Makefile
@@ -8,7 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 #
 LIB = librte_pmd_avf.a
 
-CFLAGS += -O3
+CFLAGS += -O3 $(WERROR_FLAGS) -Wno-strict-aliasing
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
 LDLIBS += -lrte_bus_pci
diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index 6b6ff7d55..549498477 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -559,7 +559,7 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 }
 
 static const uint32_t *
-avf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+avf_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 {
 	static const uint32_t ptypes[] = {
 		RTE_PTYPE_L2_ETHER,
diff --git a/drivers/net/avf/avf_rxtx.h b/drivers/net/avf/avf_rxtx.h
index 297d0776d..c4120f8a4 100644
--- a/drivers/net/avf/avf_rxtx.h
+++ b/drivers/net/avf/avf_rxtx.h
@@ -227,7 +227,7 @@ static inline
 void avf_dump_tx_descriptor(const struct avf_tx_queue *txq,
 			    const void *desc, uint16_t tx_id)
 {
-	char *name;
+	const char *name;
 	const struct avf_tx_desc *tx_desc = desc;
 	enum avf_tx_desc_dtype_value type;
 
diff --git a/drivers/net/avf/avf_rxtx_vec_sse.c b/drivers/net/avf/avf_rxtx_vec_sse.c
index 8275100f3..343a6aac3 100644
--- a/drivers/net/avf/avf_rxtx_vec_sse.c
+++ b/drivers/net/avf/avf_rxtx_vec_sse.c
@@ -621,7 +621,7 @@ avf_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 	return nb_pkts;
 }
 
-void __attribute__((cold))
+static void __attribute__((cold))
 avf_rx_queue_release_mbufs_sse(struct avf_rx_queue *rxq)
 {
 	_avf_rx_queue_release_mbufs_vec(rxq);
-- 
2.17.1

  reply	other threads:[~2018-09-18 14:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 14:44 [dpdk-dev] [PATCH] net/avf: remove unused variables and label Bruce Richardson
2018-09-13 16:26 ` Luca Boccassi
2018-09-17  7:23   ` Zhang, Qi Z
2018-09-17 14:53 ` Ferruh Yigit
2018-09-17 15:20   ` Bruce Richardson
2018-09-17 16:12     ` Ferruh Yigit
2018-09-17 16:24       ` Bruce Richardson
2018-09-18 13:17 ` [dpdk-dev] [PATCH v2 1/2] net/avf: fix " Bruce Richardson
2018-09-18 13:17   ` [dpdk-dev] [PATCH v2 2/2] net/avf: fix missing compiler error flags Bruce Richardson
2018-09-18 13:54     ` Ferruh Yigit
2018-09-18 13:51   ` [dpdk-dev] [PATCH v2 1/2] net/avf: fix unused variables and label Ferruh Yigit
2018-09-18 14:18     ` Bruce Richardson
2018-09-18 14:22   ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2018-09-18 14:22     ` Bruce Richardson [this message]
2018-09-19 10:04 ` [dpdk-dev] [PATCH v4 0/3] AVF build improvements Bruce Richardson
2018-09-19 10:04   ` [dpdk-dev] [PATCH v4 1/3] net/avf: fix unused variables and label Bruce Richardson
2018-09-19 10:04   ` [dpdk-dev] [PATCH v4 2/3] net/avf: fix missing compiler error flags Bruce Richardson
2018-09-19 10:04   ` [dpdk-dev] [PATCH v4 3/3] build: add meson files for AVF PMD Bruce Richardson
2018-09-21 14:43   ` [dpdk-dev] [PATCH v4 0/3] AVF build improvements Zhang, Qi Z

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=20180918142255.28119-2-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.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 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).