From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id ABA33C372 for ; Sat, 21 May 2016 00:01:44 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 20 May 2016 15:01:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,341,1459839600"; d="scan'208";a="985592136" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 20 May 2016 15:01:42 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u4KM1f3q026535; Sat, 21 May 2016 06:01:41 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u4KM1cik004338; Sat, 21 May 2016 06:01:40 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u4KM1cDH004334; Sat, 21 May 2016 06:01:38 +0800 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Sat, 21 May 2016 06:01:37 +0800 Message-Id: <1463781697-4302-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] tests cloud_filter: add missed vlan setting X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2016 22:01:45 -0000 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 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