test suite reviews and discussions
 help / color / mirror / Atom feed
* Re: [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter
  2021-11-08 13:58 ` [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter Yan Xia
@ 2021-11-08  6:48   ` Peng, Yuan
  2021-11-08 15:48   ` Tu, Lijuan
  1 sibling, 0 replies; 6+ messages in thread
From: Peng, Yuan @ 2021-11-08  6:48 UTC (permalink / raw)
  To: Xia, YanX, dts; +Cc: Xia, YanX

Acked-by Peng, Yuan <yuan.peng@intel.com>

-----Original Message-----
From: dts <dts-bounces@dpdk.org> On Behalf Of Yan Xia
Sent: Monday, November 8, 2021 9:59 PM
To: dts@dpdk.org
Cc: Xia, YanX <yanx.xia@intel.com>
Subject: [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter

delete generic_filter because of these types of filter removed, related dpdk commit-id:
ae42875d6 ethdev: remove legacy SYN filter type support
92067db05 ethdev: remove legacy N-tuple filter type support 2be70bcdb ethdev: remove legacy flexible filter type support 35b1c68af ethdev: remove legacy EtherType filter type support

Signed-off-by: Yan Xia <yanx.xia@intel.com>
---
 test_plans/index.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test_plans/index.rst b/test_plans/index.rst index e3511caa..0c2a94d0 100644
--- a/test_plans/index.rst
+++ b/test_plans/index.rst
@@ -89,7 +89,6 @@ The following are the test plans for the DPDK DTS automated test system.
     flow_classify_softnic_test_plan
     fortville_rss_granularity_config_test_plan
     fortville_rss_input_test_plan
-    generic_filter_test_plan
     generic_flow_api_test_plan
     hotplug_mp_test_plan
     hotplug_test_plan
--
2.33.1


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

* [dts] [PATCH V1 0/3] *** delete generic_filter ***
@ 2021-11-08 13:58 Yan Xia
  2021-11-08 13:58 ` [dts] [PATCH V1 1/3] test_plan/generic_filter: delete generic_filter_test_plan Yan Xia
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yan Xia @ 2021-11-08 13:58 UTC (permalink / raw)
  To: dts; +Cc: Yan Xia

*** delete generic_filter because of these types of filter removed,
related dpdk commit-id:
ae42875d6 ethdev: remove legacy SYN filter type support
92067db05 ethdev: remove legacy N-tuple filter type support
2be70bcdb ethdev: remove legacy flexible filter type support
35b1c68af ethdev: remove legacy EtherType filter type support ***

Yan Xia (3):
  test_plan/generic_filter: delete generic_filter_test_plan
  tests/generic_filter: delete testsuite generic_filter
  test_plans/index.rst: delete generic_filter

 test_plans/generic_filter_test_plan.rst | 398 -----------------
 test_plans/index.rst                    |   1 -
 tests/TestSuite_generic_filter.py       | 558 ------------------------
 3 files changed, 957 deletions(-)
 delete mode 100644 test_plans/generic_filter_test_plan.rst
 delete mode 100644 tests/TestSuite_generic_filter.py

-- 
2.33.1


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

* [dts] [PATCH V1 1/3] test_plan/generic_filter: delete generic_filter_test_plan
  2021-11-08 13:58 [dts] [PATCH V1 0/3] *** delete generic_filter *** Yan Xia
@ 2021-11-08 13:58 ` Yan Xia
  2021-11-08 13:58 ` [dts] [PATCH V1 2/3] tests/generic_filter: delete testsuite generic_filter Yan Xia
  2021-11-08 13:58 ` [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter Yan Xia
  2 siblings, 0 replies; 6+ messages in thread
From: Yan Xia @ 2021-11-08 13:58 UTC (permalink / raw)
  To: dts; +Cc: Yan Xia

delete generic_filter because of these types of filter removed,
related dpdk commit-id:
ae42875d6 ethdev: remove legacy SYN filter type support
92067db05 ethdev: remove legacy N-tuple filter type support
2be70bcdb ethdev: remove legacy flexible filter type support
35b1c68af ethdev: remove legacy EtherType filter type support

Signed-off-by: Yan Xia <yanx.xia@intel.com>
---
 test_plans/generic_filter_test_plan.rst | 398 ------------------------
 1 file changed, 398 deletions(-)
 delete mode 100644 test_plans/generic_filter_test_plan.rst

diff --git a/test_plans/generic_filter_test_plan.rst b/test_plans/generic_filter_test_plan.rst
deleted file mode 100644
index e35d0381..00000000
--- a/test_plans/generic_filter_test_plan.rst
+++ /dev/null
@@ -1,398 +0,0 @@
-.. Copyright (c) <2015-2017>, Intel Corporation
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   - Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-
-   - Neither the name of Intel Corporation nor the names of its
-     contributors may be used to endorse or promote products derived
-     from this software without specific prior written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-   OF THE POSSIBILITY OF SUCH DAMAGE.
-
-====================
-Generic Filter Tests
-====================
-
-
-Description
-===========
-
-This document provides the plan for testing the generic filter feature of
-10GbE and 1GbE Ethernet Controller.In `testpmd`, app provides Generic Filter
-API to manage filter rules for kinds of packets, and calls the API to manage
-HW filters in HW, or SW filters in SW table.
-
-* A generic filter provides an ability to identify specific flows or sets of
-  flows and routes them to dedicated queues.
-* Based on the Generic Filter mechanism, all the SYN packets are placed in an
-  assigned queue.
-* Based on the Generic Filter mechanism, all packets belonging to L3/L4 flows
-  to be placed in a specific HW queue.Each filter consists of a 5-tuple
-  (protocol, source and destination IP addresses, source and destination
-  TCP/UDP/SCTP port) and routes packets into one of the Rx queues
-* L2 Ethertype Filters provides an ability to identify packets by their L2
-  Ethertype and assigns them to receive queues.  `Testpmd` app is used to test
-  all types of HW filters. Case 1~9 are the function test for the above app
-  while case 11-12 are the performance test for Niantic, I350, 82580 and
-  82576.
-
-
-Prerequisites
-=============
-
-Assuming that ports ``0`` and ``1`` are connected to a traffic generator's port ``A`` and ``B``.
-
-Setup for ``testpmd``
----------------------
-
-Launch the app ``testpmd`` with the following arguments::
-
-    ./testpmd -c fffff -n 4 -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=16 --nb-ports=2
-
-The -n command is used to select the number of memory channels. It should be
-matched with the number of memory channels on that setup. The value of rxq and
-txq is 1 by default, it's necessary to increase them, and make sure rxq and
-txq more than one. At the same time rss is enable by default, so disable
-it. Map port queues to statistic counter registers. Fortville not support this
-function::
-
-    testpmd>set stat_qmap rx 0 0 0
-    testpmd>set stat_qmap rx 0 1 1
-    testpmd>set stat_qmap rx 0 2 2
-    testpmd>set stat_qmap rx 0 3 3
-
-Setup for receive all packet and disable vlan strip function::
-
-    testpmd>vlan set strip off 0
-    testpmd>vlan set strip off 1
-    testpmd>vlan set filter off 0
-    testpmd>vlan set filter off 1
-    testpmd>set flush_rx on
-
-
-Test Case 1:     SYN filter
-===========================
-
-SYN filters might routes TCP packets with their SYN flag set into an assigned
-queue.  By filtering such packets to an assigned queue, security software can
-monitor and act on SYN attacks.
-
-Enable SYN filters with queue 2 on port 0::
-
-     testpmd> syn_filter 0 add priority high queue 2
-
-Then setup for receive::
-
-    testpmd> start
-
-Configure the traffic generator to send 5 SYN packets and 5 non-SYN packets .
-Reading the stats for port 0 after sending packets::
-
-     testpmd> stop
-
-Verify that the packets are received (RX-packets incremented)on the queue 2.
-Set off SYN filter::
-
-    testpmd>syn_filter 0 del priority high queue 2
-    testpmd>start
-
-Send 5 SYN packets, then reading the stats for port 0 after sending packets::
-
-    testpmd> stop
-
-Verify that the packets are not received (RX-packets do not increased)on the queue 2 and syn filter is removed.
-
-
-Test Case 2:      5-tuple Filter
-===================================================================
-
-This filter identifies specific L3/L4 flows or sets of L3/L4 flows and routes
-them to dedicated queues. Each filter consists of a 5-tuple (protocol, source
-and destination IP addresses, source and destination TCP/UDP/SCTP port) and
-routes packets into one of the Rx queues.  The 5-tuple filters are configured
-via `dst_ip`, `src_ip`, `dst_port`, `src_port`, `protocol` and Mask.This case
-supports two type NIC(niantic, 82576), and their command line are
-different. niantic and 82576 register are different, for niantic TCP flags not
-need config,so used 0, 82576 must config tcp flags, the tcp flags means the
-package is a SYN package.  Enable the 5-tuple Filter with queue 3 on port 0
-for niantic::
-
-    testpmd> 5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue 3
-
-Enable the  5-tuple Filter with queue 3 on port 0 for 82576::
-
-    testpmd> 5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f flags 0x02 priority 3 queue 3
-
-Then setup for receive::
-
-    testpmd> start
-
-If the NIC type is niantic, then send  different type packets such as (`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` = 1 `protocol` = tcp) and arp::
-
-    testpmd> stop
-
-Verify that the packets (`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1
-`src_port` = 1 `protocol` = tcp)or (`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4
-`dst_port` = 1 `src_port` = 1 `protocol` = tcp, `flags` = 0x2) are received
-(RX-packets doesn't incremented)on the queue 3.Remove L3/L4 5-tuple filter.
-Disable 5-tuple Filters::
-
-    testpmd> 5tuple_filter 0 del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f flags 0x02 priority 3 queue 3
-    testpmd> start
-
-Send packets(`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` =
-1 `protocol` = tcp) or (`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1
-`src_port` = 1 `protocol` = tcp `flags` = 0x2). Then reading the stats for
-port 0 after sending packets::
-
-    testpmd> stop
-
-Verify that the packets are not received (RX-packets do not increased)on the
-queue 3. A 5-bit field that masks each of the fields in the 5-tuple (L4
-protocol, IP addresses, TCP/UDP ports).  If 5-tuple fields are masked with 0x0
-(`mask` = 0x0), the filter will routes all the packets(ip) on the assigned
-queue.For instance, enable the 5-tuple Filters with queue 3 on port 0 for
-niantic. however, the value of mask is set 0x0::
-
-    testpmd> 5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol tcp mask 0x0 flags 0x0 priority 3 queue 3
-
-Test Case 3:     ethertype filter
-=================================
-
-Enable the receipt of  ARP packets with queue 2 on port 0::
-
-    testpmd> ethertype_filter 0 add ethertype 0x0806 priority disable 0 queue 2
-
-Then setup for receive::
-
-    testpmd> start
-
-Configure the traffic generator to send 15 ARP packets and 15 non ARP packets::
-
-    testpmd> stop
-
-Verify that the arp packets are received (RX-packets incremented)on the queue
-2 .  remove ethertype filter::
-
-    testpmd> ethertype_filter 0 del ethertype 0x0806 priority disable 0 queue 2
-    testpmd> start
-
-Configure the traffic generator to send  15 ARP packets.
-
-    testpmd> stop
-
-Also, you can change the value of priority to set a new filter except the case
-the value of ethertype is 0x0800 with priority enable .The rest of steps are
-same.
-
-For instance, enable priority filter(just support niantic)::
-
-    testpmd> ethertype_filter 0 add ethertype 0x0806 priority enable 1 queue 2
-
-Test Case 5:     2-tuple filter
-===============================
-
-This case is designed for NIC type:I350, 82580.  Enable the receipt of udp
-packets with queue 1 on port 0::
-
-    testpmd> 2tuple_filter 0 add protocol 0x11 1 dst_port 64 1 flags 0 priority 3 queue 1
-
-Then setup for receive::
-
-    testpmd> start
-
-Send 15 udp packets(`dst_port` = 15, `protocol` = udp) and 15 non udp
-packets. Reading the stats for port 0 after sending packets::
-
-    testpmd> stop
-
-Verify that the udp packets are received (RX-packets incremented)on the
-queue 1.  Remove 2tuple filter::
-
-    testpmd> 2tuple_filter 0 del protocol 0x11 1 dst_port 64 1 flags 0 priority 3 queue 1
-    testpmd> start
-
-Configure the traffic generator to send udp packets(`dst_port` = 15,
-`protocol` = udp).  Reading the stats for port 0 after sending packets::
-
-    testpmd> stop
-
-Verify that the packets are not received (RX-packets do not increased)on the
-queue 1.  Also, you can change the value of protocol or dstport or flags to
-set a new filter.the rest of steps are same. For example:
-
-Enable the receipt of  UDP packets with queue 1 on port 1::
-
-    testpmd> 2tuple_filter 1 add protocol 0x011 1 dst_port 64 1 flags 0 priority 3 queue 2
-
-Enable the receipt of  TCP packets with flags on queue 1 of port 1::
-
-    testpmd> 2tuple_filter 1 add protocol 0x06 1 dst_port 64 1 flags 0x3F priority 3 queue 3
-
-
-Test Case 6: flex filter
-========================
-
-This case is designed for NIC type:I350, 82576,82580.  Enable the receipt of
-packets(context) with queue 1 on port 0::
-
-    testpmd> flex_filter 0 add len 16 bytes 0x0123456789abcdef0000000008060000 mask 000C priority 3 queue 1
-
-If flex Filter is added successfully,  it displays::
-
-    bytes[0]:01 bytes[1]:23 bytes[2]:45 bytes[3]:67 bytes[4]:89 bytes[5]:ab bytes[6]:cd bytes[7]:ef bytes[8]:00 bytes[9]:00 bytes[10]:00 bytes[11]:00 bytes[12]:08 bytes[13]:06 bytes[14]:00 bytes[15]:00
-    mask[0]:00 mask[1]:0c
-
-Then setup for receive::
-
-    testpmd> start
-
-Configure the traffic generator to send packets(context) and arp packets.
-Reading the stats for port 0 after sending packets::
-
-    testpmd> stop
-
-Verify that the arp packets are received (RX-packets incremented)on the
-queue 1.  Remove flex filter::
-
-    testpmd> flex_filter 0 add len 16 bytes 0x0123456789abcdef0000000008060000 mask 000C priority 3 queue 1
-    testpmd> start
-
-Configure the traffic generator to send packets(context).Reading the stats for
-port 0 after sending packets::
-
-    testpmd> stop
-
-Verify that the packets are not received (RX-packets do not increased)on the
-queue 1. Also, you can change the value of length or context or mask to set a
-new filter.the rest of steps are same::
-
-    testpmd> flex_filter 0 add len 32 bytes 0x0123456789abcdef00000000080600000123456789abcdef0000000008060000 mask 000C000C priority 1 queue 2
-
-Test Case 7: priority filter
-============================
-
-This case is designed for NIC (niantic,I350, 82576 and 82580). If packets are
-match on different filters with same type, the filter with high priority will
-be receive packets. For example, packets are match on two five-tuple filters
-with different priority, the filter with high priority will be receive
-packets. if packets are match on different filters with different type,
-packets based on the above criteria and the following order.when syn set
-priority high, syn filter has highest priority than others filter. And flex
-filter has higher priority than 2-tuple filter.  If the Nic is niantic, enable
-the 5-tuple filter::
-
-    testpmd> 5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f flags 0x0 priority 2 queue 2
-    testpmd> 5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 2 src_port 2 protocol 0x06 mask 0x18 flags 0x0 priority 3 queue 3
-    testpmd> start
-
-Configure the traffic generator to send packets (`dst_ip` = 2.2.2.5 `src_ip` =
-2.2.2.4 `dst_port` = 1 `src_port` = 1 `protocol` = tcp).
-
-    testpmd> stop
-
-packets are received (RX-packets be increased)on the queue 2.  Remove the
-5tuple filter with high priority::
-
-    testpmd>5tuple_filter 0 del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f flags 0x0 priority 2 queue 2
-    testpmd> start
-
-Configure the traffic generator to send  packets (`dst_ip` = 2.2.2.5 `src_ip` = 2.2.2.4 `dst_port` = 1 `src_port` = 1 `protocol` = tcp)
-
-    testpmd> stop
-
-packets are received (RX-packets be increased)on the queue 3.  If the Nic is
-I350 or 82580, enable the 2-tuple and flex filters::
-
-    testpmd> flex_filter 0 add len 16 bytes 0x0123456789abcdef0000000008000000 mask 000C priority 2 queue 1
-    testpmd> 2tuple_filter 0 add protocol 0x11 1 dst_port 64 1 flags 0 priority 3 queue 2
-    testpmd> start
-
-Configure the traffic generator to send packets (`dst_ip` = 2.2.2.5 `src_ip` =
-2.2.2.4 `dst_port` = 64 `src_port` = 1 `protocol` = udp).
-
-    testpmd> stop
-
-packets are received (RX-packets be increased)on the queue 2.  Remove the
-2tuple filter with high priority::
-
-    testpmd> 2tuple_filter 0 add protocol 0x11 1 dst_port 64 1 flags 0 priority 3 queue 2
-    testpmd> start
-
-Configure the traffic generator to send packets (`dst_ip` = 2.2.2.5 `src_ip` =
-2.2.2.4 `dst_port` = 64 `src_port` = 1 `protocol` = udp),
-
-    testpmd> stop
-
-packets are received (RX-packets be increased)on the queue 1.  If the Nic is
-82576, enable the syn and 2-tuple filter::
-
-    testpmd>5tuple_filter 0 add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f flags 0x02 priority 3 queue 3
-    testpmd>syn_filter 0 add priority high queue 2
-    testpmd> start
-
-Configure the traffic generator to send packets (`dst_ip` = 2.2.2.5 `src_ip` =
-2.2.2.4 `dst_port` = 1 `src_port` = 1 `protocol` = tcp `flags` = "S").
-
-    testpmd>stop
-
-packets are received (RX-packets be increased)on the queue 2.  Remove the syn
-filter with high priority::
-
-    testpmd>syn_filter 0 del priority high queue 2
-    testpmd>start
-
-Configure the traffic generator to send packets (`dst_ip` = 2.2.2.5 `src_ip` =
-2.2.2.4 `dst_port` = 64 `src_port` = 1 `protocol` = tcp `flags` = "S").
-
-    testpmd> stop
-
-packets are received (RX-packets be increased)on the queue 3.
-
-
-Test Case 8: 1GB Multiple filters
-=================================
-
-This case is designed for NIC(I350, 82576,82580). Enable syn filter and
-ethertype filter on the port 0 at the same time.  Assigning different filters
-to different queues on port 0.Enable the filters::
-
-    testpmd> syn_filter 0 add priority high queue 1
-    testpmd> ethertype_filter 0 add ethertype 0x0806 priority disable 0 queue 3
-    testpmd> start
-
-Configure the traffic generator to send ethertype packets and arp packets::
-
-    testpmd> stop
-
-Then Verify that the packet are received on the queue 1,queue 3.  Remove all
-the filter::
-
-    testpmd> syn_filter 0 add priority high queue 1
-    testpmd> ethertype_filter 0 add ethertype 0x0806 priority disable 0 queue 3
-
-Configure the traffic generator to send udp packets and arp packets. Then
-Verify that the packet are not received on the queue 1 and queue 3::
-
-    testpmd> quit
-- 
2.33.1


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

