<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7601.19038"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt 微软雅黑">
<DIV><BR><BR>>>> Cole Robinson <crobinso@redhat.com> 2017/3/18 星期六 上午 1:10 >>><BR>>On 03/17/2017 04:02 AM, Lin Ma wrote:<BR>>> Create a network with a device pool containing all the VFs of an SR-IOV<BR>>> device.<BR>>> <BR>>> Signed-off-by: Lin Ma <lma@suse.com><BR>>> ---<BR>>>  ui/createnet.ui          |  92 +++++++++++++++++++++++++++++++++-<BR>>>  virtManager/createnet.py | 127 +++++++++++++++++++++++++++++------------------<BR>>>  virtinst/network.py      |  12 +++++<BR>>>  3 files changed, 182 insertions(+), 49 deletions(-)<BR>><BR>>This breaks the test suite, you'll need to extend the network-* test in<BR>>tests/xmlparse.py<BR>><BR>>"""<BR>>Second list contains 2 additional elements.<BR>>First extra element 0:<BR>><XMLProperty ./@dev 140596782899032><BR>><BR>>- []<BR>>+ [<XMLProperty ./@dev 140596782899032>,<BR>>+  <XMLProperty ./@managed 140596782936352>]<BR>><BR>><BR>>This means that there are XML properties that are<BR>>untested in the test suite. This could be caused<BR>>by a previous test suite failure, or if you added<BR>>a new property and didn't extend the test suite.<BR>>Look into extending clitest.py and/or xmlparse.py.<BR>>"""<BR>Thanks for your review, I'll try to learn how to add the tests :-)<BR></DIV>
<DIV>>I don't know much about this feature. Can you provide an example <network><BR>>definition that we can add to tests/testdriver.xml?<BR>Please refer to <A href="https://wiki.libvirt.org/page/Networking#Assignment_from_a_pool_of_SRIOV_VFs_in_a_libvirt_.3Cnetwork.3E_definition">https://wiki.libvirt.org/page/Networking#Assignment_from_a_pool_of_SRIOV_VFs_in_a_libvirt_.3Cnetwork.3E_definition</A></DIV>
<DIV> </DIV>
<DIV>The example <network> is:</DIV>
<DIV> <network><BR>   <name>passthrough</name><BR>   <forward mode='hostdev' managed='yes'><BR>     <pf dev='eth3'/><BR>   </forward><BR> </network></DIV>
<DIV> </DIV>
<DIV>Should I add it to tests/testdriver.xml?</DIV>
<DIV>(if no VFs on host, the network can't be created successfully)</DIV>
<DIV><BR>>Also, is the XML meant to only use an SR-IOV host device? If so, is that<BR>>something we can detect from nodedev XML? Right now looks like your patch<BR>>shows all host devices regardless of whether they are SR-IOV enabled<BR>Yes, It's only use for an SR-IOV host device.</DIV>
<DIV>I knew that showing all host devices regardless of whether they are SR-IOV enabled</DIV>
<DIV>is not a good idea, but as far as I know, SR-IOV status can't be detected from</DIV>
<DIV>nodedev XML so far. How about listing all of host network devices as a workaround,</DIV>
<DIV>then I write a libvirt patch to add the ability about describing the current SR-IOV</DIV>
<DIV>status in nodedev XML, once it was accepted in libvirt, I submit a new virt-manager</DIV>
<DIV>patch to fix this workaround?<BR></DIV>
<DIV>Thanks,</DIV>
<DIV>Lin</DIV></BODY></HTML>