test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests cloud_filter: add missed vlan setting
@ 2016-05-20 22:01 Marvin Liu
  2016-05-23 20:48 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Marvin Liu @ 2016-05-20 22:01 UTC (permalink / raw)
  To: dts; +Cc: Marvin Liu

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH] tests cloud_filter: add missed vlan setting
  2016-05-20 22:01 [dts] [PATCH] tests cloud_filter: add missed vlan setting Marvin Liu
@ 2016-05-23 20:48 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2016-05-23 20:48 UTC (permalink / raw)
  To: dts

Applied.

> -----Original Message-----
> From: Liu, Yong
> Sent: Friday, May 20, 2016 3:02 PM
> To: dts@dpdk.org
> Cc: Liu, Yong
> Subject: [dts][PATCH] tests cloud_filter: add missed vlan setting
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-23 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-20 22:01 [dts] [PATCH] tests cloud_filter: add missed vlan setting Marvin Liu
2016-05-23 20:48 ` Liu, Yong

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).