[dpdk-dev,1/2] examples/vhost_scsi: add virtio-1.0 feature bit support
Checks
Commit Message
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
---
examples/vhost_scsi/vhost_scsi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
On 05/18/2018 01:32 AM, Changpeng Liu wrote:
> Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
> ---
> examples/vhost_scsi/vhost_scsi.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
18/05/2018 14:35, Maxime Coquelin:
>
> On 05/18/2018 01:32 AM, Changpeng Liu wrote:
> > Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
> > ---
> > examples/vhost_scsi/vhost_scsi.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Patch 1 applied alone, thanks
22/05/2018 19:51, Thomas Monjalon:
> 18/05/2018 14:35, Maxime Coquelin:
> >
> > On 05/18/2018 01:32 AM, Changpeng Liu wrote:
> > > Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
> > > ---
> > > examples/vhost_scsi/vhost_scsi.c | 7 ++++---
> > > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
> Patch 1 applied alone, thanks
After compilation tests, the patch is not accepted in 18.05,
because VIRTIO_F_VERSION_1 seems not defined on some distributions,
despite the fallback implemented.
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Tuesday, May 22, 2018 1:33 PM
> To: Liu, Changpeng <changpeng.liu@intel.com>
> Cc: dev@dpdk.org; Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: Re: [dpdk-dev] [PATCH 1/2] examples/vhost_scsi: add virtio-1.0 feature
> bit support
>
> 22/05/2018 19:51, Thomas Monjalon:
> > 18/05/2018 14:35, Maxime Coquelin:
> > >
> > > On 05/18/2018 01:32 AM, Changpeng Liu wrote:
> > > > Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
> > > > ---
> > > > examples/vhost_scsi/vhost_scsi.c | 7 ++++---
> > > > 1 file changed, 4 insertions(+), 3 deletions(-)
> > >
> > > Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> >
> > Patch 1 applied alone, thanks
>
> After compilation tests, the patch is not accepted in 18.05,
> because VIRTIO_F_VERSION_1 seems not defined on some distributions,
> despite the fallback implemented.
What a mess for vhost library. :).
lib/librte_vhost/vhost.h has the definition VIRTIO_F_VERSION_1 for some older kernel,
but didn't include in the public API header <rte_vhost.h>, looks like we should move
this definition to rte_vhost.h for some old kernels.
>
@@ -20,9 +20,10 @@
#include "vhost_scsi.h"
#include "scsi_spec.h"
-#define VIRTIO_SCSI_FEATURES ((1 << VIRTIO_F_NOTIFY_ON_EMPTY) |\
- (1 << VIRTIO_SCSI_F_INOUT) |\
- (1 << VIRTIO_SCSI_F_CHANGE))
+#define VIRTIO_SCSI_FEATURES ((1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) |\
+ (1ULL << VIRTIO_SCSI_F_INOUT) |\
+ (1ULL << VIRTIO_SCSI_F_CHANGE) |\
+ (1ULL << VIRTIO_F_VERSION_1))
/* Path to folder where character device will be created. Can be set by user. */
static char dev_pathname[PATH_MAX] = "";