From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 173255A32 for ; Mon, 23 May 2016 22:48:49 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 23 May 2016 13:48:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,357,1459839600"; d="scan'208";a="972967835" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 23 May 2016 13:48:48 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 23 May 2016 13:48:48 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 23 May 2016 13:48:48 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.58]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.148]) with mapi id 14.03.0248.002; Tue, 24 May 2016 04:48:46 +0800 From: "Liu, Yong" To: "dts@dpdk.org" Thread-Topic: [dts][PATCH] tests cloud_filter: add missed vlan setting Thread-Index: AQHRsuM4W+Hk1EMDh0ejspDazVuaEJ/HAylw Date: Mon, 23 May 2016 20:48:46 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E2221B8A5@SHSMSX103.ccr.corp.intel.com> References: <1463781697-4302-1-git-send-email-yong.liu@intel.com> In-Reply-To: <1463781697-4302-1-git-send-email-yong.liu@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTI0NTk0NDUtNjM4Ny00ZjBkLWIwZTUtNzI1YmZiZWQ2NjlkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImErUTVxTW90d1F0OTh5TVgyaEQ1Y3RTbzB4b0UrK0hrMGFXdWpnTitwU2M9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Mon, 23 May 2016 20:48:50 -0000 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 >=20 > Add missed ivlan rule setting for ethtool. Without this setting, even > wrong vlan packet will be directed to expected queue. >=20 > Signed-off-by: Marvin Liu >=20 > 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 =3D "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 =3D "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" > + >=20 > # generate user define field > vni_vf =3D '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 =3D 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 =3D ether_fmt % {'PF': self.pf_intf, > 'OMAC': omac_str, > -- > 1.9.3