* [PATCH] doc: add driver limitation for vhost dequeue zero copy
@ 2018-02-24 14:44 Junjie Chen
2018-02-26 4:44 ` Tan, Jianfeng
2018-02-27 9:21 ` [PATCH v2] " Junjie Chen
0 siblings, 2 replies; 14+ messages in thread
From: Junjie Chen @ 2018-02-24 14:44 UTC (permalink / raw)
To: yliu, maxime.coquelin, jianfeng.tan; +Cc: dev, Junjie Chen
In vhost-switch example, when binding nic to vfio-pci, dequeue zero
copy cannot work in VM2NIC mode due to no iommu dma mapping is setup
for guest memory currently.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
---
doc/guides/sample_app_ug/vhost.rst | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
index a4bdc6a..1591a31 100644
--- a/doc/guides/sample_app_ug/vhost.rst
+++ b/doc/guides/sample_app_ug/vhost.rst
@@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx retry is enabled. The
default value is 15.
**--dequeue-zero-copy**
-Dequeue zero copy will be enabled when this option is given.
+Dequeue zero copy will be enabled when this option is given, it is worth to
+note that if NIC is binded to vfio-pci driver, dequeue zero copy cannot work
+at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu dma mapping for
+guest memory.
**--vlan-strip 0|1**
VLAN strip option is removed, because different NICs have different behaviors
--
2.0.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] doc: add driver limitation for vhost dequeue zero copy
2018-02-24 14:44 [PATCH] doc: add driver limitation for vhost dequeue zero copy Junjie Chen
@ 2018-02-26 4:44 ` Tan, Jianfeng
2018-03-13 9:12 ` Kovacevic, Marko
2018-02-27 9:21 ` [PATCH v2] " Junjie Chen
1 sibling, 1 reply; 14+ messages in thread
From: Tan, Jianfeng @ 2018-02-26 4:44 UTC (permalink / raw)
To: Chen, Junjie J, yliu, maxime.coquelin; +Cc: dev
Hi Junjie,
> -----Original Message-----
> From: Chen, Junjie J
> Sent: Saturday, February 24, 2018 10:44 PM
> To: yliu@fridaylinux.org; maxime.coquelin@redhat.com; Tan, Jianfeng
> Cc: dev@dpdk.org; Chen, Junjie J
> Subject: [PATCH] doc: add driver limitation for vhost dequeue zero copy
>
> In vhost-switch example, when binding nic to vfio-pci, dequeue zero
> copy cannot work in VM2NIC mode due to no iommu dma mapping is setup
> for guest memory currently.
IMO, it's a limitation that can be fixed. Do you want to try fixing it?
>
> Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> ---
> doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/sample_app_ug/vhost.rst
> b/doc/guides/sample_app_ug/vhost.rst
> index a4bdc6a..1591a31 100644
> --- a/doc/guides/sample_app_ug/vhost.rst
> +++ b/doc/guides/sample_app_ug/vhost.rst
Besides, we might also need to put such limitation at http://dpdk.org/doc/guides/prog_guide/vhost_lib.html
Thanks,
Jianfeng
> @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx
> retry is enabled. The
> default value is 15.
>
> **--dequeue-zero-copy**
> -Dequeue zero copy will be enabled when this option is given.
> +Dequeue zero copy will be enabled when this option is given, it is worth to
> +note that if NIC is binded to vfio-pci driver, dequeue zero copy cannot work
> +at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu dma
> mapping for
> +guest memory.
>
> **--vlan-strip 0|1**
> VLAN strip option is removed, because different NICs have different
> behaviors
> --
> 2.0.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2] doc: add driver limitation for vhost dequeue zero copy
2018-02-24 14:44 [PATCH] doc: add driver limitation for vhost dequeue zero copy Junjie Chen
2018-02-26 4:44 ` Tan, Jianfeng
@ 2018-02-27 9:21 ` Junjie Chen
2018-03-06 8:57 ` Maxime Coquelin
2018-03-09 10:07 ` [PATCH v3] " Junjie Chen
1 sibling, 2 replies; 14+ messages in thread
From: Junjie Chen @ 2018-02-27 9:21 UTC (permalink / raw)
To: yliu, maxime.coquelin, jianfeng.tan; +Cc: dev, Junjie Chen
In vhost-switch example, when binding nic to vfio-pci, dequeue zero
copy cannot work in VM2NIC mode due to no iommu dma mapping is setup
for guest memory currently.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
---
Changes in V2:
- add doc in vhost lib
doc/guides/prog_guide/vhost_lib.rst | 3 +++
doc/guides/sample_app_ug/vhost.rst | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 18227b6..bdf77d6 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -83,6 +83,9 @@ The following is an overview of some key Vhost API functions:
of those segments, thus the fewer the segments, the quicker we will get
the mapping. NOTE: we may speed it by using tree searching in future.
+ * zero copy does not work when using vfio-pci driver currently, this is
+ because we don't setup iommu dma mapping for guest memory.
+
- ``RTE_VHOST_USER_IOMMU_SUPPORT``
IOMMU support will be enabled when this flag is set. It is disabled by
diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
index a4bdc6a..840c1fd 100644
--- a/doc/guides/sample_app_ug/vhost.rst
+++ b/doc/guides/sample_app_ug/vhost.rst
@@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx retry is enabled. The
default value is 15.
**--dequeue-zero-copy**
-Dequeue zero copy will be enabled when this option is given.
+Dequeue zero copy will be enabled when this option is given, it is worth to
+note that if NIC is binded to vfio-pci driver, dequeue zero copy cannot work
+at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu dma mapping for
+guest memory.
**--vlan-strip 0|1**
VLAN strip option is removed, because different NICs have different behaviors
--
2.0.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v2] doc: add driver limitation for vhost dequeue zero copy
2018-02-27 9:21 ` [PATCH v2] " Junjie Chen
@ 2018-03-06 8:57 ` Maxime Coquelin
2018-03-09 5:17 ` Chen, Junjie J
2018-03-09 10:07 ` [PATCH v3] " Junjie Chen
1 sibling, 1 reply; 14+ messages in thread
From: Maxime Coquelin @ 2018-03-06 8:57 UTC (permalink / raw)
To: Junjie Chen, yliu, jianfeng.tan; +Cc: dev
On 02/27/2018 10:21 AM, Junjie Chen wrote:
> In vhost-switch example, when binding nic to vfio-pci, dequeue zero
> copy cannot work in VM2NIC mode due to no iommu dma mapping is setup
> for guest memory currently.
>
> Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> ---
> Changes in V2:
> - add doc in vhost lib
>
> doc/guides/prog_guide/vhost_lib.rst | 3 +++
> doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
> index 18227b6..bdf77d6 100644
> --- a/doc/guides/prog_guide/vhost_lib.rst
> +++ b/doc/guides/prog_guide/vhost_lib.rst
> @@ -83,6 +83,9 @@ The following is an overview of some key Vhost API functions:
> of those segments, thus the fewer the segments, the quicker we will get
> the mapping. NOTE: we may speed it by using tree searching in future.
>
> + * zero copy does not work when using vfio-pci driver currently, this is
> + because we don't setup iommu dma mapping for guest memory.
> +
I guess that it should work with vfio-pci in noiommu mode? Maybe worth
to clarify.
> - ``RTE_VHOST_USER_IOMMU_SUPPORT``
>
> IOMMU support will be enabled when this flag is set. It is disabled by
> diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
> index a4bdc6a..840c1fd 100644
> --- a/doc/guides/sample_app_ug/vhost.rst
> +++ b/doc/guides/sample_app_ug/vhost.rst
> @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx retry is enabled. The
> default value is 15.
>
> **--dequeue-zero-copy**
> -Dequeue zero copy will be enabled when this option is given.
> +Dequeue zero copy will be enabled when this option is given, it is worth to
> +note that if NIC is binded to vfio-pci driver, dequeue zero copy cannot work
> +at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu dma mapping for
> +guest memory.
>
> **--vlan-strip 0|1**
> VLAN strip option is removed, because different NICs have different behaviors
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2] doc: add driver limitation for vhost dequeue zero copy
2018-03-06 8:57 ` Maxime Coquelin
@ 2018-03-09 5:17 ` Chen, Junjie J
0 siblings, 0 replies; 14+ messages in thread
From: Chen, Junjie J @ 2018-03-09 5:17 UTC (permalink / raw)
To: Maxime Coquelin, yliu, Tan, Jianfeng; +Cc: dev
> -----Original Message-----
> From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com]
> Sent: Tuesday, March 6, 2018 4:57 PM
> To: Chen, Junjie J <junjie.j.chen@intel.com>; yliu@fridaylinux.org; Tan,
> Jianfeng <jianfeng.tan@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [PATCH v2] doc: add driver limitation for vhost dequeue zero copy
>
>
>
> On 02/27/2018 10:21 AM, Junjie Chen wrote:
> > In vhost-switch example, when binding nic to vfio-pci, dequeue zero
> > copy cannot work in VM2NIC mode due to no iommu dma mapping is setup
> > for guest memory currently.
> >
> > Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> > ---
> > Changes in V2:
> > - add doc in vhost lib
> >
> > doc/guides/prog_guide/vhost_lib.rst | 3 +++
> > doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> > 2 files changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/doc/guides/prog_guide/vhost_lib.rst
> > b/doc/guides/prog_guide/vhost_lib.rst
> > index 18227b6..bdf77d6 100644
> > --- a/doc/guides/prog_guide/vhost_lib.rst
> > +++ b/doc/guides/prog_guide/vhost_lib.rst
> > @@ -83,6 +83,9 @@ The following is an overview of some key Vhost API
> functions:
> > of those segments, thus the fewer the segments, the quicker we
> will get
> > the mapping. NOTE: we may speed it by using tree searching in
> future.
> >
> > + * zero copy does not work when using vfio-pci driver currently, this is
> > + because we don't setup iommu dma mapping for guest memory.
> > +
>
> I guess that it should work with vfio-pci in noiommu mode? Maybe worth to
> clarify.
You are right, it works on noiommu mode. Updated patch accordingly.
>
> > - ``RTE_VHOST_USER_IOMMU_SUPPORT``
> >
> > IOMMU support will be enabled when this flag is set. It is
> > disabled by diff --git a/doc/guides/sample_app_ug/vhost.rst
> > b/doc/guides/sample_app_ug/vhost.rst
> > index a4bdc6a..840c1fd 100644
> > --- a/doc/guides/sample_app_ug/vhost.rst
> > +++ b/doc/guides/sample_app_ug/vhost.rst
> > @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx
> retry is enabled. The
> > default value is 15.
> >
> > **--dequeue-zero-copy**
> > -Dequeue zero copy will be enabled when this option is given.
> > +Dequeue zero copy will be enabled when this option is given, it is
> > +worth to note that if NIC is binded to vfio-pci driver, dequeue zero
> > +copy cannot work at VM2NIC mode (vm2vm=0) due to currently we don't
> > +setup iommu dma mapping for guest memory.
> >
> > **--vlan-strip 0|1**
> > VLAN strip option is removed, because different NICs have different
> > behaviors
> >
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3] doc: add driver limitation for vhost dequeue zero copy
2018-02-27 9:21 ` [PATCH v2] " Junjie Chen
2018-03-06 8:57 ` Maxime Coquelin
@ 2018-03-09 10:07 ` Junjie Chen
2018-03-12 3:15 ` Tan, Jianfeng
2018-03-14 16:24 ` [PATCH v4] " Junjie Chen
1 sibling, 2 replies; 14+ messages in thread
From: Junjie Chen @ 2018-03-09 10:07 UTC (permalink / raw)
To: yliu, maxime.coquein, jianfeng.tan; +Cc: dev, Junjie Chen
In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
is setup for guest memory currently.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
---
Changes in V3:
- update limitation to iommu
Changes in V2:
- add doc in vhost lib
doc/guides/prog_guide/vhost_lib.rst | 5 +++++
doc/guides/sample_app_ug/vhost.rst | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 18227b6..06d214f 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -83,6 +83,11 @@ The following is an overview of some key Vhost API functions:
of those segments, thus the fewer the segments, the quicker we will get
the mapping. NOTE: we may speed it by using tree searching in future.
+ * zero copy does not work when using driver with iommu mode currently, this
+ is because we don't setup iommu dma mapping for guest memory. For example,
+ when you bind device to vfio-pci driver, you need to set driver to work
+ in noiommu mode.
+
- ``RTE_VHOST_USER_IOMMU_SUPPORT``
IOMMU support will be enabled when this flag is set. It is disabled by
diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
index a4bdc6a..f0bb169 100644
--- a/doc/guides/sample_app_ug/vhost.rst
+++ b/doc/guides/sample_app_ug/vhost.rst
@@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx retry is enabled. The
default value is 15.
**--dequeue-zero-copy**
-Dequeue zero copy will be enabled when this option is given.
+Dequeue zero copy will be enabled when this option is given. it is worth to
+note that if NIC is binded to driver with iommu enabled, dequeue zero copy
+cannot work at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu
+dma mapping for guest memory.
**--vlan-strip 0|1**
VLAN strip option is removed, because different NICs have different behaviors
--
2.0.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3] doc: add driver limitation for vhost dequeue zero copy
2018-03-09 10:07 ` [PATCH v3] " Junjie Chen
@ 2018-03-12 3:15 ` Tan, Jianfeng
2018-03-13 9:19 ` Chen, Junjie J
2018-03-14 16:24 ` [PATCH v4] " Junjie Chen
1 sibling, 1 reply; 14+ messages in thread
From: Tan, Jianfeng @ 2018-03-12 3:15 UTC (permalink / raw)
To: Junjie Chen, yliu, maxime.coquein; +Cc: dev
On 3/9/2018 6:07 PM, Junjie Chen wrote:
> In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
> dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
> is setup for guest memory currently.
>
> Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> ---
> Changes in V3:
> - update limitation to iommu
> Changes in V2:
> - add doc in vhost lib
>
> doc/guides/prog_guide/vhost_lib.rst | 5 +++++
> doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
> index 18227b6..06d214f 100644
> --- a/doc/guides/prog_guide/vhost_lib.rst
> +++ b/doc/guides/prog_guide/vhost_lib.rst
> @@ -83,6 +83,11 @@ The following is an overview of some key Vhost API functions:
> of those segments, thus the fewer the segments, the quicker we will get
> the mapping. NOTE: we may speed it by using tree searching in future.
>
> + * zero copy does not work when using driver with iommu mode currently, this
Considering FreeBSD driver nic_uio does not support iommu, we can make
"driver" more explicitly. For example,
"driver with iommu mode" -> "vfio-pci with iommu mode"
> + is because we don't setup iommu dma mapping for guest memory.
> For example, when you bind device to vfio-pci driver, you need to set driver to work in noiommu mode.
Reword the above sentence a little bit:
"If vfio-pci is a must in your case, insert vfio-pci kernel module in
noiommu mode."
> +
> - ``RTE_VHOST_USER_IOMMU_SUPPORT``
>
> IOMMU support will be enabled when this flag is set. It is disabled by
> diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
> index a4bdc6a..f0bb169 100644
> --- a/doc/guides/sample_app_ug/vhost.rst
> +++ b/doc/guides/sample_app_ug/vhost.rst
> @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx retry is enabled. The
> default value is 15.
>
> **--dequeue-zero-copy**
> -Dequeue zero copy will be enabled when this option is given.
> +Dequeue zero copy will be enabled when this option is given. it is worth to
> +note that if NIC is binded to driver with iommu enabled, dequeue zero copy
> +cannot work at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu
> +dma mapping for guest memory.
>
> **--vlan-strip 0|1**
> VLAN strip option is removed, because different NICs have different behaviors
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] doc: add driver limitation for vhost dequeue zero copy
2018-02-26 4:44 ` Tan, Jianfeng
@ 2018-03-13 9:12 ` Kovacevic, Marko
2018-03-13 9:18 ` Chen, Junjie J
0 siblings, 1 reply; 14+ messages in thread
From: Kovacevic, Marko @ 2018-03-13 9:12 UTC (permalink / raw)
To: Tan, Jianfeng, Chen, Junjie J, dev; +Cc: yliu, maxime.coquelin
> > Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> > ---
> > doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/doc/guides/sample_app_ug/vhost.rst
> > b/doc/guides/sample_app_ug/vhost.rst
> > index a4bdc6a..1591a31 100644
> > --- a/doc/guides/sample_app_ug/vhost.rst
> > +++ b/doc/guides/sample_app_ug/vhost.rst
Can you please supersede this patch and the V2 if you have sent a V3 to the mailing list.
Thanks
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] doc: add driver limitation for vhost dequeue zero copy
2018-03-13 9:12 ` Kovacevic, Marko
@ 2018-03-13 9:18 ` Chen, Junjie J
0 siblings, 0 replies; 14+ messages in thread
From: Chen, Junjie J @ 2018-03-13 9:18 UTC (permalink / raw)
To: Kovacevic, Marko, Tan, Jianfeng, dev; +Cc: yliu, maxime.coquelin
Done, Thanks for reminder.
Cheers
JJ
> -----Original Message-----
> From: Kovacevic, Marko
> Sent: Tuesday, March 13, 2018 5:13 PM
> To: Tan, Jianfeng <jianfeng.tan@intel.com>; Chen, Junjie J
> <junjie.j.chen@intel.com>; dev@dpdk.org
> Cc: yliu@fridaylinux.org; maxime.coquelin@redhat.com
> Subject: RE: [dpdk-dev] [PATCH] doc: add driver limitation for vhost dequeue
> zero copy
>
> > > Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> > > ---
> > > doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> > > 1 file changed, 4 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/doc/guides/sample_app_ug/vhost.rst
> > > b/doc/guides/sample_app_ug/vhost.rst
> > > index a4bdc6a..1591a31 100644
> > > --- a/doc/guides/sample_app_ug/vhost.rst
> > > +++ b/doc/guides/sample_app_ug/vhost.rst
>
>
> Can you please supersede this patch and the V2 if you have sent a V3 to the
> mailing list.
>
> Thanks
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3] doc: add driver limitation for vhost dequeue zero copy
2018-03-12 3:15 ` Tan, Jianfeng
@ 2018-03-13 9:19 ` Chen, Junjie J
0 siblings, 0 replies; 14+ messages in thread
From: Chen, Junjie J @ 2018-03-13 9:19 UTC (permalink / raw)
To: Tan, Jianfeng, yliu, maxime.coquein; +Cc: dev
Hi Jianfeng.
> -----Original Message-----
> From: Tan, Jianfeng
> Sent: Monday, March 12, 2018 11:15 AM
> To: Chen, Junjie J <junjie.j.chen@intel.com>; yliu@fridaylinux.org;
> maxime.coquein@redhat.com
> Cc: dev@dpdk.org
> Subject: Re: [PATCH v3] doc: add driver limitation for vhost dequeue zero copy
>
>
>
> On 3/9/2018 6:07 PM, Junjie Chen wrote:
> > In vhost-switch example, when binding nic to vfio-pci with iommu
> > enabled, dequeue zero copy cannot work in VM2NIC mode due to no iommu
> > dma mapping is setup for guest memory currently.
> >
> > Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
> > ---
> > Changes in V3:
> > - update limitation to iommu
> > Changes in V2:
> > - add doc in vhost lib
> >
> > doc/guides/prog_guide/vhost_lib.rst | 5 +++++
> > doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> > 2 files changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/doc/guides/prog_guide/vhost_lib.rst
> > b/doc/guides/prog_guide/vhost_lib.rst
> > index 18227b6..06d214f 100644
> > --- a/doc/guides/prog_guide/vhost_lib.rst
> > +++ b/doc/guides/prog_guide/vhost_lib.rst
> > @@ -83,6 +83,11 @@ The following is an overview of some key Vhost API
> functions:
> > of those segments, thus the fewer the segments, the quicker we will
> get
> > the mapping. NOTE: we may speed it by using tree searching in
> future.
> >
> > + * zero copy does not work when using driver with iommu mode
> > + currently, this
>
> Considering FreeBSD driver nic_uio does not support iommu, we can make
> "driver" more explicitly. For example,
>
> "driver with iommu mode" -> "vfio-pci with iommu mode"
Will update.
>
> > + is because we don't setup iommu dma mapping for guest memory.
>
> > For example, when you bind device to vfio-pci driver, you need to set driver to
> work in noiommu mode.
>
> Reword the above sentence a little bit:
> "If vfio-pci is a must in your case, insert vfio-pci kernel module in noiommu
> mode."
Will update, thanks.
> > +
> > - ``RTE_VHOST_USER_IOMMU_SUPPORT``
> >
> > IOMMU support will be enabled when this flag is set. It is
> > disabled by diff --git a/doc/guides/sample_app_ug/vhost.rst
> > b/doc/guides/sample_app_ug/vhost.rst
> > index a4bdc6a..f0bb169 100644
> > --- a/doc/guides/sample_app_ug/vhost.rst
> > +++ b/doc/guides/sample_app_ug/vhost.rst
> > @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx
> retry is enabled. The
> > default value is 15.
> >
> > **--dequeue-zero-copy**
> > -Dequeue zero copy will be enabled when this option is given.
> > +Dequeue zero copy will be enabled when this option is given. it is
> > +worth to note that if NIC is binded to driver with iommu enabled,
> > +dequeue zero copy cannot work at VM2NIC mode (vm2vm=0) due to
> > +currently we don't setup iommu dma mapping for guest memory.
> >
> > **--vlan-strip 0|1**
> > VLAN strip option is removed, because different NICs have different
> > behaviors
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4] doc: add driver limitation for vhost dequeue zero copy
2018-03-09 10:07 ` [PATCH v3] " Junjie Chen
2018-03-12 3:15 ` Tan, Jianfeng
@ 2018-03-14 16:24 ` Junjie Chen
2018-03-19 6:56 ` Tan, Jianfeng
2018-03-29 12:14 ` Maxime Coquelin
1 sibling, 2 replies; 14+ messages in thread
From: Junjie Chen @ 2018-03-14 16:24 UTC (permalink / raw)
To: jianfeng.tan, maxime.coquelin, yliu; +Cc: dev, Junjie Chen
In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
is setup for guest memory currently.
Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
---
Changes in V4:
- make words more accurate
Changes in V3:
- update limitation to iommu
Changes in V2:
- add doc in vhost lib
doc/guides/prog_guide/vhost_lib.rst | 5 +++++
doc/guides/sample_app_ug/vhost.rst | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 18227b6..b49e36e 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -83,6 +83,11 @@ The following is an overview of some key Vhost API functions:
of those segments, thus the fewer the segments, the quicker we will get
the mapping. NOTE: we may speed it by using tree searching in future.
+ * zero copy can not work when using vfio-pci with iommu mode currently, this
+ is because we don't setup iommu dma mapping for guest memory. If you have
+ to use vfio-pci driver, please insert vfio-pci kernel module in noiommu
+ mode.
+
- ``RTE_VHOST_USER_IOMMU_SUPPORT``
IOMMU support will be enabled when this flag is set. It is disabled by
diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
index a4bdc6a..f0bb169 100644
--- a/doc/guides/sample_app_ug/vhost.rst
+++ b/doc/guides/sample_app_ug/vhost.rst
@@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx retry is enabled. The
default value is 15.
**--dequeue-zero-copy**
-Dequeue zero copy will be enabled when this option is given.
+Dequeue zero copy will be enabled when this option is given. it is worth to
+note that if NIC is binded to driver with iommu enabled, dequeue zero copy
+cannot work at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu
+dma mapping for guest memory.
**--vlan-strip 0|1**
VLAN strip option is removed, because different NICs have different behaviors
--
2.0.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v4] doc: add driver limitation for vhost dequeue zero copy
2018-03-14 16:24 ` [PATCH v4] " Junjie Chen
@ 2018-03-19 6:56 ` Tan, Jianfeng
2018-03-29 12:14 ` Maxime Coquelin
1 sibling, 0 replies; 14+ messages in thread
From: Tan, Jianfeng @ 2018-03-19 6:56 UTC (permalink / raw)
To: Chen, Junjie J, maxime.coquelin, yliu; +Cc: dev
> -----Original Message-----
> From: Chen, Junjie J
> Sent: Thursday, March 15, 2018 12:24 AM
> To: Tan, Jianfeng; maxime.coquelin@redhat.com; yliu@fridaylinux.org
> Cc: dev@dpdk.org; Chen, Junjie J
> Subject: [PATCH v4] doc: add driver limitation for vhost dequeue zero copy
>
> In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
> dequeue zero copy cannot work in VM2NIC mode due to no iommu dma
> mapping
> is setup for guest memory currently.
>
> Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Thanks!
> ---
> Changes in V4:
> - make words more accurate
> Changes in V3:
> - update limitation to iommu
> Changes in V2:
> - add doc in vhost lib
> doc/guides/prog_guide/vhost_lib.rst | 5 +++++
> doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/prog_guide/vhost_lib.rst
> b/doc/guides/prog_guide/vhost_lib.rst
> index 18227b6..b49e36e 100644
> --- a/doc/guides/prog_guide/vhost_lib.rst
> +++ b/doc/guides/prog_guide/vhost_lib.rst
> @@ -83,6 +83,11 @@ The following is an overview of some key Vhost API
> functions:
> of those segments, thus the fewer the segments, the quicker we will get
> the mapping. NOTE: we may speed it by using tree searching in future.
>
> + * zero copy can not work when using vfio-pci with iommu mode currently,
> this
> + is because we don't setup iommu dma mapping for guest memory. If
> you have
> + to use vfio-pci driver, please insert vfio-pci kernel module in noiommu
> + mode.
> +
> - ``RTE_VHOST_USER_IOMMU_SUPPORT``
>
> IOMMU support will be enabled when this flag is set. It is disabled by
> diff --git a/doc/guides/sample_app_ug/vhost.rst
> b/doc/guides/sample_app_ug/vhost.rst
> index a4bdc6a..f0bb169 100644
> --- a/doc/guides/sample_app_ug/vhost.rst
> +++ b/doc/guides/sample_app_ug/vhost.rst
> @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx
> retry is enabled. The
> default value is 15.
>
> **--dequeue-zero-copy**
> -Dequeue zero copy will be enabled when this option is given.
> +Dequeue zero copy will be enabled when this option is given. it is worth to
> +note that if NIC is binded to driver with iommu enabled, dequeue zero copy
> +cannot work at VM2NIC mode (vm2vm=0) due to currently we don't setup
> iommu
> +dma mapping for guest memory.
>
> **--vlan-strip 0|1**
> VLAN strip option is removed, because different NICs have different
> behaviors
> --
> 2.0.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4] doc: add driver limitation for vhost dequeue zero copy
2018-03-14 16:24 ` [PATCH v4] " Junjie Chen
2018-03-19 6:56 ` Tan, Jianfeng
@ 2018-03-29 12:14 ` Maxime Coquelin
2018-04-11 14:34 ` Maxime Coquelin
1 sibling, 1 reply; 14+ messages in thread
From: Maxime Coquelin @ 2018-03-29 12:14 UTC (permalink / raw)
To: Junjie Chen, jianfeng.tan, yliu, Mcnamara, John; +Cc: dev
On 03/14/2018 05:24 PM, Junjie Chen wrote:
> In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
> dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
> is setup for guest memory currently.
>
> Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
John, as this is a doc patch for Vhost, does it go through the doc tree
or through Virtio one?
Thanks,
Maxime
> ---
> Changes in V4:
> - make words more accurate
> Changes in V3:
> - update limitation to iommu
> Changes in V2:
> - add doc in vhost lib
> doc/guides/prog_guide/vhost_lib.rst | 5 +++++
> doc/guides/sample_app_ug/vhost.rst | 5 ++++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
> index 18227b6..b49e36e 100644
> --- a/doc/guides/prog_guide/vhost_lib.rst
> +++ b/doc/guides/prog_guide/vhost_lib.rst
> @@ -83,6 +83,11 @@ The following is an overview of some key Vhost API functions:
> of those segments, thus the fewer the segments, the quicker we will get
> the mapping. NOTE: we may speed it by using tree searching in future.
>
> + * zero copy can not work when using vfio-pci with iommu mode currently, this
> + is because we don't setup iommu dma mapping for guest memory. If you have
> + to use vfio-pci driver, please insert vfio-pci kernel module in noiommu
> + mode.
> +
> - ``RTE_VHOST_USER_IOMMU_SUPPORT``
>
> IOMMU support will be enabled when this flag is set. It is disabled by
> diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
> index a4bdc6a..f0bb169 100644
> --- a/doc/guides/sample_app_ug/vhost.rst
> +++ b/doc/guides/sample_app_ug/vhost.rst
> @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx retry is enabled. The
> default value is 15.
>
> **--dequeue-zero-copy**
> -Dequeue zero copy will be enabled when this option is given.
> +Dequeue zero copy will be enabled when this option is given. it is worth to
> +note that if NIC is binded to driver with iommu enabled, dequeue zero copy
> +cannot work at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu
> +dma mapping for guest memory.
>
> **--vlan-strip 0|1**
> VLAN strip option is removed, because different NICs have different behaviors
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4] doc: add driver limitation for vhost dequeue zero copy
2018-03-29 12:14 ` Maxime Coquelin
@ 2018-04-11 14:34 ` Maxime Coquelin
0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2018-04-11 14:34 UTC (permalink / raw)
To: Junjie Chen, jianfeng.tan, yliu, Mcnamara, John; +Cc: dev
On 03/29/2018 02:14 PM, Maxime Coquelin wrote:
>
>
> On 03/14/2018 05:24 PM, Junjie Chen wrote:
>> In vhost-switch example, when binding nic to vfio-pci with iommu enabled,
>> dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping
>> is setup for guest memory currently.
>>
>> Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
>
> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>
> John, as this is a doc patch for Vhost, does it go through the doc tree
> or through Virtio one?
Applied to dpdk-next-virtio/master
Thanks,
Maxime
> Thanks,
> Maxime
>> ---
>> Changes in V4:
>> - make words more accurate
>> Changes in V3:
>> - update limitation to iommu
>> Changes in V2:
>> - add doc in vhost lib
>> doc/guides/prog_guide/vhost_lib.rst | 5 +++++
>> doc/guides/sample_app_ug/vhost.rst | 5 ++++-
>> 2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/doc/guides/prog_guide/vhost_lib.rst
>> b/doc/guides/prog_guide/vhost_lib.rst
>> index 18227b6..b49e36e 100644
>> --- a/doc/guides/prog_guide/vhost_lib.rst
>> +++ b/doc/guides/prog_guide/vhost_lib.rst
>> @@ -83,6 +83,11 @@ The following is an overview of some key Vhost API
>> functions:
>> of those segments, thus the fewer the segments, the quicker we
>> will get
>> the mapping. NOTE: we may speed it by using tree searching in
>> future.
>> + * zero copy can not work when using vfio-pci with iommu mode
>> currently, this
>> + is because we don't setup iommu dma mapping for guest memory.
>> If you have
>> + to use vfio-pci driver, please insert vfio-pci kernel module in
>> noiommu
>> + mode.
>> +
>> - ``RTE_VHOST_USER_IOMMU_SUPPORT``
>> IOMMU support will be enabled when this flag is set. It is
>> disabled by
>> diff --git a/doc/guides/sample_app_ug/vhost.rst
>> b/doc/guides/sample_app_ug/vhost.rst
>> index a4bdc6a..f0bb169 100644
>> --- a/doc/guides/sample_app_ug/vhost.rst
>> +++ b/doc/guides/sample_app_ug/vhost.rst
>> @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when
>> rx retry is enabled. The
>> default value is 15.
>> **--dequeue-zero-copy**
>> -Dequeue zero copy will be enabled when this option is given.
>> +Dequeue zero copy will be enabled when this option is given. it is
>> worth to
>> +note that if NIC is binded to driver with iommu enabled, dequeue zero
>> copy
>> +cannot work at VM2NIC mode (vm2vm=0) due to currently we don't setup
>> iommu
>> +dma mapping for guest memory.
>> **--vlan-strip 0|1**
>> VLAN strip option is removed, because different NICs have different
>> behaviors
>>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2018-04-11 14:34 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-24 14:44 [PATCH] doc: add driver limitation for vhost dequeue zero copy Junjie Chen
2018-02-26 4:44 ` Tan, Jianfeng
2018-03-13 9:12 ` Kovacevic, Marko
2018-03-13 9:18 ` Chen, Junjie J
2018-02-27 9:21 ` [PATCH v2] " Junjie Chen
2018-03-06 8:57 ` Maxime Coquelin
2018-03-09 5:17 ` Chen, Junjie J
2018-03-09 10:07 ` [PATCH v3] " Junjie Chen
2018-03-12 3:15 ` Tan, Jianfeng
2018-03-13 9:19 ` Chen, Junjie J
2018-03-14 16:24 ` [PATCH v4] " Junjie Chen
2018-03-19 6:56 ` Tan, Jianfeng
2018-03-29 12:14 ` Maxime Coquelin
2018-04-11 14:34 ` Maxime Coquelin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.