From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 69508A00E6 for ; Fri, 19 Apr 2019 01:36:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 57CB51BA42; Fri, 19 Apr 2019 01:36:26 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 13EB01B111 for ; Fri, 19 Apr 2019 01:36:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 16:36:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,367,1549958400"; d="scan'208";a="132581157" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 18 Apr 2019 16:36:22 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 18 Apr 2019 16:36:22 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.25]) with mapi id 14.03.0415.000; Fri, 19 Apr 2019 07:36:20 +0800 From: "Tu, Lijuan" To: "usurekha@marvell.com" , "dts@dpdk.org" CC: "fmasood@marvell.com" Thread-Topic: [dts] [PATCH] generic_filter: Added rte_flows api to create ethertype filter rule for cavium_a063. Thread-Index: AQHU9NnElxU6AIlrX0yvV4YSJHUT0KZClVDw Date: Thu, 18 Apr 2019 23:36:20 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA63DFB@SHSMSX101.ccr.corp.intel.com> References: <1555476746-28209-1-git-send-email-usurekha@marvell.com> In-Reply-To: <1555476746-28209-1-git-send-email-usurekha@marvell.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2EzZWRhNmMtMmRkNy00NGZkLThjOTEtM2FkMGZmZjI0YzM0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQWRVeTVoRXd5NENmY0dZd0RBQzN2aTRVbWhRaSt5TkM0a2c1NFZyQ0JUMVFoYUdHSVRJa0haTGRnYzNrS0lyUiJ9 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] generic_filter: Added rte_flows api to create ethertype filter rule for cavium_a063. 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of > usurekha@marvell.com > Sent: Tuesday, April 16, 2019 9:52 PM > To: dts@dpdk.org > Cc: fmasood@marvell.com; usurekha > Subject: [dts] [PATCH] generic_filter: Added rte_flows api to create ethe= rtype > filter rule for cavium_a063. >=20 > From: usurekha >=20 > Added rte_flows api to create ethertype filter rule, as cavium_a063 won't > support default Intel specific filters. >=20 > Signed-off-by: usurekha > --- > tests/TestSuite_generic_filter.py | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) >=20 > diff --git a/tests/TestSuite_generic_filter.py > b/tests/TestSuite_generic_filter.py > index d2793ab..e7f480b 100644 > --- a/tests/TestSuite_generic_filter.py > +++ b/tests/TestSuite_generic_filter.py > @@ -372,15 +372,21 @@ class TestGeneric_filter(TestCase): >=20 > self.verify(self.nic in ["niantic", "kawela_4", "bartonhills", > "powerville", "fortville_eagle", "fortville_s= pirit", > - "fortville_spirit_single", "fortpark_TLV", "f= ortville_25g"], "%s > nic not support syn filter" % self.nic) > + "fortville_spirit_single", "fortpark_TLV", > + "fortville_25g","cavium_a063"], "%s nic not support syn filter" % > + self.nic) > self.pmdout.start_testpmd( > "%s" % self.cores, "--disable-rss --rxq=3D4 --txq=3D4 --port= mask=3D%s --nb- > cores=3D4 --nb-ports=3D1" % portMask) > self.port_config() > self.ethertype_filter =3D "on" > ethertype =3D "0x0806" > - self.dut.send_expect( > - "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethertyp= e %s > fwd queue 2" % > - (valports[0], ethertype), "testpmd> ") > + > + if self.nic =3D=3D "cavium_a063": > + self.dut.send_expect( > + "flow create %s ingress pattern eth type is %s / end act= ions queue > index 2 / end"% > + (valports[0], ethertype), "testpmd> ") > + else: > + self.dut.send_expect( > + "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethe= rtype %s > fwd queue 2" % > + (valports[0], ethertype), "testpmd> ") > self.dut.send_expect("start", "testpmd> ", 120) >=20 > self.filter_send_packet("arp") > @@ -396,10 +402,12 @@ class TestGeneric_filter(TestCase): > out =3D self.dut.send_expect("stop", "testpmd> ") > self.dut.send_expect("clear port stats all", "testpmd> ") > self.verify_result(out, tx_pkts=3D"1", expect_queue=3D"2") > - > - self.dut.send_expect( > - "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertyp= e %s fwd > queue 2" % > - (valports[0], ethertype), "testpmd> ") > + if self.nic =3D=3D "cavium_a063": > + self.dut.send_expect("flow flush %s" % (valports[0]), "testp= md> ") > + else: > + self.dut.send_expect( > + "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethe= rtype %s > fwd queue 2" % > + (valports[0], ethertype), "testpmd> ") > self.dut.send_expect("start", "testpmd> ", 120) > self.filter_send_packet("arp") > time.sleep(2) > @@ -493,7 +501,7 @@ class TestGeneric_filter(TestCase): >=20 > def test_twotuple_filter(self): >=20 > - if self.nic in ["powerville", "bartonhills"]: > + if self.nic in ["powerville", "bartonhills", "cavium_a063"]: > self.pmdout.start_testpmd( > "%s" % self.cores, "--disable-rss --rxq=3D4 --txq=3D4 --= portmask=3D%s --nb- > cores=3D4 --nb-ports=3D1" % portMask) > self.port_config() > @@ -526,7 +534,7 @@ class TestGeneric_filter(TestCase): > self.verify(False, "%s nic not support two tuple filter" % s= elf.nic) >=20 > def test_flex_filter(self): > - self.verify(self.nic in ["powerville", "bartonhills"], '%s not s= upport flex > filter' % self.nic) > + self.verify(self.nic in ["powerville", "bartonhills", > + "cavium_a063"], '%s not support flex filter' % self.nic) >=20 > masks =3D ['000C', '000C'] > self.pmdout.start_testpmd( > -- > 2.7.4