Soft Patch Panel
 help / color / mirror / Atom feed
From: x-fn-spp-ml@ntt-tx.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH v2 7/8] docs: adds sample Domain XML file for vhost
Date: Tue, 03 Mar 2020 18:25:20 +0900	[thread overview]
Message-ID: <20200303092521.22882-8-x-fn-spp-ml@ntt-tx.co.jp> (raw)
In-Reply-To: <20200227094422.7429-1-x-fn-spp-ml@ntt-tx.co.jp>

From: Hideyuki Yamashita <yamashita.hideyuki@ntt-tx.co.jp>

This patch introduce sample Domain XML file
for vhost use case. Document description is also
modified to refer this newly introduced file.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@ntt-tx.co.jp>
Signed-off-by: Naoki Takada <ntakada14@gmail.com>
---
 docs/guides/gsg/howto_use.rst | 80 +++++++---------------------------
 docs/samples/gsg/spp-vm1.xml  | 81 +++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 64 deletions(-)
 create mode 100644 docs/samples/gsg/spp-vm1.xml

diff --git a/docs/guides/gsg/howto_use.rst b/docs/guides/gsg/howto_use.rst
index f4f1f08..4e42c58 100644
--- a/docs/guides/gsg/howto_use.rst
+++ b/docs/guides/gsg/howto_use.rst
@@ -924,6 +924,11 @@ Edit configuration of VM with virsh command. The name of VMs are found from
 
 You need to define namespace ``qemu`` to use tags such as
 ``<qemu:commandline>``.
+In ``libvirt``, ``<qemu:commandline>`` tag is supported to utilize qemu specific
+features. In this example configuration of hugepage and/or network device is
+done via modifying domain XML file.
+Please see details in
+`libvirt document <https://libvirt.org/drvqemu.html#qemucommand>`_.
 
 .. code-block:: none
 
@@ -945,6 +950,10 @@ registering destinations for classifier's table.
 
 
 Here is an example of XML config for using with SPP.
+The following example is just excerpt from complete
+sample.
+The complete sample can be found in
+`spp-vm1.xml <http://git.dpdk.org/apps/spp/tree/docs/samples/spp-vm1.xml>`_.
 
 .. code-block:: xml
 
@@ -953,85 +962,28 @@ Here is an example of XML config for using with SPP.
       <uuid>d90f5420-861a-4479-8559-62d7a1545cb9</uuid>
       <memory unit='KiB'>4194304</memory>
       <currentMemory unit='KiB'>4194304</currentMemory>
-      <memoryBacking>
-        <hugepages/>
-      </memoryBacking>
-      <vcpu placement='static'>4</vcpu>
-      <os>
-        <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
-        <boot dev='hd'/>
-      </os>
-      <features>
-        <acpi/>
-        <apic/>
-        <pae/>
-      </features>
-      <clock offset='utc'/>
-      <on_poweroff>destroy</on_poweroff>
-      <on_reboot>restart</on_reboot>
-      <on_crash>restart</on_crash>
-      <devices>
-        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
-        <disk type='file' device='disk'>
-          <driver name='qemu' type='raw'/>
-          <source file='/var/lib/libvirt/images/spp-vm1.qcow2'/>
-          <target dev='hda' bus='ide'/>
-          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-        </disk>
-        <disk type='block' device='cdrom'>
-          <driver name='qemu' type='raw'/>
-          <target dev='hdc' bus='ide'/>
-          <readonly/>
-          <address type='drive' controller='0' bus='1' target='0' unit='0'/>
-        </disk>
-        <controller type='usb' index='0'>
-          <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
-          function='0x2'/>
-        </controller>
-        <controller type='pci' index='0' model='pci-root'/>
-        <controller type='ide' index='0'>
-          <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
-          function='0x1'/>
-        </controller>
-        <interface type='network'>
-          <mac address='52:54:00:99:aa:7f'/>
-          <source network='default'/>
-          <model type='rtl8139'/>
-          <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
-          function='0x0'/>
-        </interface>
-        <serial type='pty'>
-          <target type='isa-serial' port='0'/>
-        </serial>
-        <console type='pty'>
-          <target type='serial' port='0'/>
-        </console>
-        <memballoon model='virtio'>
-          <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
-          function='0x0'/>
-        </memballoon>
-      </devices>
+      "..."
       <qemu:commandline>
         <qemu:arg value='-cpu'/>
         <qemu:arg value='host'/>
         <qemu:arg value='-object'/>
