diff options
author | Tibor Frank <tifrank@cisco.com> | 2018-03-20 09:54:09 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2018-03-20 14:48:33 +0100 |
commit | 491d727115e757aa2d5a7df8048fe17b5ceb16ce (patch) | |
tree | efa4b1777dd1c51976cfbd32f8f5898227d625d1 /resources/libraries/python/QemuUtils.py | |
parent | 0cf1f0204e326cf93e36b344e2efd3cfa2f82870 (diff) |
Add max-pkt-len parameter to dpdk testpmd start
Change-Id: I114c187f007c10223502669c2ba85c63d09cd84a
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/QemuUtils.py')
-rw-r--r-- | resources/libraries/python/QemuUtils.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py index aa45ce08ef..a8c26d6898 100644 --- a/resources/libraries/python/QemuUtils.py +++ b/resources/libraries/python/QemuUtils.py @@ -192,16 +192,19 @@ class QemuUtils(object): arch = Topology.get_node_arch(node) self._qemu_bin = 'qemu-system-{arch}'.format(arch=arch) - def qemu_add_vhost_user_if(self, socket, server=True, mac=None): + def qemu_add_vhost_user_if(self, socket, server=True, mac=None, + jumbo_frames=False): """Add Vhost-user interface. :param socket: Path of the unix socket. :param server: If True the socket shall be a listening socket. :param mac: Vhost-user interface MAC address (optional, otherwise is - used auto-generated MAC 52:54:00:00:xx:yy). + used auto-generated MAC 52:54:00:00:xx:yy). + :param jumbo_frames: Set True if jumbo frames are used in the test. :type socket: str :type server: bool :type mac: str + :type jumbo_frames: bool """ self._vhost_id += 1 # Create unix socket character device. @@ -221,7 +224,11 @@ class QemuUtils(object): mac = '52:54:00:00:{0:02x}:{1:02x}'.\ format(self._qemu_id, self._vhost_id) extend_options = 'mq=on,csum=off,gso=off,guest_tso4=off,'\ - 'guest_tso6=off,guest_ecn=off,mrg_rxbuf=off' + 'guest_tso6=off,guest_ecn=off' + if jumbo_frames: + extend_options += ",mrg_rxbuf=on" + else: + extend_options += ",mrg_rxbuf=off" # Create Virtio network device. device = ' -device virtio-net-pci,netdev=vhost{0},mac={1},{2}'.format( self._vhost_id, mac, extend_options) |