From: Tiwei Bie <tiwei.bie@intel.com>
To: "Legacy, Allain" <Allain.Legacy@windriver.com>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
"zhihong.wang@intel.com" <zhihong.wang@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Peters, Matt" <Matt.Peters@windriver.com>,
"Zhang, Qing Long (Eric)" <Eric.Zhang@windriver.com>
Subject: Re: [dpdk-dev] [PATCH] net/virtio-user: check negotiated features before set
Date: Thu, 16 Aug 2018 13:38:06 +0800 [thread overview]
Message-ID: <20180816053806.GB8252@debian> (raw)
In-Reply-To: <70A7408C6E1BFB41B192A929744D8523BAB91B23@ALA-MBD.corp.ad.wrs.com>
On Wed, Aug 15, 2018 at 12:28:05PM +0000, Legacy, Allain wrote:
> > -----Original Message-----
> > From: Tiwei Bie [mailto:tiwei.bie@intel.com]
> > Sent: Tuesday, August 14, 2018 11:40 PM
> > To: Legacy, Allain
> > Cc: maxime.coquelin@redhat.com; zhihong.wang@intel.com;
> > dev@dpdk.org; Peters, Matt; Zhang, Qing Long (Eric)
> > Subject: Re: [PATCH] net/virtio-user: check negotiated features before set
> >
> > On Thu, Aug 09, 2018 at 01:34:55PM -0500, Allain Legacy wrote:
> > > From: eric zhang <eric.zhang@windriver.com>
> > >
> > > This patch checks negotiated features to see if necessary to offload
> > > before set the tap device offload capabilities. It also checks if
> > > kernel support the TUNSETOFFLOAD operation.
> > >
> > > Signed-off-by: eric zhang <eric.zhang@windriver.com>
> > > Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
> > > ---
> > > drivers/net/virtio/virtio_user/vhost_kernel.c | 2 +-
> > > drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 56
> > > +++++++++++++++++------
> > > drivers/net/virtio/virtio_user/vhost_kernel_tap.h | 2 +-
> > > 3 files changed, 44 insertions(+), 16 deletions(-)
> > >
> <...>
> >
> > I'm not quite sure whether it's a good idea to return failure when failed to set
> > offloads to tap. And QEMU also doesn't do this:
> >
> > https://github.com/qemu/qemu/blob/6ad90805383e/net/tap-linux.c#L261
>
> Regardless of what has already been done in qemu my preference is that if a requested feature cannot be set then a failure should be propagated up to the application. Otherwise, the application is left to debug a silent failure which, depending on what that is, may be difficult.
It's still logged as an error, isn't it?
Currently, it's just related to the guest offloads. It seems
that failed to set offloads to tap just means that users of
tap won't be able to leverage the offload capabilities provided
by guest (i.e. virtio-user) as tap won't announce them. And
it's not really necessary to fail the virtio-user's device
start in this case. Thoughts?
> But, as the maintainer, that is your call so if you want it changed to a silent failure I will do that. Just so that I am clear you want both failures to be ignored? That is, if a requested offload is not supported we should silently ignore the -ENOTSUP, and also if the ioctl fails for some other reason we should ignore that too?
>
>
> >
> > We should also check whether offloads available when handling
> > VHOST_GET_FEATURES.
>
> That will have to be a different patch as it is outside of the scope of what was being fixed by this one. For this issue we were fixing the fact that offload features were being enabled even when they were not requested by the application.
It's better to fix it in the same patch set if the
error handling is changed.
Thanks
>
>
> Allain
>
>
prev parent reply other threads:[~2018-08-16 5:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 18:34 Allain Legacy
2018-08-10 7:07 ` Jens Freimann
2018-08-15 3:40 ` Tiwei Bie
2018-08-15 12:28 ` Legacy, Allain
2018-08-16 5:38 ` Tiwei Bie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180816053806.GB8252@debian \
--to=tiwei.bie@intel.com \
--cc=Allain.Legacy@windriver.com \
--cc=Eric.Zhang@windriver.com \
--cc=Matt.Peters@windriver.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).