-        <qemu:arg
-        value='memory-backend-file,id=mem,size=4096M,mem-path=/run/hugepages/kvm,share=on'/>
+        <qemu:arg value='memory-backend-file,
+        id=mem,size=4096M,mem-path=/run/hugepages/kvm,share=on'/>
         <qemu:arg value='-numa'/>
         <qemu:arg value='node,memdev=mem'/>
         <qemu:arg value='-mem-prealloc'/>
         <qemu:arg value='-chardev'/>
         <qemu:arg value='socket,id=chr0,path=/tmp/sock0,server'/>
         <qemu:arg value='-device'/>
-        <qemu:arg
-        value='virtio-net-pci,netdev=vhost-net0,mac=52:54:00:12:34:56'/>
+        <qemu:arg value='virtio-net-pci,netdev=vhost-net0,
+        mac=52:54:00:12:34:56'/>
         <qemu:arg value='-netdev'/>
         <qemu:arg value='vhost-user,id=vhost-net0,chardev=chr0,vhostforce'/>
         <qemu:arg value='-chardev'/>
         <qemu:arg value='socket,id=chr1,path=/tmp/sock1,server'/>
         <qemu:arg value='-device'/>
-        <qemu:arg
-        value='virtio-net-pci,netdev=vhost-net1,mac=52:54:00:12:34:57'/>
+        <qemu:arg value='virtio-net-pci,netdev=vhost-net1,
+        mac=52:54:00:12:34:57'/>
         <qemu:arg value='-netdev'/>
         <qemu:arg value='vhost-user,id=vhost-net1,chardev=chr1,vhostforce'/>
       </qemu:commandline>
