[dpdk-dev] vhost: fix meson build issues

Message ID 1522915696-26727-1-git-send-email-tdu@semihalf.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Tomasz Duszynski April 5, 2018, 8:08 a.m. UTC
  This patch addresses following meson build issues:

1) Since rte_vdpa.h includes rte_pci.h it introduces pci
   dependency thus deps array should be updated accordingly.

2) Since vhost.h includes rte_vdpa.h vdpa.c should be added to
   the sources list. Otherwise we end up with linker errors
   caused by undefined references.

Fixes: 34b30b2e7e42 ("vhost: add apis for datapath configuration")
Cc: zhihong.wang@intel.com

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
---
 lib/librte_vhost/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
2.7.4
  

Comments

Bruce Richardson April 5, 2018, 10:29 a.m. UTC | #1
On Thu, Apr 05, 2018 at 10:08:16AM +0200, Tomasz Duszynski wrote:
> This patch addresses following meson build issues:
> 
> 1) Since rte_vdpa.h includes rte_pci.h it introduces pci
>    dependency thus deps array should be updated accordingly.
> 
> 2) Since vhost.h includes rte_vdpa.h vdpa.c should be added to
>    the sources list. Otherwise we end up with linker errors
>    caused by undefined references.
> 
> Fixes: 34b30b2e7e42 ("vhost: add apis for datapath configuration")
> Cc: zhihong.wang@intel.com
> 
> Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
> ---

Confirmed that meson build on dpdk-next-virtio tree is broken and that this
fixes it.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Maxime Coquelin April 5, 2018, 8:01 p.m. UTC | #2
On 04/05/2018 10:08 AM, Tomasz Duszynski wrote:
> This patch addresses following meson build issues:
> 
> 1) Since rte_vdpa.h includes rte_pci.h it introduces pci
>     dependency thus deps array should be updated accordingly.
> 
> 2) Since vhost.h includes rte_vdpa.h vdpa.c should be added to
>     the sources list. Otherwise we end up with linker errors
>     caused by undefined references.
> 
> Fixes: 34b30b2e7e42 ("vhost: add apis for datapath configuration")
> Cc: zhihong.wang@intel.com
> 
> Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
> ---
>   lib/librte_vhost/meson.build | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
  
Maxime Coquelin April 5, 2018, 8:03 p.m. UTC | #3
On 04/05/2018 10:08 AM, Tomasz Duszynski wrote:
> This patch addresses following meson build issues:
> 
> 1) Since rte_vdpa.h includes rte_pci.h it introduces pci
>     dependency thus deps array should be updated accordingly.
> 
> 2) Since vhost.h includes rte_vdpa.h vdpa.c should be added to
>     the sources list. Otherwise we end up with linker errors
>     caused by undefined references.
> 
> Fixes: 34b30b2e7e42 ("vhost: add apis for datapath configuration")
> Cc: zhihong.wang@intel.com
> 
> Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
> ---
>   lib/librte_vhost/meson.build | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Applied to dpdk-next-virtio/master.

Thanks,
Maxime
  
Ferruh Yigit April 11, 2018, 5:38 p.m. UTC | #4
On 4/5/2018 9:03 PM, Maxime Coquelin wrote:
> 
> 
> On 04/05/2018 10:08 AM, Tomasz Duszynski wrote:
>> This patch addresses following meson build issues:
>>
>> 1) Since rte_vdpa.h includes rte_pci.h it introduces pci
>>     dependency thus deps array should be updated accordingly.
>>
>> 2) Since vhost.h includes rte_vdpa.h vdpa.c should be added to
>>     the sources list. Otherwise we end up with linker errors
>>     caused by undefined references.
>>
>> Fixes: 34b30b2e7e42 ("vhost: add apis for datapath configuration")
>> Cc: zhihong.wang@intel.com
>>
>> Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
>> ---
>>   lib/librte_vhost/meson.build | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
> 
> Applied to dpdk-next-virtio/master.

Squashed into relevant commit in next-net, thanks.
  

Patch

diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
index 9e8c0e7..8d14877 100644
--- a/lib/librte_vhost/meson.build
+++ b/lib/librte_vhost/meson.build
@@ -10,6 +10,6 @@  endif
 version = 4
 allow_experimental_apis = true
 sources = files('fd_man.c', 'iotlb.c', 'socket.c', 'vhost.c', 'vhost_user.c',
-		'virtio_net.c')
+		'virtio_net.c', 'vdpa.c')
 headers = files('rte_vhost.h')
-deps += ['ethdev']
+deps += ['ethdev', 'pci']