* [dts] [PATCH V1 2/3] tests/generic_filter: delete testsuite generic_filter
  2021-11-08 13:58 [dts] [PATCH V1 0/3] *** delete generic_filter *** Yan Xia
  2021-11-08 13:58 ` [dts] [PATCH V1 1/3] test_plan/generic_filter: delete generic_filter_test_plan Yan Xia
@ 2021-11-08 13:58 ` Yan Xia
  2021-11-08 13:58 ` [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter Yan Xia
  2 siblings, 0 replies; 6+ messages in thread
From: Yan Xia @ 2021-11-08 13:58 UTC (permalink / raw)
  To: dts; +Cc: Yan Xia

delete generic_filter because of these types of filter removed,
related dpdk commit-id:
ae42875d6 ethdev: remove legacy SYN filter type support
92067db05 ethdev: remove legacy N-tuple filter type support
2be70bcdb ethdev: remove legacy flexible filter type support
35b1c68af ethdev: remove legacy EtherType filter type support

Signed-off-by: Yan Xia <yanx.xia@intel.com>
---
 tests/TestSuite_generic_filter.py | 558 ------------------------------
 1 file changed, 558 deletions(-)
 delete mode 100644 tests/TestSuite_generic_filter.py

diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py
deleted file mode 100644
index dc50f198..00000000
--- a/tests/TestSuite_generic_filter.py
+++ /dev/null
@@ -1,558 +0,0 @@
-# BSD LICENSE
-#
-# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#   * Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#   * Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in
-#     the documentation and/or other materials provided with the
-#     distribution.
-#   * Neither the name of Intel Corporation nor the names of its
-#     contributors may be used to endorse or promote products derived
-#     from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""
-DPDK Test suite.
-
-Test the support of VLAN Offload Features by Poll Mode Drivers.
-
-"""
-
-import re
-import time
-
-import framework.utils as utils
-from framework.pmd_output import PmdOutput
-from framework.settings import DRIVERS, HEADER_SIZE
-from framework.test_case import TestCase
-
-
-class TestGeneric_filter(TestCase):
-
-    def set_up_all(self):
-        """
-        Run at the start of each test suite.
-
-
-        Generic filter Prerequisites
-        """
-
-        # Based on h/w type, choose how many ports to use
-        ports = self.dut.get_ports(self.nic)
-        # Verify that enough ports are available
-        self.verify(len(ports) >= 2, "Insufficient ports")
-
-        self.cores = "1S/5C/1T"
-
-        # Based on h/w type, choose how many ports to use
-        global valports
-        valports = [_ for _ in ports if self.tester.get_local_port(_) != -1]
-        global portMask
-        portMask = utils.create_mask(valports[:2])
-        self.pmdout = PmdOutput(self.dut)
-        self.ethertype_filter = "off"
-
-    def request_mbufs(self, queue_num):
-        """
-        default txq/rxq descriptor is 64
-        """
-        return 1024 * queue_num + 512
-
-    def port_config(self):
-        """
-         set port queue mapping, fortville not support this function
-        """
-        if self.nic not in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortville_25g", "fortpark_TLV","fortpark_BASE-T", "carlsville", "columbiaville_25g", "columbiaville_100g"]:
-            self.dut.send_expect(
-                "set stat_qmap rx %s 0 0" % valports[0], "testpmd> ")
-            self.dut.send_expect(
-                "set stat_qmap rx %s 0 0" % valports[1], "testpmd> ")
-            self.dut.send_expect(
-                "set stat_qmap rx %s 1 1" % valports[0], "testpmd> ")
-            self.dut.send_expect(
-                "set stat_qmap rx %s 1 1" % valports[1], "testpmd> ")
-            self.dut.send_expect(
-                "set stat_qmap rx %s 2 2" % valports[0], "testpmd> ")
-            self.dut.send_expect(
-                "set stat_qmap rx %s 2 2" % valports[1], "testpmd> ")
-            self.dut.send_expect(
-                "set stat_qmap rx %s 3 3" % valports[0], "testpmd> ")
-            self.dut.send_expect(
-                "set stat_qmap rx %s 3 3" % valports[1], "testpmd> ")
-            self.dut.send_expect(
-                "vlan set strip off %s" % valports[0], "testpmd> ")
-            self.dut.send_expect(
-                "vlan set strip off %s" % valports[1], "testpmd> ")
-            #reson dpdk-5315
-            self.dut.send_expect(
-                "vlan set filter on %s" % valports[0], "testpmd> ")
-            self.dut.send_expect(
-                "vlan set filter off %s" % valports[0], "testpmd> ")
-            #reson dpdk-5315
-            self.dut.send_expect(
-                "vlan set filter on %s" % valports[1], "testpmd> ")
-            self.dut.send_expect(
-                "vlan set filter off %s" % valports[1], "testpmd> ")
-
-        self.dut.send_expect("set flush_rx on", "testpmd> ")
-
-    def set_up(self):
-        """
-        Run before each test case.
-        """
-        pass
-
-    def filter_send_packet(self, type):
-        """
-        Send  packet to portid
-        """
-
-        port = self.tester.get_local_port(valports[0])
-        txItf = self.tester.get_interface(port)
-
-        port = self.tester.get_local_port(valports[1])
-        rxItf = self.tester.get_interface(port)
-
-        mac = self.dut.get_mac_address(valports[0])
-        self.tester.scapy_foreground()
-
-        if (type == "syn"):
-            self.tester.scapy_append(
-                'sendp([Ether(dst="%s")/IP(src="2.2.2.5",dst="2.2.2.4")/TCP(dport=80,flags="S")], iface="%s")' % (mac, txItf))
-        elif (type == "arp"):
-            self.tester.scapy_append(
-                'sendp([Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst="192.168.1.1")], iface="%s")' % (txItf))
-        elif (type == "arp_prio"):
-            self.tester.scapy_append(
-                'sendp([Ether(dst="ff:ff:ff:ff:ff:ff")/Dot1Q(prio=3)/ARP(pdst="192.168.1.1")], iface="%s")' % (txItf))
-        elif (type == "fivetuple"):
-            if self.nic == "niantic":
-                self.tester.scapy_append(
-                    'sendp([Ether(dst="%s")/Dot1Q(prio=3)/IP(src="2.2.2.4",dst="2.2.2.5")/TCP(sport=1,dport=1,flags=0)], iface="%s")' % (mac, txItf))
-            else:
-                self.tester.scapy_append(
-                    'sendp([Ether(dst="%s")/Dot1Q(prio=3)/IP(src="2.2.2.4",dst="2.2.2.5")/TCP(sport=1,dport=1)], iface="%s")' % (mac, txItf))
-        elif (type == "udp"):
-            self.tester.scapy_append(
-                'sendp([Ether(dst="%s")/IP(src="2.2.2.4",dst="2.2.2.5")/UDP(dport=64)], iface="%s")' % (mac, txItf))
-        elif (type == "ip"):
-            self.tester.scapy_append(
-                'sendp([Ether(dst="%s")/IP(src="2.2.2.4",dst="2.2.2.5")/TCP(sport=80,dport=80,flags=0)], iface="%s")' % (mac, txItf))
-        elif (type == "jumbo"):
-            self.tester.scapy_append(
-                'sendp([Ether(dst="%s")/IP(src="2.2.2.5",dst="2.2.2.4")/TCP(dport=80,flags="S")/Raw(load="\x50"*1500)], iface="%s")' % (mac, txItf))
-        elif (type == "packet"):
-            if (filters_index == 0):
-                self.tester.scapy_append(
-                    'sendp([Ether(dst="%s")/IP(src="2.2.2.4",dst="2.2.2.5")/TCP(sport=1,dport=1,flags=0)], iface="%s")' % (mac, txItf))
-            if (filters_index == 1):
-                self.tester.scapy_append(
-                    'sendp([Ether(dst="%s")/Dot1Q(prio=3)/IP(src="2.2.2.4",dst="2.2.2.5")/TCP(sport=1,dport=2,flags=0)], iface="%s")' % (mac, txItf))
-        self.tester.scapy_execute()
-
-    def verify_result(self, outstring, tx_pkts, expect_queue):
-
-        result_scanner = r"Forward Stats for RX Port= %s/Queue= ([0-9]+)" % valports[
-            0]
-
-        scanner = re.compile(result_scanner, re.DOTALL)
-        m = scanner.search(outstring)
-        queue_id = m.group(1)
-        if self.nic == "niantic" and self.ethertype_filter == "on" and expect_queue == "0":
-            self.ethertype_filter = "off"
-            self.verify(queue_id == "0", "packet pass  error")
-        if expect_queue != queue_id:
-            scanner = re.compile(result_scanner, re.DOTALL)
-            m = scanner.search(outstring)
-            queue_id = m.group(1)
-            result_scanner = r"RX-packets: ([0-9]+) \s*"
-            scanner = re.compile(result_scanner, re.DOTALL)
-            m = scanner.search(outstring)
-            p0tx_pkts = m.group(1)
-            
-        else:
-
-            result_scanner = r"RX-packets: ([0-9]+) \s*"
-
-            scanner = re.compile(result_scanner, re.DOTALL)
-            m = scanner.search(outstring)
-            p0tx_pkts = m.group(1)
-
-        self.verify(p0tx_pkts == tx_pkts, "packet pass  error")
-
-    # TODO: failing test even in non-converted version
-    def test_syn_filter(self):
-        """
-        Enable receipt of SYN packets
-        """
-        self.verify(self.nic in ["niantic", "kawela_4", "bartonhills", "powerville", "sagepond", "foxville", "sageville", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"], "%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.dut.send_expect(
-            "syn_filter %s add priority high queue 2" % valports[0], "testpmd> ")
-        self.dut.send_expect("start", "testpmd> ", 120)
-
-        self.filter_send_packet("syn")
-        time.sleep(2)
-
-        out = self.dut.send_expect("stop", "testpmd> ")
-
-        self.verify_result(out, tx_pkts="1", expect_queue="2")
-
-        self.dut.send_expect("clear port stats all", "testpmd> ")
-        self.dut.send_expect("start", "testpmd> ")
-
-        self.filter_send_packet("arp")
-        time.sleep(2)
-        out = self.dut.send_expect("stop", "testpmd> ")
-
-        self.verify_result(out, tx_pkts="1", expect_queue="0")
-
-        self.dut.send_expect(
-            "syn_filter %s del priority high queue 2" % valports[0], "testpmd> ")
-        self.dut.send_expect("clear port stats all", "testpmd> ")
-        self.dut.send_expect("start", "testpmd> ", 120)
-        self.filter_send_packet("syn")
-        time.sleep(2)
-        out = self.dut.send_expect("stop", "testpmd> ")
-
-        self.verify_result(out, tx_pkts="1", expect_queue="0")
-        self.dut.send_expect("quit", "#", timeout=30)
-
-    def test_priority_filter(self):
-        """
-        priority filter
-        """
-        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()
-
-        if self.nic in ["niantic", "sagepond", "sageville"]:
-            cmd = "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue 3 " % (
-                valports[0])
-            self.dut.send_expect("%s" % cmd, "testpmd> ")
-            cmd = "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 2 src_port 1 protocol 0x06 mask 0x18 tcp_flags 0x0 priority 2 queue 2 " % (
-                valports[0])
-            self.dut.send_expect("%s" % cmd, "testpmd> ")
-            self.dut.send_expect("start", "testpmd> ", 120)
-            self.filter_send_packet("fivetuple")
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="3")
-            cmd = "5tuple_filter %s del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x0 priority 3 queue 3 " % (
-                valports[0])
-            self.dut.send_expect(cmd, "testpmd> ")
-
-            self.dut.send_expect("clear port stats all", "testpmd> ")
-            self.dut.send_expect("start", "testpmd> ", 120)
-            self.filter_send_packet("fivetuple")
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="2")
-        elif self.nic in ["kawela_4", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]:
-            cmd = "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask 0x1f tcp_flags 0x02 priority 3 queue 3" % (
-                valports[0])
-            self.dut.send_expect("%s" % (cmd), "testpmd> ")
-            self.dut.send_expect(
-                "syn_filter %s add priority high queue 2" % valports[0], "testpmd> ")
-
-            self.dut.send_expect("start", "testpmd> ", 120)
-            self.filter_send_packet("fivetuple")
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="2")
-            self.dut.send_expect(
-                "syn_filter %s del priority high queue 2" % valports[0], "testpmd> ")
-
-            self.dut.send_expect("start", "testpmd> ", 120)
-            self.filter_send_packet("fivetuple")
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="3")
-        elif self.nic in ["bartonhills", "powerville", "foxville"]:
-            self.dut.send_expect(
-                "flex_filter %s add len 16 bytes 0x0123456789abcdef0000000008000000 mask 000C priority 2 queue 1" % (valports[0]), "testpmd> ")
-            self.dut.send_expect(
-                "2tuple_filter %s add dst_port 64 protocol 0x11 mask 1 tcp_flags 0 priority 3 queue 2" % valports[0], "testpmd> ")
-            self.dut.send_expect("start", "testpmd> ", 120)
-            self.filter_send_packet("udp")
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="1")
-            self.dut.send_expect(
-                "flex_filter %s del len 16 bytes 0x0123456789abcdef0000000008000000 mask 000C priority 2 queue 1" % valports[0], "testpmd> ")
-            self.dut.send_expect("start", "testpmd> ", 120)
-            self.filter_send_packet("udp")
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="2")
-        else:
-            self.verify(False, "%s nic not support this test" % self.nic)
-
-    def test_five_tuple_filter(self):
-        """
-        five tuple filter
-        """
-        if self.nic in ["niantic", "kawela_4", "sagepond", "foxville", "sageville", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]:
-            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()
-
-            mask = ['0x1f', '0x0']
-            for case in mask:
-                if case == "0x1f":
-                    if self.nic in ["niantic", "sagepond", "sageville"]:
-                        cmd = "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask %s tcp_flags 0x0 priority 3 queue 3" % (
-                            valports[0], case)
-                    if self.nic in ["kawela_4", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]:
-                        cmd = "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask %s tcp_flags 0x02 priority 3 queue 3" % (
-                            valports[0], case)
-                else:
-                    if self.nic in ["niantic", "sagepond", "sageville"]:
-                        cmd = "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask %s tcp_flags 0x0 priority 3 queue 3" % (
-                            valports[0], case)
-                    if self.nic in ["kawela_4", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]:
-                        cmd = "5tuple_filter %s add dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask %s tcp_flags 0x02 priority 3 queue 3" % (
-                            valports[0], case)
-
-                self.dut.send_expect("%s" % (cmd), "testpmd> ")
-                # if case == "0x1f":
-                #    out = self.dut.send_expect("get_5tuple_filter %s index 1" % valports[0], "testpmd> ")
-                #    self.verify('Destination IP:  0x02020205    mask: 1' in out, "set 5-tuple filter error")
-                #    self.verify('Source IP:       0x02020204    mask: 1' in out, "set 5-tuple filter error")
-                self.dut.send_expect("start", "testpmd> ", 120)
-
-                self.filter_send_packet("fivetuple")
-
-                out = self.dut.send_expect("stop", "testpmd> ")
-                self.verify_result(out, tx_pkts="1", expect_queue="3")
-                self.dut.send_expect("start", "testpmd> ", 120)
-                self.filter_send_packet("arp")
-                out = self.dut.send_expect("stop", "testpmd> ")
-                self.verify_result(out, tx_pkts="1", expect_queue="0")
-                if case == "0x1f":
-                    if self.nic in ["niantic", "sagepond", "sageville"]:
-                        cmd = "5tuple_filter %s del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask %s tcp_flags 0x0 priority 3 queue 3" % (
-                            valports[0], case)
-                    if self.nic in ["kawela_4", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]:
-                        cmd = "5tuple_filter %s del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask %s tcp_flags 0x02 priority 3 queue 3" % (
-                            valports[0], case)
-                else:
-                    if self.nic in ["niantic", "sagepond", "sageville"]:
-                        cmd = "5tuple_filter %s del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask %s tcp_flags 0x0 priority 3 queue 3" % (
-                            valports[0], case)
-                    if self.nic in ["kawela_4", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]:
-                        cmd = "5tuple_filter %s del dst_ip 2.2.2.5 src_ip 2.2.2.4 dst_port 1 src_port 1 protocol 0x06 mask %s tcp_flags 0x02 priority 3 queue 3" % (
-                            valports[0], case)
-
-                self.dut.send_expect("%s" % (cmd), "testpmd> ")
-                self.dut.send_expect("start", "testpmd> ", 120)
-                self.filter_send_packet("fivetuple")
-                out = self.dut.send_expect("stop", "testpmd> ")
-                self.verify_result(out, tx_pkts="1", expect_queue="0")
-            self.dut.send_expect("quit", "#", timeout=30)
-        else:
-            self.verify(False, "%s nic not support syn filter" % self.nic)
-
-    def test_ethertype_filter(self):
-
-        self.verify(self.nic in ["niantic", "kawela_4", "bartonhills", "sagepond",
-                           "powerville", "fortville_eagle", "fortville_25g", "fortville_spirit",
-                           "fortville_spirit_single", "fortpark_TLV","fortpark_BASE-T", "fortville_25g","cavium_a063", "carlsville", "foxville", "sageville", "columbiaville_25g", "columbiaville_100g"], "%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"
-
-        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")
-        time.sleep(2)
-        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")
-        if self.nic in ["niantic", "sagepond"]:
-            self.dut.send_expect("start", "testpmd> ")
-            self.filter_send_packet("arp_prio")
-            time.sleep(2)
-            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")
-        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)
-        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="0")
-
-    def test_twotuple_filter(self):
-
-        if self.nic in ["powerville", "bartonhills", "cavium_a063", "sagepond", "foxville", "sageville", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]:
-            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.dut.send_expect(
-                "2tuple_filter %s add dst_port 64 protocol 0x11 mask 1 tcp_flags 0 priority 3 queue 1" % valports[0], "testpmd> ")
-            self.dut.send_expect("start", "testpmd> ", 120)
-
-            self.filter_send_packet("udp")
-            out = self.dut.send_expect("stop", "testpmd> ")
-
-            self.verify_result(out, tx_pkts="1", expect_queue="1")
-
-            self.dut.send_expect("start", "testpmd> ")
-
-            self.filter_send_packet("syn")
-            time.sleep(2)
-            out = self.dut.send_expect("stop", "testpmd> ")
-
-            self.verify_result(out, tx_pkts="1", expect_queue="0")
-            self.dut.send_expect(
-                "2tuple_filter %s del dst_port 64 protocol 0x11 mask 1 tcp_flags 0 priority 3 queue 1" % valports[0], "testpmd> ")
-            self.dut.send_expect("start", "testpmd> ", 120)
-            self.filter_send_packet("udp")
-            time.sleep(2)
-            out = self.dut.send_expect("stop", "testpmd> ")
-
-            self.verify_result(out, tx_pkts="1", expect_queue="0")
-            self.dut.send_expect("quit", "#")
-        else:
-            self.verify(False, "%s nic not support two tuple filter" % self.nic)
-
-    def test_flex_filter(self):
-        self.verify(self.nic in ["powerville", "bartonhills", "cavium_a063", "sagepond", "foxville", "sageville", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"], '%s not support flex filter' % self.nic)
-
-        masks = ['000C', '000C']
-        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()
-        for i in [0, 1]:
-            if i == 0:
-                self.dut.send_expect(
-                    "flex_filter %s add len 16 bytes 0x0123456789abcdef0000000008060000 mask %s priority 3 queue 1" %
-                    (valports[0], masks[i]), "testpmd> ")
-            else:
-                self.dut.send_expect(
-                    "flex_filter %s add len 16 bytes 0x0123456789abcdef0000000008000000 mask %s priority 3 queue 1" %
-                    (valports[0], masks[i]), "testpmd> ")
-
-            self.dut.send_expect("start", "testpmd> ", 120)
-
-            if i == 0:
-                self.filter_send_packet("arp")
-            else:
-                self.filter_send_packet("ip")
-            time.sleep(2)
-            out = self.dut.send_expect("stop", "testpmd> ")
-
-            self.verify_result(out, tx_pkts="1", expect_queue="1")
-
-            self.dut.send_expect("start", "testpmd> ")
-
-            if i == 0:
-                self.filter_send_packet("syn")
-            else:
-                self.filter_send_packet("arp")
-            time.sleep(2)
-            out = self.dut.send_expect("stop", "testpmd> ")
-
-            self.verify_result(out, tx_pkts="1", expect_queue="0")
-            if i == 0:
-                self.dut.send_expect(
-                    "flex_filter %s del len 16 bytes 0x0123456789abcdef0000000008060000 mask %s priority 3 queue 1" %
-                    (valports[0], masks[i]), "testpmd> ")
-            else:
-                self.dut.send_expect(
-                    "flex_filter %s del len 16 bytes 0x0123456789abcdef0000000008000000 mask %s priority 3 queue 1" %
-                    (valports[0], masks[i]), "testpmd> ")
-            self.dut.send_expect("start", "testpmd> ", 120)
-            if i == 0:
-                self.filter_send_packet("arp")
-            else:
-                self.filter_send_packet("ip")
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="0")
-
-    def test_multiple_filters_1GB(self):
-
-        if self.nic in ["powerville", "kawela_4", "bartonhills", "sagepond", "foxville", "sageville", "fortville_eagle", "fortville_25g", "fortville_spirit", "columbiaville_25g", "columbiaville_100g"]:
-            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.dut.send_expect(
-                "syn_filter %s add priority high queue 1" % valports[0], "testpmd> ")
-            self.dut.send_expect(
-                "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethertype 0x0806 fwd queue 3" % (valports[0]), "testpmd> ")
-            self.dut.send_expect("start", "testpmd> ")
-
-            self.dut.send_expect("start", "testpmd> ")
-            self.filter_send_packet("arp")
-            time.sleep(2)
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="3")
-
-            self.dut.send_expect("start", "testpmd> ")
-            self.filter_send_packet("syn")
-            time.sleep(2)
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="1")
-
-            # remove all filters
-
-            self.dut.send_expect(
-                "syn_filter %s del priority high queue 1" % valports[0], "testpmd> ")
-            self.dut.send_expect(
-                "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertype 0x0806 fwd queue 3" % valports[0], "testpmd> ")
-
-            self.dut.send_expect("start", "testpmd> ")
-            self.filter_send_packet("arp")
-            time.sleep(2)
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="0")
-
-            self.dut.send_expect("start", "testpmd> ")
-            self.filter_send_packet("syn")
-            time.sleep(2)
-            out = self.dut.send_expect("stop", "testpmd> ")
-            self.verify_result(out, tx_pkts="1", expect_queue="0")
-        else:
-            self.verify(False, "%s nic not support this test" % self.nic)
-
-    def tear_down(self):
-        """
-        Run after each test case.
-        """
-        self.dut.kill_all()
-
-    def tear_down_all(self):
-        pass
-- 
2.33.1


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

* [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter
  2021-11-08 13:58 [dts] [PATCH V1 0/3] *** delete generic_filter *** Yan Xia
  2021-11-08 13:58 ` [dts] [PATCH V1 1/3] test_plan/generic_filter: delete generic_filter_test_plan Yan Xia
  2021-11-08 13:58 ` [dts] [PATCH V1 2/3] tests/generic_filter: delete testsuite generic_filter Yan Xia
@ 2021-11-08 13:58 ` Yan Xia
  2021-11-08  6:48   ` Peng, Yuan
  2021-11-08 15:48   ` Tu, Lijuan
  2 siblings, 2 replies; 6+ messages in thread
