From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] net/virtio: fix build without virtio-user
Date: Tue, 17 Jan 2017 23:22:41 +0100 [thread overview]
Message-ID: <1484691761-1778-1-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <6199672.AS3ZBII79S@xps13>
When CONFIG_RTE_VIRTIO_USER is disabled (default on FreeBSD),
the virtio driver cannot be compiled:
librte_pmd_virtio.a(virtio_ethdev.o): In function `eth_virtio_dev_init':
(.text+0x1eba): undefined reference to `virtio_user_ops'
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
Already applied on mainline git when sending,
in order to allow CI on FreeBSD.
---
drivers/net/virtio/virtio_ethdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 0fe99d5..1d51942 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1461,9 +1461,12 @@ virtio_remap_pci(struct rte_pci_device *pci_dev, struct virtio_hw *hw)
static void
virtio_set_vtpci_ops(struct virtio_hw *hw)
{
+#ifdef RTE_VIRTIO_USER
if (hw->virtio_user_dev)
VTPCI_OPS(hw) = &virtio_user_ops;
- else if (hw->modern)
+ else
+#endif
+ if (hw->modern)
VTPCI_OPS(hw) = &modern_ops;
else
VTPCI_OPS(hw) = &legacy_ops;
--
2.7.0
next prev parent reply other threads:[~2017-01-17 22:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 14:39 [dpdk-dev] net/virtio: build is broken on FreeBSD Andrew Rybchenko
2017-01-17 22:09 ` Thomas Monjalon
2017-01-17 22:22 ` Thomas Monjalon [this message]
2017-01-18 2:42 ` [dpdk-dev] [PATCH] net/virtio: fix build without virtio-user Yuanhan Liu
2017-01-18 3:08 ` [dpdk-dev] net/virtio: build is broken on FreeBSD Tan, Jianfeng
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=1484691761-1778-1-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
--cc=yuanhan.liu@linux.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).