* [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support
@ 2015-06-05 14:32 Pankaj Gupta
2015-06-08 6:06 ` Jason Wang
0 siblings, 1 reply; 5+ messages in thread
From: Pankaj Gupta @ 2015-06-05 14:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Pankaj Gupta, jasowang, aliguori, stefanha, mst
We use vhostforce to enable vhost even if Guests don't have MSI-X support
and we fall back to QEMU virtio-net. This patch will enable vhost unconditionally
whenever we have vhostforce='ON' or vhost='ON'.
Initially, I wanted to remove vhostforce completely as an additional argument.
But after discussing this in mailing list found that some programs are using vhostforce
and some vhost. So, we want to keep semantics of both the options.
Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
---
net/tap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/tap.c b/net/tap.c
index d1ca314..4618359 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -649,13 +649,13 @@ static void net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer,
}
}
- if (tap->has_vhost ? tap->vhost :
- vhostfdname || (tap->has_vhostforce && tap->vhostforce)) {
+ if ((tap->has_vhost ? tap->vhost :
+ vhostfdname) || tap->vhostforce) {
VhostNetOptions options;
options.backend_type = VHOST_BACKEND_TYPE_KERNEL;
options.net_backend = &s->nc;
- options.force = tap->has_vhostforce && tap->vhostforce;
+ options.force = true;
if (tap->has_vhostfd || tap->has_vhostfds) {
vhostfd = monitor_fd_param(cur_mon, vhostfdname, &err);
--
1.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support
2015-06-05 14:32 [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support Pankaj Gupta
@ 2015-06-08 6:06 ` Jason Wang
2015-06-11 11:49 ` Pankaj Gupta
0 siblings, 1 reply; 5+ messages in thread
From: Jason Wang @ 2015-06-08 6:06 UTC (permalink / raw)
To: Pankaj Gupta, qemu-devel; +Cc: aliguori, stefanha, mst
On 06/05/2015 10:32 PM, Pankaj Gupta wrote:
> We use vhostforce to enable vhost even if Guests don't have MSI-X support
> and we fall back to QEMU virtio-net. This patch will enable vhost unconditionally
> whenever we have vhostforce='ON' or vhost='ON'.
>
> Initially, I wanted to remove vhostforce completely as an additional argument.
> But after discussing this in mailing list found that some programs are using vhostforce
> and some vhost. So, we want to keep semantics of both the options.
>
> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> ---
> net/tap.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/tap.c b/net/tap.c
> index d1ca314..4618359 100644
> --- a/net/tap.c
> +++ b/net/tap.c
> @@ -649,13 +649,13 @@ static void net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer,
> }
> }
>
> - if (tap->has_vhost ? tap->vhost :
> - vhostfdname || (tap->has_vhostforce && tap->vhostforce)) {
> + if ((tap->has_vhost ? tap->vhost :
> + vhostfdname) || tap->vhostforce) {
> VhostNetOptions options;
>
> options.backend_type = VHOST_BACKEND_TYPE_KERNEL;
> options.net_backend = &s->nc;
> - options.force = tap->has_vhostforce && tap->vhostforce;
> + options.force = true;
>
> if (tap->has_vhostfd || tap->has_vhostfds) {
> vhostfd = monitor_fd_param(cur_mon, vhostfdname, &err);
In this case, I believe there's no need to have vhost_net_query() and
query_guest_notifiers() callbacks (and maybe more others).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support
2015-06-08 6:06 ` Jason Wang
@ 2015-06-11 11:49 ` Pankaj Gupta
2015-06-12 8:09 ` Jason Wang
0 siblings, 1 reply; 5+ messages in thread
From: Pankaj Gupta @ 2015-06-11 11:49 UTC (permalink / raw)
To: Jason Wang, mst; +Cc: qemu-devel, stefanha, aliguori
>
> On 06/05/2015 10:32 PM, Pankaj Gupta wrote:
> > We use vhostforce to enable vhost even if Guests don't have MSI-X
> > support
> > and we fall back to QEMU virtio-net. This patch will enable vhost
> > unconditionally
> > whenever we have vhostforce='ON' or vhost='ON'.
> >
> > Initially, I wanted to remove vhostforce completely as an additional
> > argument.
> > But after discussing this in mailing list found that some programs are
> > using vhostforce
> > and some vhost. So, we want to keep semantics of both the options.
> >
> > Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> > ---
> > net/tap.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/net/tap.c b/net/tap.c
> > index d1ca314..4618359 100644
> > --- a/net/tap.c
> > +++ b/net/tap.c
> > @@ -649,13 +649,13 @@ static void net_init_tap_one(const NetdevTapOptions
> > *tap, NetClientState *peer,
> > }
> > }
> >
> > - if (tap->has_vhost ? tap->vhost :
> > - vhostfdname || (tap->has_vhostforce && tap->vhostforce)) {
> > + if ((tap->has_vhost ? tap->vhost :
> > + vhostfdname) || tap->vhostforce) {
> > VhostNetOptions options;
> >
> > options.backend_type = VHOST_BACKEND_TYPE_KERNEL;
> > options.net_backend = &s->nc;
> > - options.force = tap->has_vhostforce && tap->vhostforce;
> > + options.force = true;
> >
> > if (tap->has_vhostfd || tap->has_vhostfds) {
> > vhostfd = monitor_fd_param(cur_mon, vhostfdname, &err);
>
> In this case, I believe there's no need to have vhost_net_query() and
> query_guest_notifiers() callbacks (and maybe more others).
I also thought on this. If same functions can be used by some other module in future?
If not, I was thinking to remove those in another patch.
Does the main functionality looks OK?
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support
2015-06-11 11:49 ` Pankaj Gupta
@ 2015-06-12 8:09 ` Jason Wang
2015-06-12 9:22 ` Pankaj Gupta
0 siblings, 1 reply; 5+ messages in thread
From: Jason Wang @ 2015-06-12 8:09 UTC (permalink / raw)
To: Pankaj Gupta, mst; +Cc: qemu-devel, stefanha, aliguori
On 06/11/2015 07:49 PM, Pankaj Gupta wrote:
>> On 06/05/2015 10:32 PM, Pankaj Gupta wrote:
>>> We use vhostforce to enable vhost even if Guests don't have MSI-X
>>> support
>>> and we fall back to QEMU virtio-net. This patch will enable vhost
>>> unconditionally
>>> whenever we have vhostforce='ON' or vhost='ON'.
>>>
>>> Initially, I wanted to remove vhostforce completely as an additional
>>> argument.
>>> But after discussing this in mailing list found that some programs are
>>> using vhostforce
>>> and some vhost. So, we want to keep semantics of both the options.
>>>
>>> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
>>> ---
>>> net/tap.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/net/tap.c b/net/tap.c
>>> index d1ca314..4618359 100644
>>> --- a/net/tap.c
>>> +++ b/net/tap.c
>>> @@ -649,13 +649,13 @@ static void net_init_tap_one(const NetdevTapOptions
>>> *tap, NetClientState *peer,
>>> }
>>> }
>>>
>>> - if (tap->has_vhost ? tap->vhost :
>>> - vhostfdname || (tap->has_vhostforce && tap->vhostforce)) {
>>> + if ((tap->has_vhost ? tap->vhost :
>>> + vhostfdname) || tap->vhostforce) {
The change here seems useless.
>>> VhostNetOptions options;
>>>
>>> options.backend_type = VHOST_BACKEND_TYPE_KERNEL;
>>> options.net_backend = &s->nc;
>>> - options.force = tap->has_vhostforce && tap->vhostforce;
>>> + options.force = true;
>>>
>>> if (tap->has_vhostfd || tap->has_vhostfds) {
>>> vhostfd = monitor_fd_param(cur_mon, vhostfdname, &err);
>> In this case, I believe there's no need to have vhost_net_query() and
>> query_guest_notifiers() callbacks (and maybe more others).
> I also thought on this. If same functions can be used by some other module in future?
> If not, I was thinking to remove those in another patch.
I could not think a usage of this in the future.
>
> Does the main functionality looks OK?
See comment above and I prefer to remove all unnecessary functions.
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support
2015-06-12 8:09 ` Jason Wang
@ 2015-06-12 9:22 ` Pankaj Gupta
0 siblings, 0 replies; 5+ messages in thread
From: Pankaj Gupta @ 2015-06-12 9:22 UTC (permalink / raw)
To: Jason Wang; +Cc: aliguori, qemu-devel, stefanha, mst
>
> On 06/11/2015 07:49 PM, Pankaj Gupta wrote:
> >> On 06/05/2015 10:32 PM, Pankaj Gupta wrote:
> >>> We use vhostforce to enable vhost even if Guests don't have MSI-X
> >>> support
> >>> and we fall back to QEMU virtio-net. This patch will enable vhost
> >>> unconditionally
> >>> whenever we have vhostforce='ON' or vhost='ON'.
> >>>
> >>> Initially, I wanted to remove vhostforce completely as an additional
> >>> argument.
> >>> But after discussing this in mailing list found that some programs are
> >>> using vhostforce
> >>> and some vhost. So, we want to keep semantics of both the options.
> >>>
> >>> Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
> >>> ---
> >>> net/tap.c | 6 +++---
> >>> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>>
> >>> diff --git a/net/tap.c b/net/tap.c
> >>> index d1ca314..4618359 100644
> >>> --- a/net/tap.c
> >>> +++ b/net/tap.c
> >>> @@ -649,13 +649,13 @@ static void net_init_tap_one(const NetdevTapOptions
> >>> *tap, NetClientState *peer,
> >>> }
> >>> }
> >>>
> >>> - if (tap->has_vhost ? tap->vhost :
> >>> - vhostfdname || (tap->has_vhostforce && tap->vhostforce)) {
> >>> + if ((tap->has_vhost ? tap->vhost :
> >>> + vhostfdname) || tap->vhostforce) {
>
> The change here seems useless.
>
> >>> VhostNetOptions options;
> >>>
> >>> options.backend_type = VHOST_BACKEND_TYPE_KERNEL;
> >>> options.net_backend = &s->nc;
> >>> - options.force = tap->has_vhostforce && tap->vhostforce;
> >>> + options.force = true;
> >>>
> >>> if (tap->has_vhostfd || tap->has_vhostfds) {
> >>> vhostfd = monitor_fd_param(cur_mon, vhostfdname, &err);
> >> In this case, I believe there's no need to have vhost_net_query() and
> >> query_guest_notifiers() callbacks (and maybe more others).
> > I also thought on this. If same functions can be used by some other module
> > in future?
> > If not, I was thinking to remove those in another patch.
>
> I could not think a usage of this in the future.
> >
> > Does the main functionality looks OK?
>
> See comment above and I prefer to remove all unnecessary functions.
o.k, will do the changes and post a new version.
>
> Thanks
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-12 9:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-05 14:32 [Qemu-devel] [PATCH v2] net:Enable vhost with vhostforce, vhost options for guests without MSI-X support Pankaj Gupta
2015-06-08 6:06 ` Jason Wang
2015-06-11 11:49 ` Pankaj Gupta
2015-06-12 8:09 ` Jason Wang
2015-06-12 9:22 ` Pankaj Gupta
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).