qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object
@ 2017-09-07  8:42 Fam Zheng
  2017-09-07  9:37 ` Dr. David Alan Gilbert
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Fam Zheng @ 2017-09-07  8:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Dr. David Alan Gilbert, Juan Quintela, Peter Xu

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 configure               | 2 +-
 migration/Makefile.objs | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index fb7e34a901..470b8a085b 100755
--- a/configure
+++ b/configure
@@ -2818,7 +2818,6 @@ EOF
   rdma_libs="-lrdmacm -libverbs"
   if compile_prog "" "$rdma_libs" ; then
     rdma="yes"
-    libs_softmmu="$libs_softmmu $rdma_libs"
   else
     if test "$rdma" = "yes" ; then
         error_exit \
@@ -6035,6 +6034,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
 
 if test "$rdma" = "yes" ; then
   echo "CONFIG_RDMA=y" >> $config_host_mak
+  echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
 fi
 
 if test "$have_rtnetlink" = "yes" ; then
diff --git a/migration/Makefile.objs b/migration/Makefile.objs
index 1c7770da46..99e038024d 100644
--- a/migration/Makefile.objs
+++ b/migration/Makefile.objs
@@ -11,3 +11,4 @@ common-obj-$(CONFIG_RDMA) += rdma.o
 
 common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o
 
+rdma.o-libs := $(RDMA_LIBS)
-- 
2.13.5

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

* Re: [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object
  2017-09-07  8:42 [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object Fam Zheng
@ 2017-09-07  9:37 ` Dr. David Alan Gilbert
  2017-09-07 11:37   ` Fam Zheng
  2017-09-07  9:46 ` Peter Xu
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Dr. David Alan Gilbert @ 2017-09-07  9:37 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-devel, Juan Quintela, Peter Xu

* Fam Zheng (famz@redhat.com) wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>

OK, I've not actually got a preference as to whether it's
per-object or not - I don't really see any advantage.

But since it doesn't look like it'll break it;

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  configure               | 2 +-
>  migration/Makefile.objs | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index fb7e34a901..470b8a085b 100755
> --- a/configure
> +++ b/configure
> @@ -2818,7 +2818,6 @@ EOF
>    rdma_libs="-lrdmacm -libverbs"
>    if compile_prog "" "$rdma_libs" ; then
>      rdma="yes"
> -    libs_softmmu="$libs_softmmu $rdma_libs"
>    else
>      if test "$rdma" = "yes" ; then
>          error_exit \
> @@ -6035,6 +6034,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
>  
>  if test "$rdma" = "yes" ; then
>    echo "CONFIG_RDMA=y" >> $config_host_mak
> +  echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
>  fi
>  
>  if test "$have_rtnetlink" = "yes" ; then
> diff --git a/migration/Makefile.objs b/migration/Makefile.objs
> index 1c7770da46..99e038024d 100644
> --- a/migration/Makefile.objs
> +++ b/migration/Makefile.objs
> @@ -11,3 +11,4 @@ common-obj-$(CONFIG_RDMA) += rdma.o
>  
>  common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o
>  
> +rdma.o-libs := $(RDMA_LIBS)
> -- 
> 2.13.5
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

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

