[Qemu-devel] [PATCH] ivshmem-server: ivshmem-clean: Install only when eventfd() is available

Kamil Rytarowski posted 1 patch 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170526054013.299-1-n54@gmx.com
Test checkpatch passed
Test docker passed
Test s390x passed
configure | 2 ++
1 file changed, 2 insertions(+)
[Qemu-devel] [PATCH] ivshmem-server: ivshmem-clean: Install only when eventfd() is available
Posted by Kamil Rytarowski 6 years, 10 months ago
Currently ivshmem requires eventfd() which is Linux specific.
Do not and build it unconditionally on every Linux/BSD/Solaris.

This patch indirectly fixes build failure on NetBSD, where these tools
additionally require -lrl for shm_open(3). In future there should be
added support for NetBSD and the linking addressed appropriately.

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index 1a5ee4b909..84d8660354 100755
--- a/configure
+++ b/configure
@@ -4928,6 +4928,8 @@ if test "$want_tools" = "yes" ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-nbd\$(EXESUF) $tools"
+  fi
+  if [ "$eventfd" != "no" ]; then
     tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
   fi
 fi
-- 
2.13.0


Re: [Qemu-devel] [PATCH] ivshmem-server: ivshmem-clean: Install only when eventfd() is available
Posted by Marc-André Lureau 6 years, 10 months ago
Hi

On Fri, May 26, 2017 at 9:49 AM Kamil Rytarowski <n54@gmx.com> wrote:

> Currently ivshmem requires eventfd() which is Linux specific.
> Do not and build it unconditionally on every Linux/BSD/Solaris.
>
>
I think it should be able to use pipe fallback from event_notifier_init() .


> This patch indirectly fixes build failure on NetBSD, where these tools
> additionally require -lrl for shm_open(3). In future there should be
> added support for NetBSD and the linking addressed appropriately.
>
> Signed-off-by: Kamil Rytarowski <n54@gmx.com>
>
---
>  configure | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/configure b/configure
> index 1a5ee4b909..84d8660354 100755
> --- a/configure
> +++ b/configure
> @@ -4928,6 +4928,8 @@ if test "$want_tools" = "yes" ; then
>    tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
>    if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
>      tools="qemu-nbd\$(EXESUF) $tools"
> +  fi
> +  if [ "$eventfd" != "no" ]; then
>      tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
>    fi
>  fi
> --
> 2.13.0
>
>
> --
Marc-André Lureau
[Qemu-devel] [PATCH] ivshmem-server: ivshmem-client: Build when eventfd() is available
Posted by Kamil Rytarowski 6 years, 10 months ago
Currently ivshmem requires eventfd() which is Linux specific.
Do not and build it unconditionally on every Linux/BSD/Solaris.

This patch indirectly fixes build failure on NetBSD, where these tools
additionally require -lrt for shm_open(3). In future there should be
added support for NetBSD and the linking addressed appropriately.

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
 configure                            | 2 ++
 contrib/ivshmem-client/Makefile.objs | 2 +-
 contrib/ivshmem-server/Makefile.objs | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 1a5ee4b909..483307be53 100755
--- a/configure
+++ b/configure
@@ -4928,6 +4928,8 @@ if test "$want_tools" = "yes" ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     tools="qemu-nbd\$(EXESUF) $tools"
+  fi
+  if [ "$eventfd" = "yes" ]; then
     tools="ivshmem-client\$(EXESUF) ivshmem-server\$(EXESUF) $tools"
   fi
 fi
diff --git a/contrib/ivshmem-client/Makefile.objs b/contrib/ivshmem-client/Makefile.objs
index bfab2d20dd..13d864082d 100644
--- a/contrib/ivshmem-client/Makefile.objs
+++ b/contrib/ivshmem-client/Makefile.objs
@@ -1 +1 @@
-ivshmem-client-obj-y = ivshmem-client.o main.o
+ivshmem-client-obj-$(CONFIG_IVSHMEM) = ivshmem-client.o main.o
diff --git a/contrib/ivshmem-server/Makefile.objs b/contrib/ivshmem-server/Makefile.objs
index c060dd3698..d9469fd777 100644
--- a/contrib/ivshmem-server/Makefile.objs
+++ b/contrib/ivshmem-server/Makefile.objs
@@ -1 +1 @@
-ivshmem-server-obj-y = ivshmem-server.o main.o
+ivshmem-server-obj-$(CONFIG_IVSHMEM) = ivshmem-server.o main.o
-- 
2.11.1


Re: [Qemu-devel] [PATCH] ivshmem-server: ivshmem-client: Build when eventfd() is available
Posted by Eric Blake 6 years, 10 months ago
On 05/30/2017 01:20 AM, Kamil Rytarowski wrote:
> Currently ivshmem requires eventfd() which is Linux specific.
> Do not and build it unconditionally on every Linux/BSD/Solaris.
> 
> This patch indirectly fixes build failure on NetBSD, where these tools
> additionally require -lrt for shm_open(3). In future there should be
> added support for NetBSD and the linking addressed appropriately.

Is this a v2 patch? If so, it's best to repost it as a new top-level
thread rather than buried in reply to your v1 patch.  Also, be sure to
include v2 in the subject line ('git send-email -v2' works wonders for
that).

> 
> Signed-off-by: Kamil Rytarowski <n54@gmx.com>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> ---

It also helps in a v2 submission to list here, after the --- separator,
how it differs from v1.