diff --git a/docs/samples/gsg/spp-vm1.xml b/docs/samples/gsg/spp-vm1.xml
new file mode 100644
index 0000000..0b5e126
--- /dev/null
+++ b/docs/samples/gsg/spp-vm1.xml
@@ -0,0 +1,81 @@
+<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
+  <name>spp-vm1</name>
+  <uuid>d90f5420-861a-4479-8559-62d7a1545cb9</uuid>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <memoryBacking>
+    <hugepages/>
+  </memoryBacking>
+  <vcpu placement='static'>4</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <acpi/>
+    <apic/>
+    <pae/>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  <devices>
+    <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='raw'/>
+      <source file='/var/lib/libvirt/images/spp-vm1.qcow2'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <disk type='block' device='cdrom'>
+      <driver name='qemu' type='raw'/>
+      <target dev='hdc' bus='ide'/>
+      <readonly/>
+      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <interface type='network'>
+      <mac address='52:54:00:99:aa:7f'/>
+      <source network='default'/>
+      <model type='rtl8139'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </interface>
+    <serial type='pty'>
+      <target type='isa-serial' port='0'/>
+    </serial>
+    <console type='pty'>
+      <target type='serial' port='0'/>
+    </console>
+    <memballoon model='virtio'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </memballoon>
+  </devices>
+  <qemu:commandline>
+    <qemu:arg value='-cpu'/>
+    <qemu:arg value='host'/>
+    <qemu:arg value='-object'/>
+    <qemu:arg value='memory-backend-file,id=mem,size=4096M,mem-path=/run/hugepages/kvm,share=on'/>
+    <qemu:arg value='-numa'/>
+    <qemu:arg value='node,memdev=mem'/>
+    <qemu:arg value='-mem-prealloc'/>
+    <qemu:arg value='-chardev'/>
+    <qemu:arg value='socket,id=chr0,path=/tmp/sock0,server'/>
+    <qemu:arg value='-device'/>
+    <qemu:arg value='virtio-net-pci,netdev=vhost-net0,mac=52:54:00:12:34:56'/>
+    <qemu:arg value='-netdev'/>
+    <qemu:arg value='vhost-user,id=vhost-net0,chardev=chr0,vhostforce'/>
+    <qemu:arg value='-chardev'/>
+    <qemu:arg value='socket,id=chr1,path=/tmp/sock1,server'/>
+    <qemu:arg value='-device'/>
+    <qemu:arg value='virtio-net-pci,netdev=vhost-net1,mac=52:54:00:12:34:57'/>
+    <qemu:arg value='-netdev'/>
+    <qemu:arg value='vhost-user,id=vhost-net1,chardev=chr1,vhostforce'/>
+  </qemu:commandline>
+</domain>
\ No newline at end of file
-- 
2.17.1


  parent reply	other threads:[~2020-03-03  9:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27  9:44 [spp] [PATCH 0/8] Update docs and rcps x-fn-spp-ml
2020-02-27  9:44 ` [spp] [PATCH 1/8] recipes: add vhost related rcps for spp_nfv x-fn-spp-ml
2020-02-27  9:44 ` [spp] [PATCH 2/8] recipes: fix rcps for setting up spp_vf x-fn-spp-ml
2020-02-27  9:44 ` [spp] [PATCH 3/8] recipes: fix typos " x-fn-spp-ml
2020-02-27  9:44 ` [spp] [PATCH 4/8] recipes: fix rcps for shutting down spp_vf x-fn-spp-ml
2020-02-27  9:44 ` [spp] [PATCH 5/8] recipes: add rcps for spp_mirror x-fn-spp-ml
2020-02-27  9:44 ` [spp] [PATCH 6/8] recipes: add rcps for multiple_nodes x-fn-spp-ml
2020-02-27  9:44 ` [spp] [PATCH 7/8] docs: adds sample Domain XML file for vhost x-fn-spp-ml
2020-02-27  9:44 ` [spp] [PATCH 8/8] docs: fix incorrect commands in usecases x-fn-spp-ml
2020-02-28  8:49 ` [spp] [PATCH 0/8] Update docs and rcps Yasufumi Ogawa
2020-03-03  9:25 ` [spp] [PATCH v2 " x-fn-spp-ml
2020-03-05  1:26   ` Yasufumi Ogawa
2020-03-03  9:25 ` [spp] [PATCH v2 1/8] recipes: add vhost related rcps for spp_nfv x-fn-spp-ml
2020-03-03  9:25 ` [spp] [PATCH v2 2/8] recipes: fix rcps for setting up spp_vf x-fn-spp-ml
2020-03-03  9:25 ` [spp] [PATCH v2 3/8] recipes: fix typos " x-fn-spp-ml
2020-03-03  9:25 ` [spp] [PATCH v2 4/8] recipes: fix rcps for shutting down spp_vf x-fn-spp-ml
2020-03-03  9:25 ` [spp] [PATCH v2 5/8] recipes: add rcps for spp_mirror x-fn-spp-ml
2020-03-03  9:25 ` [spp] [PATCH v2 6/8] recipes: add rcps for multiple_nodes x-fn-spp-ml
2020-03-03  9:25 ` x-fn-spp-ml [this message]
2020-03-03  9:25 ` [spp] [PATCH v2 8/8] docs: fix incorrect commands in usecases x-fn-spp-ml

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=20200303092521.22882-8-x-fn-spp-ml@ntt-tx.co.jp \
    --to=x-fn-spp-ml@ntt-tx.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    --cc=yasufum.o@gmail.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).