All of lore.kernel.org
 help / color / mirror / Atom feed
* net/virtio: build is broken on FreeBSD
@ 2017-01-17 14:39 Andrew Rybchenko
  2017-01-17 22:09 ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Rybchenko @ 2017-01-17 14:39 UTC (permalink / raw)
  To: dev@dpdk.org; +Cc: Huawei Xie, Yuanhan Liu

Hi,

dpdk-next-net build is broken for me on FreeBSD 10.3 and 11.0 regardless 
clang/gcc:

   CC test_cryptodev_blockcipher.o
   CC test_cryptodev_perf.o
   CC test_cryptodev.o
   CC test_kvargs.o
   LD test
/tmp/dpdk-next-net.x86_64-native-bsdapp-clang/lib/librte_pmd_virtio.a(virtio_ethdev.o): 
In function `virtio_init_device':
/tmp/dpdk-next-net/drivers/net/virtio/virtio_ethdev.c:(.text+0x217):
undefined reference to `virtio_user_driver'
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
gmake[4]: *** [/tmp/dpdk-next-net/mk/rte.app.mk:235: test] Error 1
gmake[3]: *** [/tmp/dpdk-next-net/mk/rte.subdir.mk:63: test] Error 2
gmake[2]: *** [/tmp/dpdk-next-net/mk/rte.sdkbuild.mk:80: app] Error 2
gmake[1]: *** [/tmp/dpdk-next-net/mk/rte.sdkroot.mk:127: all] Error 2
gmake: *** [Makefile:12: all] Error 2

Am I doing something wrong? Just default config for the target and gmake.

Andrew.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: net/virtio: build is broken on FreeBSD
  2017-01-17 14:39 net/virtio: build is broken on FreeBSD Andrew Rybchenko
@ 2017-01-17 22:09 ` Thomas Monjalon
  2017-01-17 22:22   ` [PATCH] net/virtio: fix build without virtio-user Thomas Monjalon
  2017-01-18  3:08   ` net/virtio: build is broken on FreeBSD Tan, Jianfeng
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-01-17 22:09 UTC (permalink / raw)
  To: Andrew Rybchenko, Yuanhan Liu, jianfeng.tan; +Cc: dev

2017-01-17 17:39, Andrew Rybchenko:
> dpdk-next-net build is broken for me on FreeBSD 10.3 and 11.0 regardless 
> clang/gcc:

Thanks for reporting.

It is due to the pull of next-virtio tree.
It is broken also on Linux when virtio-user is disabled.

Unfortunately the compilation test in CI failed to apply the patch:
	http://dpdk.org/dev/patchwork/patch/19352/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] net/virtio: fix build without virtio-user
  2017-01-17 22:09 ` Thomas Monjalon
@ 2017-01-17 22:22   ` Thomas Monjalon
  2017-01-18  2:42     ` Yuanhan Liu
  2017-01-18  3:08   ` net/virtio: build is broken on FreeBSD Tan, Jianfeng
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2017-01-17 22:22 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: dev

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net/virtio: fix build without virtio-user
  2017-01-17 22:22   ` [PATCH] net/virtio: fix build without virtio-user Thomas Monjalon
@ 2017-01-18  2:42     ` Yuanhan Liu
  0 siblings, 0 replies; 5+ messages in thread
From: Yuanhan Liu @ 2017-01-18  2:42 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Tue, Jan 17, 2017 at 11:22:41PM +0100, Thomas Monjalon wrote:
> 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'

Oops... and thanks!

	--yliu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: net/virtio: build is broken on FreeBSD
  2017-01-17 22:09 ` Thomas Monjalon
  2017-01-17 22:22   ` [PATCH] net/virtio: fix build without virtio-user Thomas Monjalon
@ 2017-01-18  3:08   ` Tan, Jianfeng
  1 sibling, 0 replies; 5+ messages in thread
From: Tan, Jianfeng @ 2017-01-18  3:08 UTC (permalink / raw)
  To: Thomas Monjalon, Andrew Rybchenko, Yuanhan Liu; +Cc: dev@dpdk.org


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, January 18, 2017 6:10 AM
> To: Andrew Rybchenko; Yuanhan Liu; Tan, Jianfeng
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] net/virtio: build is broken on FreeBSD
> 
> 2017-01-17 17:39, Andrew Rybchenko:
> > dpdk-next-net build is broken for me on FreeBSD 10.3 and 11.0 regardless
> > clang/gcc:
> 
> Thanks for reporting.
> 
> It is due to the pull of next-virtio tree.
> It is broken also on Linux when virtio-user is disabled.

Thank you Andrew for reporting! And I see Thomas's patch have fixed this problem. I tested latest code on Freebsd 10.2, it can be compiled now.

Thank you Thomas.

> 
> Unfortunately the compilation test in CI failed to apply the patch:
> 	http://dpdk.org/dev/patchwork/patch/19352/

Is this still a problem?

Thanks,
Jianfeng

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-18  3:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17 14:39 net/virtio: build is broken on FreeBSD Andrew Rybchenko
2017-01-17 22:09 ` Thomas Monjalon
2017-01-17 22:22   ` [PATCH] net/virtio: fix build without virtio-user Thomas Monjalon
2017-01-18  2:42     ` Yuanhan Liu
2017-01-18  3:08   ` net/virtio: build is broken on FreeBSD Tan, Jianfeng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.