aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/04_vnf.conf6
-rw-r--r--vnfs/qemu/qemu_dpdk_vhost_user.py9
2 files changed, 13 insertions, 2 deletions
diff --git a/conf/04_vnf.conf b/conf/04_vnf.conf
index 2e86b358..ac5559a2 100644
--- a/conf/04_vnf.conf
+++ b/conf/04_vnf.conf
@@ -140,11 +140,15 @@ GUEST_CORE_BINDING = [('#EVAL(6+2*#VMINDEX)', '#EVAL(7+2*#VMINDEX)')]
# using Vanilla OVS without enabling switch multi-queue.
GUEST_NIC_QUEUES = [0]
+# Disable VHost user guest NIC merge buffers by enabling the below setting. This
+# can improve performance when not using Jumbo Frames.
+GUEST_NIC_MERGE_BUFFERS_DISABLE = [True]
+
# Virtio-Net vhost thread CPU mapping. If using vanilla OVS with virtio-net,
# you can affinitize the vhost-net threads by enabling the below setting. There
# is one vhost-net thread per port per queue so one guest with 2 queues will
# have 4 vhost-net threads. If more threads are present than CPUs given, the
-# affinitize will overlap CPUs.
+# affinitize will overlap CPUs in a round robin fashion.
VSWITCH_VHOST_NET_AFFINITIZATION = False
VSWITCH_VHOST_CPU_MAP = [4,5,8,11]
diff --git a/vnfs/qemu/qemu_dpdk_vhost_user.py b/vnfs/qemu/qemu_dpdk_vhost_user.py
index fc46aba1..794a4772 100644
--- a/vnfs/qemu/qemu_dpdk_vhost_user.py
+++ b/vnfs/qemu/qemu_dpdk_vhost_user.py
@@ -39,6 +39,12 @@ class QemuDpdkVhostUser(IVnfQemu):
else:
queue_str, mq_vector_str = '', ''
+ # Guest merge buffer setting
+ if S.getValue('GUEST_NIC_MERGE_BUFFERS_DISABLE')[self._number]:
+ merge_buff = 'mrg_rxbuf=off,'
+ else:
+ merge_buff = ''
+
# calculate index of first interface, i.e. check how many
# interfaces has been created for previous VMs, where 1st NIC
# of 1st VM has index 0
@@ -60,7 +66,8 @@ class QemuDpdkVhostUser(IVnfQemu):
'-device',
'virtio-net-pci,mac=' +
self._nics[nic]['mac'] +
- ',netdev=' + net + ',csum=off,gso=off,' +
+ ',netdev=' + net + ',csum=off,' + merge_buff +
+ 'gso=off,' +
'guest_tso4=off,guest_tso6=off,guest_ecn=off' +
mq_vector_str,
]