Bug 1532956
| Summary: | Boot guest with vhost-user setting "iommu='on' ats='on'", dpdk's testpmd can not receive packets. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Pei Zhang <pezhang> | ||||
| Component: | openvswitch | Assignee: | Kevin Traynor <ktraynor> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Pei Zhang <pezhang> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.5 | CC: | atragler, chayang, ctrautma, hewang, juzhang, maxime.coquelin, michen, tli | ||||
| Target Milestone: | rc | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-02-08 06:50:28 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Pei Zhang
2018-01-10 05:30:14 UTC
Hi Pei, does this work with DPDK as a vswitch in the host? Mostly vhost path in openvswitch is done in the DPDK code. Perhaps there is some upstream commit missing from the packages you tested with. We use DPDK 17.11.0 in both packages you have tested with. We have recently backported virt fixes for 1530957, 1450680 & 1525446. You could try the latest packages if one of them is a suspect. The latest packages are: openvswitch-2.9.0-0.5.20171212git6625e43.el7fdb https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=651865 and dpdk-17.11-7.el7 https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=650654 Hi Kevin,
Does this openvswitch package has below patch?
commit a14d1cc8a74858c7488207e02b9ebdb67e50bd88
Author: Mark Kavanagh <mark.b.kavanagh>
Date: Fri Dec 8 10:53:47 2017 +0000
netdev-dpdk: vHost IOMMU support
DPDK v17.11 introduces support for the vHost IOMMU feature.
This is a security feature, which restricts the vhost memory
that a virtio device may access.
This feature also enables the vhost REPLY_ACK protocol, the
implementation of which is known to work in newer versions of
QEMU (i.e. v2.10.0), but is buggy in older versions (v2.7.0 -
v2.9.0, inclusive). As such, the feature is disabled by default
in (and should remain so), for the aforementioned older QEMU
verions. Starting with QEMU v2.9.1, vhost-iommu-support can
safely be enabled, even without having an IOMMU device, with
no performance penalty.
This patch adds a new global config option, vhost-iommu-support,
that controls enablement of the vhost IOMMU feature:
ovs-vsctl set Open_vSwitch . other_config:vhost-iommu-support=true
This value defaults to false; to enable IOMMU support, this field
should be set to true when setting other global parameters on init
(such as "dpdk-socket-mem", for example). Changing the value at
runtime is not supported, and requires restarting the vswitch daemon.
Signed-off-by: Mark Kavanagh <mark.b.kavanagh>
Acked-by: Kevin Traynor <ktraynor>
Signed-off-by: Ian Stokes <ian.stokes>
If this is the case, it seems below command is missing in above instructions to enable Vhost IMOOU support in OVS:
ovs-vsctl set Open_vSwitch . other_config:vhost-iommu-support=true
Regards,
Maxime
(In reply to Maxime Coquelin from comment #3) .... > > If this is the case, it seems below command is missing in above instructions > to enable Vhost IMOOU support in OVS: > > ovs-vsctl set Open_vSwitch . other_config:vhost-iommu-support=true > Ah yes, you are right. The commit is in both openvswitch packages mentioned above, so it could be as simple as setting it =true. I forgot about that commit and that it's default off :| Thanks for catching. Thanks Kevin and Maxime.
Summary: This bug has been fixed well. Testing OpenvSwitch with vIOMMU, guest testpmd can receive packets and also the throughput results looks good.
Versions:
3.10.0-845.el7.x86_64
qemu-kvm-rhev-2.10.0-19.el7.x86_64
tuned-2.9.0-1.el7.noarch
libvirt-3.9.0-11.el7.x86_64
openvswitch-2.9.0-0.6.20171212git6625e43.el7fdb.x86_64
dpdk-17.11-7.el7.x86_64
Steps:
Following steps in Description. And the scripts to boot OpenvSwitch is updated like below:
...
echo "start ovs vswitch daemon"
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="1024,1024"
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask="0x1"
ovs-vsctl --no-wait set Open_vSwitch . other_config:vhost-iommu-support=true
ovs-vswitchd unix:$DB_SOCK --pidfile --detach --log-file=/var/log/openvswitch/ovs-vswitchd.log
...
Here is the 0 loss bidirectional throughput results:
frame_size qeueues throughput
with iommu 64Byte 2 21.307253Mpps
with no-iommu 64Byte 2 21.307355Mpps
So this bug has been fixed very well. Close as 'CURRENTRELEASE'.
(In reply to Kevin Traynor from comment #2)
> Hi Pei, does this work with DPDK as a vswitch in the host? Mostly vhost path
> in openvswitch is done in the DPDK code.
>
Kevin, DPDK as a vswitch in the host, everything works well with vIOMMU.
Best Regards,
Pei
Sorry I noticed that I'm not QA Contact, so I should not change status of this bug, recover it. Best Regards, Pei As this bug was filed by me and can not reproduce with latest OpenvSwitch. So, I'm taking it and closing it as 'CURRENTRELEASE', please free to reopen if you have any objections.Thanks. |