Merge "For linux bond over VFs, disable spoofcheck by default"

This commit is contained in:
Zuul 2022-01-31 11:08:14 +00:00 committed by Gerrit Code Review
commit f97f3f1102
4 changed files with 9 additions and 9 deletions

View File

@ -106,7 +106,7 @@
"qos": 5,
"min_tx_rate": 0,
"max_tx_rate": 0,
"spoofcheck": true,
"spoofcheck": false,
"trust": true,
"promisc": false,
"primary": true,
@ -119,7 +119,7 @@
"qos": 5,
"min_tx_rate": 0,
"max_tx_rate": 0,
"spoofcheck": true,
"spoofcheck": false,
"trust": true,
"promisc": false
}

View File

@ -138,8 +138,8 @@ network_config:
vfid: 3
vlan_id: 113
qos: 5
# For linux_bond, the default value is true
spoofcheck: true
# For linux_bond, the default value is false
spoofcheck: false
# For linux_bond, the default value is true
trust: true
# For linux_bond, the default value is false
@ -151,6 +151,6 @@ network_config:
vfid: 3
vlan_id: 113
qos: 5
spoofcheck: true
spoofcheck: false
trust: true
promisc: false

View File

@ -1020,9 +1020,9 @@ class LinuxBond(_BaseOpts):
% (iface.device, iface.vfid))
iface.trust = 'on'
if iface.spoofcheck is None:
logger.info("Spoofcheck is not set for VF %s:%d, defaulting to on"
logger.info("Spoofcheck is not set for VF %s:%d, defaulting to off"
% (iface.device, iface.vfid))
iface.spoofcheck = 'on'
iface.spoofcheck = 'off'
if iface.promisc is None:
logger.info("Promisc is not set for VF %s:%d, defaulting to off"
% (iface.device, iface.vfid))

View File

@ -1255,14 +1255,14 @@ class TestLinuxBond(base.TestCase):
'vlan_id': 111, 'qos': 1,
'min_tx_rate': 0, 'max_tx_rate': 10,
'pci_address': '0000:79:10.1',
'spoofcheck': 'on', 'trust': 'on',
'spoofcheck': 'off', 'trust': 'on',
'promisc': 'off'},
{'device_type': 'vf', 'name': 'em2_1',
'device': {'name': 'em2', 'vfid': 1},
'vlan_id': 111, 'qos': 1,
'min_tx_rate': 0, 'max_tx_rate': 10,
'pci_address': '0000:79:10.2',
'spoofcheck': 'on', 'trust': 'on',
'spoofcheck': 'off', 'trust': 'on',
'promisc': 'off'}]
def test_get_vf_devname(device, vfid):