[dts] [PATCH] tests cloud_filter: add missed vlan setting
Marvin Liu
yong.liu at intel.com
Sat May 21 00:01:37 CEST 2016
Add missed ivlan rule setting for ethtool. Without this setting, even
wrong vlan packet will be directed to expected queue.
Signed-off-by: Marvin Liu <yong.liu at intel.com>
diff --git a/tests/TestSuite_cloud_filter.py b/tests/TestSuite_cloud_filter.py
index 6480bbe..8c4be53 100644
--- a/tests/TestSuite_cloud_filter.py
+++ b/tests/TestSuite_cloud_filter.py
@@ -96,6 +96,10 @@ class CloudFilterConfig(object):
ether_fmt = "ethtool -N %(PF)s flow-type ether dst %(OMAC)s m " + \
"%(OMASK)s src %(IMAC)s m %(IMASK)s user-def %(VNI_VF)s " + \
"action %(QUEUE)d loc %(ID)d"
+ ether_vlan_fmt = "ethtool -N %(PF)s flow-type ether dst %(OMAC)s m " + \
+ "%(OMASK)s src %(IMAC)s m %(IMASK)s vlan %(VLAN)d " + \
+ "user-def %(VNI_VF)s action %(QUEUE)d loc %(ID)d"
+
# generate user define field
vni_vf = '0x'
@@ -130,6 +134,16 @@ class CloudFilterConfig(object):
'VNI_VF': vni_vf,
'QUEUE': self.cf_rule['queue'],
'ID': self.rule_idx}
+ elif 'ivlan' in self.cf_rule:
+ ethtool_cmd = ether_vlan_fmt % {'PF': self.pf_intf,
+ 'OMAC': omac_str,
+ 'OMASK': omac_mask,
+ 'IMAC': imac_str,
+ 'IMASK': imac_mask,
+ 'VLAN': self.cf_rule['ivlan'],
+ 'VNI_VF': vni_vf,
+ 'QUEUE': self.cf_rule['queue'],
+ 'ID': self.rule_idx}
else:
ethtool_cmd = ether_fmt % {'PF': self.pf_intf,
'OMAC': omac_str,
--
1.9.3
More information about the dts
mailing list