From: Yan Xia @ 2021-11-08 13:58 UTC (permalink / raw)
  To: dts; +Cc: Yan Xia

delete generic_filter because of these types of filter removed,
related dpdk commit-id:
ae42875d6 ethdev: remove legacy SYN filter type support
92067db05 ethdev: remove legacy N-tuple filter type support
2be70bcdb ethdev: remove legacy flexible filter type support
35b1c68af ethdev: remove legacy EtherType filter type support

Signed-off-by: Yan Xia <yanx.xia@intel.com>
---
 test_plans/index.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test_plans/index.rst b/test_plans/index.rst
index e3511caa..0c2a94d0 100644
--- a/test_plans/index.rst
+++ b/test_plans/index.rst
@@ -89,7 +89,6 @@ The following are the test plans for the DPDK DTS automated test system.
     flow_classify_softnic_test_plan
     fortville_rss_granularity_config_test_plan
     fortville_rss_input_test_plan
-    generic_filter_test_plan
     generic_flow_api_test_plan
     hotplug_mp_test_plan
     hotplug_test_plan
-- 
2.33.1


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

* Re: [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter
  2021-11-08 13:58 ` [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter Yan Xia
  2021-11-08  6:48   ` Peng, Yuan
@ 2021-11-08 15:48   ` Tu, Lijuan
  1 sibling, 0 replies; 6+ messages in thread
From: Tu, Lijuan @ 2021-11-08 15:48 UTC (permalink / raw)
  To: Xia, YanX, dts; +Cc: Xia, YanX

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Yan Xia
> Sent: 2021年11月8日 21:59
> To: dts@dpdk.org
> Cc: Xia, YanX <yanx.xia@intel.com>
> Subject: [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter
> 
> delete generic_filter because of these types of filter removed, related dpdk
> commit-id:
> ae42875d6 ethdev: remove legacy SYN filter type support
> 92067db05 ethdev: remove legacy N-tuple filter type support 2be70bcdb ethdev:
> remove legacy flexible filter type support 35b1c68af ethdev: remove legacy
> EtherType filter type support
> 
> Signed-off-by: Yan Xia <yanx.xia@intel.com>

Series applied.

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

end of thread, other threads:[~2021-11-08 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 13:58 [dts] [PATCH V1 0/3] *** delete generic_filter *** Yan Xia
2021-11-08 13:58 ` [dts] [PATCH V1 1/3] test_plan/generic_filter: delete generic_filter_test_plan Yan Xia
2021-11-08 13:58 ` [dts] [PATCH V1 2/3] tests/generic_filter: delete testsuite generic_filter Yan Xia
2021-11-08 13:58 ` [dts] [PATCH V1 3/3] test_plans/index.rst: delete generic_filter Yan Xia
2021-11-08  6:48   ` Peng, Yuan
2021-11-08 15:48   ` Tu, Lijuan

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