DPDK patches and discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Subject: [dpdk-dev] [PATCH] net/mlx4: fix missing initializers for old GCCs
Date: Fri, 13 Oct 2017 11:31:05 +0200	[thread overview]
Message-ID: <1507887065-28332-1-git-send-email-adrien.mazarguil@6wind.com> (raw)

This patch works around compilation issues so far only seen on RHEL 7.2
using GCC 4.8.5:

 [...]/mlx4_rxq.c: In function `mlx4_rx_queue_setup':
 [...]/mlx4_rxq.c:473:3: error: missing initializer for field `ipackets' of
     `struct mlx4_rxq_stats' [-Werror=missing-field-initializers]

 [...]/mlx4_txq.c: In function `mlx4_tx_queue_setup':
 [...]/mlx4_txq.c:265:3: error: missing initializer for field `opackets' of
     `struct mlx4_txq_stats' [-Werror=missing-field-initializers]

Fixes: 79770826499b ("net/mlx4: drop live queue reconfiguration support")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx4/mlx4_rxq.c | 4 +++-
 drivers/net/mlx4/mlx4_txq.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c
index 7ce5b26..6fa48bc 100644
--- a/drivers/net/mlx4/mlx4_rxq.c
+++ b/drivers/net/mlx4/mlx4_rxq.c
@@ -469,7 +469,9 @@ mlx4_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 			 dev->data->dev_conf.rxmode.hw_ip_checksum),
 		.csum_l2tun = (priv->hw_csum_l2tun &&
 			       dev->data->dev_conf.rxmode.hw_ip_checksum),
-		.stats.idx = idx,
+		.stats = {
+			.idx = idx,
+		},
 		.socket = socket,
 	};
 	/* Enable scattered packets support for this queue if necessary. */
diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c
index 6d3dd78..a9c5bd2 100644
--- a/drivers/net/mlx4/mlx4_txq.c
+++ b/drivers/net/mlx4/mlx4_txq.c
@@ -261,7 +261,9 @@ mlx4_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	}
 	*txq = (struct txq){
 		.priv = priv,
-		.stats.idx = idx,
+		.stats = {
+			.idx = idx,
+		},
 		.socket = socket,
 		.elts_n = desc,
 		.elts = elts,
-- 
2.1.4

             reply	other threads:[~2017-10-13  9:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  9:31 Adrien Mazarguil [this message]
2017-10-13 10:31 ` 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=1507887065-28332-1-git-send-email-adrien.mazarguil@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=nelio.laranjeiro@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 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).