Configure mtu value for DPDK port
MTU value is already written to ifcfg file if provided on the interface, but for dpdk port, we have to apply this to ovs-vsctl command via ovs_extra. This patch is adding the support to configure the given mtu vlaue to the dpdk port using ovs_extra. implements: blueprint ovs-2-6-features-dpdk Change-Id: Ic01ed8cee2edbd648de0b64dc7f01da80c153d81
This commit is contained in:
parent
9d27aece86
commit
e5cf068ad1
|
@ -7,6 +7,7 @@
|
|||
"type": "ovs_dpdk_port",
|
||||
"name": "dpdk0",
|
||||
"driver": "igb_uio",
|
||||
"mtu": 8192,
|
||||
"members": [
|
||||
{
|
||||
"type": "interface",
|
||||
|
|
|
@ -14,6 +14,8 @@ network_config:
|
|||
name: dpdk0
|
||||
# driver is optional argument, default driver is 'vfio-pci'
|
||||
driver: igb_uio
|
||||
# MTU is optional, used for jumbo frames
|
||||
mtu: 8192
|
||||
members:
|
||||
- type: interface
|
||||
name: nic2
|
||||
|
|
|
@ -299,6 +299,8 @@ class IfcfgNetConfig(os_net_config.NetConfig):
|
|||
data += "DEVICETYPE=ovs\n"
|
||||
data += "TYPE=OVSDPDKPort\n"
|
||||
data += "OVS_BRIDGE=%s\n" % base_opt.bridge_name
|
||||
if base_opt.mtu:
|
||||
ovs_extra.append("set Interface $DEVICE mtu_request=$MTU")
|
||||
elif isinstance(base_opt, objects.OvsDpdkBond):
|
||||
ovs_extra.extend(base_opt.ovs_extra)
|
||||
# Referring to bug:1643026, the below commenting of the interfaces,
|
||||
|
|
|
@ -885,7 +885,8 @@ DNS2=5.6.7.8
|
|||
self.stubbed_mapped_nics = nic_mapping
|
||||
|
||||
interface = objects.Interface(name='nic3')
|
||||
dpdk_port = objects.OvsDpdkPort(name='dpdk0', members=[interface])
|
||||
dpdk_port = objects.OvsDpdkPort(name='dpdk0', members=[interface],
|
||||
mtu=9000)
|
||||
bridge = objects.OvsUserBridge('br-link', members=[dpdk_port])
|
||||
|
||||
def test_bind_dpdk_interfaces(ifname, driver, noop):
|
||||
|
@ -914,6 +915,8 @@ PEERDNS=no
|
|||
DEVICETYPE=ovs
|
||||
TYPE=OVSDPDKPort
|
||||
OVS_BRIDGE=br-link
|
||||
MTU=9000
|
||||
OVS_EXTRA="set Interface $DEVICE mtu_request=$MTU"
|
||||
"""
|
||||
self.assertEqual(br_link_config,
|
||||
self.provider.bridge_data['br-link'])
|
||||
|
|
Loading…
Reference in New Issue