* Re: [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object
  2017-09-07  8:42 [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object Fam Zheng
  2017-09-07  9:37 ` Dr. David Alan Gilbert
@ 2017-09-07  9:46 ` Peter Xu
  2017-09-07 11:55 ` Juan Quintela
  2017-09-08  9:21 ` Fam Zheng
  3 siblings, 0 replies; 8+ messages in thread
From: Peter Xu @ 2017-09-07  9:46 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-devel, Dr. David Alan Gilbert, Juan Quintela

On Thu, Sep 07, 2017 at 04:42:30PM +0800, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

> ---
>  configure               | 2 +-
>  migration/Makefile.objs | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index fb7e34a901..470b8a085b 100755
> --- a/configure
> +++ b/configure
> @@ -2818,7 +2818,6 @@ EOF
>    rdma_libs="-lrdmacm -libverbs"
>    if compile_prog "" "$rdma_libs" ; then
>      rdma="yes"
> -    libs_softmmu="$libs_softmmu $rdma_libs"
>    else
>      if test "$rdma" = "yes" ; then
>          error_exit \
> @@ -6035,6 +6034,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
>  
>  if test "$rdma" = "yes" ; then
>    echo "CONFIG_RDMA=y" >> $config_host_mak
> +  echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
>  fi
>  
>  if test "$have_rtnetlink" = "yes" ; then
> diff --git a/migration/Makefile.objs b/migration/Makefile.objs
> index 1c7770da46..99e038024d 100644
> --- a/migration/Makefile.objs
> +++ b/migration/Makefile.objs
> @@ -11,3 +11,4 @@ common-obj-$(CONFIG_RDMA) += rdma.o
>  
>  common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o
>  
> +rdma.o-libs := $(RDMA_LIBS)
> -- 
> 2.13.5
> 

-- 
Peter Xu

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

* Re: [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object
  2017-09-07  9:37 ` Dr. David Alan Gilbert
@ 2017-09-07 11:37   ` Fam Zheng
  2017-09-07 11:54     ` Dr. David Alan Gilbert
  2017-09-07 12:12     ` Daniel P. Berrange
  0 siblings, 2 replies; 8+ messages in thread
From: Fam Zheng @ 2017-09-07 11:37 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: qemu-devel, Juan Quintela, Peter Xu

On Thu, 09/07 10:37, Dr. David Alan Gilbert wrote:
> * Fam Zheng (famz@redhat.com) wrote:
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> 
> OK, I've not actually got a preference as to whether it's
> per-object or not - I don't really see any advantage.

Thanks for the review.  You're right this probably doesn't make a difference
except for a bit more consistency, until we want to make rdma a module (as in
--enable-modules) like the ones in block layer. The -libs and -cflags variables
were initially added just for that.

While we are talking about it, is there any reason why that will not be a good
idea?  There are other libraries used by QEMU outside block layer that are
overdue to be converted to modules, like ui (gtk, sdl, etc.), rdma seems to be a
candidate too.

Fam

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

* Re: [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object
  2017-09-07 11:37   ` Fam Zheng
@ 2017-09-07 11:54     ` Dr. David Alan Gilbert
  2017-09-07 12:12     ` Daniel P. Berrange
  1 sibling, 0 replies; 8+ messages in thread
From: Dr. David Alan Gilbert @ 2017-09-07 11:54 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-devel, Juan Quintela, Peter Xu

* Fam Zheng (famz@redhat.com) wrote:
> On Thu, 09/07 10:37, Dr. David Alan Gilbert wrote:
> > * Fam Zheng (famz@redhat.com) wrote:
> > > Signed-off-by: Fam Zheng <famz@redhat.com>
> > 
> > OK, I've not actually got a preference as to whether it's
> > per-object or not - I don't really see any advantage.
> 
> Thanks for the review.  You're right this probably doesn't make a difference
> except for a bit more consistency, until we want to make rdma a module (as in
> --enable-modules) like the ones in block layer. The -libs and -cflags variables
> were initially added just for that.
> 
> While we are talking about it, is there any reason why that will not be a good
> idea?  There are other libraries used by QEMU outside block layer that are
> overdue to be converted to modules, like ui (gtk, sdl, etc.), rdma seems to be a
> candidate too.

I don't think we've ever tried to make the migration code modular;
it probably wouldn't be impossible to split it out - it's wired
into a few places but it should be doable.

Dave

> Fam
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

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

* Re: [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object
  2017-09-07  8:42 [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object Fam Zheng
  2017-09-07  9:37 ` Dr. David Alan Gilbert
  2017-09-07  9:46 ` Peter Xu
@ 2017-09-07 11:55 ` Juan Quintela
  2017-09-08  9:21 ` Fam Zheng
  3 siblings, 0 replies; 8+ messages in thread
From: Juan Quintela @ 2017-09-07 11:55 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-devel, Dr. David Alan Gilbert, Peter Xu

Fam Zheng <famz@redhat.com> wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>


> ---
>  configure               | 2 +-
>  migration/Makefile.objs | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index fb7e34a901..470b8a085b 100755
> --- a/configure
> +++ b/configure
> @@ -2818,7 +2818,6 @@ EOF
>    rdma_libs="-lrdmacm -libverbs"
>    if compile_prog "" "$rdma_libs" ; then
>      rdma="yes"
> -    libs_softmmu="$libs_softmmu $rdma_libs"
>    else
>      if test "$rdma" = "yes" ; then
>          error_exit \
> @@ -6035,6 +6034,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
>  
>  if test "$rdma" = "yes" ; then
>    echo "CONFIG_RDMA=y" >> $config_host_mak
> +  echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
>  fi
>  
>  if test "$have_rtnetlink" = "yes" ; then
> diff --git a/migration/Makefile.objs b/migration/Makefile.objs
> index 1c7770da46..99e038024d 100644
> --- a/migration/Makefile.objs
> +++ b/migration/Makefile.objs
> @@ -11,3 +11,4 @@ common-obj-$(CONFIG_RDMA) += rdma.o
>  
>  common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o
>  
> +rdma.o-libs := $(RDMA_LIBS)

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

* Re: [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object
  2017-09-07 11:37   ` Fam Zheng
  2017-09-07 11:54     ` Dr. David Alan Gilbert
@ 2017-09-07 12:12     ` Daniel P. Berrange
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel P. Berrange @ 2017-09-07 12:12 UTC (permalink / raw)
  To: Fam Zheng; +Cc: Dr. David Alan Gilbert, qemu-devel, Peter Xu, Juan Quintela

On Thu, Sep 07, 2017 at 07:37:42PM +0800, Fam Zheng wrote:
> On Thu, 09/07 10:37, Dr. David Alan Gilbert wrote:
> > * Fam Zheng (famz@redhat.com) wrote:
> > > Signed-off-by: Fam Zheng <famz@redhat.com>
> > 
> > OK, I've not actually got a preference as to whether it's
> > per-object or not - I don't really see any advantage.
> 
> Thanks for the review.  You're right this probably doesn't make a difference
> except for a bit more consistency, until we want to make rdma a module (as in
> --enable-modules) like the ones in block layer. The -libs and -cflags variables
> were initially added just for that.
> 
> While we are talking about it, is there any reason why that will not be a good
> idea?  There are other libraries used by QEMU outside block layer that are
> overdue to be converted to modules, like ui (gtk, sdl, etc.), rdma seems to be a
> candidate too.

Since we have per-module flags, it makes sense to use them whereever it is
reasonable todo so. The global flags should only be needed for things which
are truely globally used, which is (almost) only glib2.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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

* Re: [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object
  2017-09-07  8:42 [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object Fam Zheng
                   ` (2 preceding siblings ...)
  2017-09-07 11:55 ` Juan Quintela
@ 2017-09-08  9:21 ` Fam Zheng
  3 siblings, 0 replies; 8+ messages in thread
From: Fam Zheng @ 2017-09-08  9:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Dr. David Alan Gilbert, Peter Xu, Juan Quintela

On Thu, 09/07 16:42, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>

I will include this in a coming pull request. Thanks.

Fam

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

end of thread, other threads:[~2017-09-08  9:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07  8:42 [Qemu-devel] [PATCH] buildsys: Move rdma libs to per object Fam Zheng
2017-09-07  9:37 ` Dr. David Alan Gilbert
2017-09-07 11:37   ` Fam Zheng
2017-09-07 11:54     ` Dr. David Alan Gilbert
2017-09-07 12:12     ` Daniel P. Berrange
2017-09-07  9:46 ` Peter Xu
2017-09-07 11:55 ` Juan Quintela
2017-09-08  9:21 ` Fam Zheng

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).