From: Marvin Liu <yong.liu@intel.com>
To: dts@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dts] [PATCH] tests cloud_filter: add missed vlan setting
Date: Sat, 21 May 2016 06:01:37 +0800 [thread overview]
Message-ID: <1463781697-4302-1-git-send-email-yong.liu@intel.com> (raw)
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@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
next reply other threads:[~2016-05-20 22:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 22:01 Marvin Liu [this message]
2016-05-23 20:48 ` Liu, Yong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463781697-4302-1-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).