DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pawel Wodkowski <pawelx.wodkowski@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 1/2] test: fix strict aliasing rule error in virtual pmd
Date: Fri, 27 Mar 2015 11:56:00 +0100	[thread overview]
Message-ID: <1427453761-20019-2-git-send-email-pawelx.wodkowski@intel.com> (raw)
In-Reply-To: <1427453761-20019-1-git-send-email-pawelx.wodkowski@intel.com>

Fix strict aliasing rule error seen in gcc 4.4

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
---
 app/test/virtual_pmd.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index 9b07ab1..f163562 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -75,15 +75,15 @@ virtual_ethdev_start_fail(struct rte_eth_dev *eth_dev __rte_unused)
 }
 static void  virtual_ethdev_stop(struct rte_eth_dev *eth_dev __rte_unused)
 {
-	struct rte_mbuf *pkt = NULL;
+	void *pkt = NULL;
 	struct virtual_ethdev_private *prv = eth_dev->data->dev_private;
 
 	eth_dev->data->dev_link.link_status = 0;
 	eth_dev->data->dev_started = 0;
-	while (rte_ring_dequeue(prv->rx_queue, (void **)&pkt) != -ENOENT)
+	while (rte_ring_dequeue(prv->rx_queue, &pkt) != -ENOENT)
 		rte_pktmbuf_free(pkt);
 
-	while (rte_ring_dequeue(prv->tx_queue, (void **)&pkt) != -ENOENT)
+	while (rte_ring_dequeue(prv->tx_queue, &pkt) != -ENOENT)
 		rte_pktmbuf_free(pkt);
 }
 
@@ -223,9 +223,9 @@ static void
 virtual_ethdev_stats_reset(struct rte_eth_dev *dev)
 {
 	struct virtual_ethdev_private *dev_private = dev->data->dev_private;
-	struct rte_mbuf *pkt = NULL;
+	void *pkt = NULL;
 
-	while (rte_ring_dequeue(dev_private->tx_queue, (void **)&pkt) == -ENOBUFS)
+	while (rte_ring_dequeue(dev_private->tx_queue, &pkt) == -ENOBUFS)
 			rte_pktmbuf_free(pkt);
 
 	/* Reset internal statistics */
-- 
1.9.1

  reply	other threads:[~2015-03-27 11:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 19:17 [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings Pablo de Lara
2015-03-27  8:41 ` Qiu, Michael
2015-03-27  8:57   ` De Lara Guarch, Pablo
2015-03-27  9:20 ` Thomas Monjalon
2015-03-27  9:29   ` De Lara Guarch, Pablo
2015-03-27 10:00     ` Thomas Monjalon
2015-03-27 10:11       ` De Lara Guarch, Pablo
2015-03-30 11:11         ` De Lara Guarch, Pablo
2015-03-27 10:55 ` [dpdk-dev] [PATCH v2 0/2] test: fix strict aliasing rule errors in gcc 4.4 Pawel Wodkowski
2015-03-27 10:56   ` Pawel Wodkowski [this message]
2015-03-27 15:47     ` [dpdk-dev] [PATCH v2 1/2] test: fix strict aliasing rule error in virtual pmd Stephen Hemminger
2015-03-27 10:56   ` [dpdk-dev] [PATCH v2 2/2] test: fix strict aliasing rule error in link bonding mode 4 test Pawel Wodkowski
2015-03-30 20:48   ` [dpdk-dev] [PATCH v2 0/2] test: fix strict aliasing rule errors in gcc 4.4 Thomas Monjalon
2015-03-27 15:46 ` [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings Stephen Hemminger
2015-03-27 15:48   ` De Lara Guarch, Pablo
2015-03-30 11:06 ` [dpdk-dev] [PATCH v2] DPDK does not build on gcc 4.4, as it complains due to strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, with no errors in next gcc versions: Pablo de Lara
2015-03-30 20:47   ` 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=1427453761-20019-2-git-send-email-pawelx.wodkowski@intel.com \
    --to=pawelx.wodkowski@intel.com \
    --cc=dev@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).