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 EB1C1A00E6 for ; Wed, 17 Apr 2019 06:53:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB9501B5A5; Wed, 17 Apr 2019 06:53:46 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 8127C1DBF for ; Wed, 17 Apr 2019 06:53:45 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3H4rUBu026201 for ; Tue, 16 Apr 2019 21:53:44 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=TD6FtDLK2RgZTETU8zvSO2A0BNfCUg84sZ48Hq9SHyI=; b=MUNfxQsM+Un1hHJ8ouXiMc1tbjrn8Vz3irdqcDsvu3YMu329aCPascUAS/S+iOCqZKXl +vpF3531/ZSP4kLyXEeiaZy67XCt+Tvlvl6wTpOpXxywko+TWcifX/6cjdrP8WO/HYoA opIQwf3ii44m7ungRf3Q9rRxZVD2KOFCRL5Vgr6TDNKYP4GFnsptfInOGdyYrfgXBvBp d9OH1W3nRTn7O5h1J3+spot+J6HHiBpoxXedUuJess2XEF389+h7K6jrL+gaofTcP8ax g3sX+Q1WD95LqUNKICfrK4wCn701uW6cRJ314DDs1rz7KAsq0L2e/Yms1oBHG1oPE1cH 0Q== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 2rvyspedp1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 16 Apr 2019 21:53:44 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 16 Apr 2019 21:53:43 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 16 Apr 2019 21:53:43 -0700 Received: from cavium.marvell.com (unknown [10.28.10.219]) by maili.marvell.com (Postfix) with ESMTP id 2B3E43F703F; Tue, 16 Apr 2019 21:53:41 -0700 (PDT) From: To: CC: , usurekha Date: Wed, 17 Apr 2019 10:22:26 +0530 Message-ID: <1555476746-28209-1-git-send-email-usurekha@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-17_02:, , signatures=0 Subject: [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" From: usurekha Added rte_flows api to create ethertype filter rule, as cavium_a063 won't support default Intel specific filters. Signed-off-by: usurekha --- tests/TestSuite_generic_filter.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) 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): self.verify(self.nic in ["niantic", "kawela_4", "bartonhills", "powerville", "fortville_eagle", "fortville_spirit", - "fortville_spirit_single", "fortpark_TLV", "fortville_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=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1" % portMask) self.port_config() self.ethertype_filter = "on" ethertype = "0x0806" - self.dut.send_expect( - "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethertype %s fwd queue 2" % - (valports[0], ethertype), "testpmd> ") + + if self.nic == "cavium_a063": + self.dut.send_expect( + "flow create %s ingress pattern eth type is %s / end actions 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 ethertype %s fwd queue 2" % + (valports[0], ethertype), "testpmd> ") self.dut.send_expect("start", "testpmd> ", 120) self.filter_send_packet("arp") @@ -396,10 +402,12 @@ class TestGeneric_filter(TestCase): out = self.dut.send_expect("stop", "testpmd> ") self.dut.send_expect("clear port stats all", "testpmd> ") self.verify_result(out, tx_pkts="1", expect_queue="2") - - self.dut.send_expect( - "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertype %s fwd queue 2" % - (valports[0], ethertype), "testpmd> ") + if self.nic == "cavium_a063": + self.dut.send_expect("flow flush %s" % (valports[0]), "testpmd> ") + else: + self.dut.send_expect( + "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertype %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): def test_twotuple_filter(self): - if self.nic in ["powerville", "bartonhills"]: + if self.nic in ["powerville", "bartonhills", "cavium_a063"]: self.pmdout.start_testpmd( "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1" % portMask) self.port_config() @@ -526,7 +534,7 @@ class TestGeneric_filter(TestCase): self.verify(False, "%s nic not support two tuple filter" % self.nic) def test_flex_filter(self): - self.verify(self.nic in ["powerville", "bartonhills"], '%s not support flex filter' % self.nic) + self.verify(self.nic in ["powerville", "bartonhills", "cavium_a063"], '%s not support flex filter' % self.nic) masks = ['000C', '000C'] self.pmdout.start_testpmd( -- 2.7.4