DPDK patches and discussions
 help / color / mirror / Atom feed
From: Timothy Redaelli <tredaelli@redhat.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, jin.yu@intel.com
Subject: [dpdk-dev] [PATCH 1/3] examples/vhost_blk: fix building with GCC 10
Date: Wed,  5 Feb 2020 14:47:03 +0100	[thread overview]
Message-ID: <e5806189663a5bec0c326bae9ab0ed7b8f2865df.1580910264.git.tredaelli@redhat.com> (raw)
In-Reply-To: <cover.1580910264.git.tredaelli@redhat.com>

GCC 10 defaults to -fno-common, this means a linker error will now be
reported if the same global variable is defined in more than one
compilation unit.

Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Cc: jin.yu@intel.com
Cc: stable@dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
---
 examples/vhost_blk/vhost_blk.c | 2 ++
 examples/vhost_blk/vhost_blk.h | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index e1036bf3a..143ae19f3 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -31,6 +31,8 @@
 			    (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \
 			    (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))
 
+struct vhost_blk_ctrlr *g_vhost_ctrlr;
+
 /* Path to folder where character device will be created. Can be set by user. */
 static char dev_pathname[PATH_MAX] = "";
 static sem_t exit_sem;
diff --git a/examples/vhost_blk/vhost_blk.h b/examples/vhost_blk/vhost_blk.h
index 933e2b7c5..17258d284 100644
--- a/examples/vhost_blk/vhost_blk.h
+++ b/examples/vhost_blk/vhost_blk.h
@@ -112,8 +112,8 @@ struct inflight_blk_task {
 	struct rte_vhost_inflight_info_packed *inflight_packed;
 };
 
-struct vhost_blk_ctrlr *g_vhost_ctrlr;
-struct vhost_device_ops vhost_blk_device_ops;
+extern struct vhost_blk_ctrlr *g_vhost_ctrlr;
+extern struct vhost_device_ops vhost_blk_device_ops;
 
 int vhost_bdev_process_blk_commands(struct vhost_block_dev *bdev,
 				     struct vhost_blk_task *task);
-- 
2.24.1


  reply	other threads:[~2020-02-05 13:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 13:47 [dpdk-dev] [PATCH 0/3] examples: " Timothy Redaelli
2020-02-05 13:47 ` Timothy Redaelli [this message]
2020-02-05 15:12   ` [dpdk-dev] [PATCH 1/3] examples/vhost_blk: " Maxime Coquelin
2020-02-05 14:12 ` [dpdk-dev] [PATCH v2 3/3] app/test-pipeline: " Timothy Redaelli
2020-02-05 14:21   ` Dumitrescu, Cristian
2020-02-05 17:05 ` [dpdk-dev] [PATCH 2/3] examples/eventdev_pipeline: " Timothy Redaelli
2020-02-05 17:05 ` [dpdk-dev] [PATCH 3/3] examples/qos_sched: " Timothy Redaelli
2020-03-04  9:37 ` [dpdk-dev] [PATCH 0/3] examples: " David Marchand
2020-03-04 10:17   ` David Marchand

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=e5806189663a5bec0c326bae9ab0ed7b8f2865df.1580910264.git.tredaelli@redhat.com \
    --to=tredaelli@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jin.yu@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).