More submission hints at http://wiki.qemu.org/Contribute/SubmitAPatch

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] ivshmem-server: ivshmem-client: Build when eventfd() is available
Posted by Kamil Rytarowski 6 years, 10 months ago
On 30.05.2017 14:53, Eric Blake wrote:
> On 05/30/2017 01:20 AM, Kamil Rytarowski wrote:
>> Currently ivshmem requires eventfd() which is Linux specific.
>> Do not and build it unconditionally on every Linux/BSD/Solaris.
>>
>> This patch indirectly fixes build failure on NetBSD, where these tools
>> additionally require -lrt for shm_open(3). In future there should be
>> added support for NetBSD and the linking addressed appropriately.
> 
> Is this a v2 patch? If so, it's best to repost it as a new top-level
> thread rather than buried in reply to your v1 patch.  Also, be sure to
> include v2 in the subject line ('git send-email -v2' works wonders for
> that).
> 

I reworked it, fixed title and it's more like v3.

>>
>> Signed-off-by: Kamil Rytarowski <n54@gmx.com>
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>> ---
> 
> It also helps in a v2 submission to list here, after the --- separator,
> how it differs from v1.
> 
> More submission hints at http://wiki.qemu.org/Contribute/SubmitAPatch
> 

Do I still need to resend it?

Re: [Qemu-devel] [PATCH] ivshmem-server: ivshmem-client: Build when eventfd() is available
Posted by Eric Blake 6 years, 10 months ago
On 05/30/2017 08:11 AM, Kamil Rytarowski wrote:

>>
>> Is this a v2 patch? If so, it's best to repost it as a new top-level
>> thread rather than buried in reply to your v1 patch.  Also, be sure to
>> include v2 in the subject line ('git send-email -v2' works wonders for
>> that).
>>

> 
> I reworked it, fixed title and it's more like v3.
> 

> Do I still need to resend it?
> 

A human maintainer can often (eventually) figure out what's going on if
you don't, but resending is easier if you want to ensure the automated
patch tools don't lose things.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] ivshmem-server: ivshmem-client: Build when eventfd() is available
Posted by Markus Armbruster 6 years, 10 months ago
Eric Blake <eblake@redhat.com> writes:

> On 05/30/2017 08:11 AM, Kamil Rytarowski wrote:
>
>>>
>>> Is this a v2 patch? If so, it's best to repost it as a new top-level
>>> thread rather than buried in reply to your v1 patch.  Also, be sure to
>>> include v2 in the subject line ('git send-email -v2' works wonders for
>>> that).
>>>
>
>> 
>> I reworked it, fixed title and it's more like v3.
>> 
>
>> Do I still need to resend it?
>> 
>
> A human maintainer can often (eventually) figure out what's going on if
> you don't, but resending is easier if you want to ensure the automated
> patch tools don't lose things.

Yes.

However, ivshmem doesn't have a maintainer.  Since the patch is really
simple, the easiest path forward could be sending a v3 with
cc: qemu-trivial@nongnu.org.

Re: [Qemu-devel] [PATCH] ivshmem-server: ivshmem-client: Build when eventfd() is available
Posted by Kamil Rytarowski 6 years, 10 months ago
On 31.05.2017 13:11, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
> 
>> On 05/30/2017 08:11 AM, Kamil Rytarowski wrote:
>>
>>>>
>>>> Is this a v2 patch? If so, it's best to repost it as a new top-level
>>>> thread rather than buried in reply to your v1 patch.  Also, be sure to
>>>> include v2 in the subject line ('git send-email -v2' works wonders for
>>>> that).
>>>>
>>
>>>
>>> I reworked it, fixed title and it's more like v3.
>>>
>>
>>> Do I still need to resend it?
>>>
>>
>> A human maintainer can often (eventually) figure out what's going on if
>> you don't, but resending is easier if you want to ensure the automated
>> patch tools don't lose things.
> 
> Yes.
> 
> However, ivshmem doesn't have a maintainer.  Since the patch is really
> simple, the easiest path forward could be sending a v3 with
> cc: qemu-trivial@nongnu.org.
> 

OK, I will do this.

Re: [Qemu-devel] [PATCH] ivshmem-server: ivshmem-client: Build when eventfd() is available
Posted by Markus Armbruster 6 years, 10 months ago
Kamil Rytarowski <n54@gmx.com> writes:

> On 31.05.2017 13:11, Markus Armbruster wrote:
>> Eric Blake <eblake@redhat.com> writes:
>> 
>>> On 05/30/2017 08:11 AM, Kamil Rytarowski wrote:
>>>
>>>>>
>>>>> Is this a v2 patch? If so, it's best to repost it as a new top-level
>>>>> thread rather than buried in reply to your v1 patch.  Also, be sure to
>>>>> include v2 in the subject line ('git send-email -v2' works wonders for
>>>>> that).
>>>>>
>>>
>>>>
>>>> I reworked it, fixed title and it's more like v3.
>>>>
>>>
>>>> Do I still need to resend it?
>>>>
>>>
>>> A human maintainer can often (eventually) figure out what's going on if
>>> you don't, but resending is easier if you want to ensure the automated
>>> patch tools don't lose things.
>> 
>> Yes.
>> 
>> However, ivshmem doesn't have a maintainer.  Since the patch is really
>> simple, the easiest path forward could be sending a v3 with
>> cc: qemu-trivial@nongnu.org.
>> 
>
> OK, I will do this.

Thank you for your patience (and the patch, of course).