DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Legacy, Allain" <Allain.Legacy@windriver.com>
To: Tiwei Bie <tiwei.bie@intel.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: Wed, 15 Aug 2018 12:28:05 +0000	[thread overview]
Message-ID: <70A7408C6E1BFB41B192A929744D8523BAB91B23@ALA-MBD.corp.ad.wrs.com> (raw)
In-Reply-To: <20180815034001.GA21177@debian.sh.intel.com>

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


Allain



  reply	other threads:[~2018-08-15 12:28 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 [this message]
2018-08-16  5:38     ` Tiwei Bie

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=70A7408C6E1BFB41B192A929744D8523BAB91B23@ALA-MBD.corp.ad.wrs.com \
    --to=allain.legacy@windriver.com \
    --cc=Eric.Zhang@windriver.com \
    --cc=Matt.Peters@windriver.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=tiwei.bie@intel.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).