diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-07-11 09:36:44 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-07-12 13:20:21 +0000 |
commit | 1f2723170ac74555aa505ab3cb772ded76501362 (patch) | |
tree | 49000b6b1d1a7f6b6ef5d1efb778de8792fabf0f /tests/vpp/func/ip4 | |
parent | 33fb34665214bbbd0a4b3154169b21c2da01f69b (diff) |
VPPD: Cop, iACL, Policer
- Alignment with PERF
Change-Id: Id7b2cb91c88e44cf9265c3376330f6aa579abf7a
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'tests/vpp/func/ip4')
4 files changed, 0 insertions, 545 deletions
diff --git a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-copblklistbase-func.robot b/tests/vpp/func/ip4/eth2p-ethip4-ip4base-copblklistbase-func.robot deleted file mode 100644 index ef84aa21b0..0000000000 --- a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-copblklistbase-func.robot +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Library | resources.libraries.python.Cop -| Library | resources.libraries.python.Trace -| ... -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/l2/l2_xconnect.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/interfaces.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| ... -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| ... -| Test Setup | Set up functional test -| ... -| Test Teardown | Tear down functional test -| ... -| Documentation | *COP Security IPv4 Blacklist Tests* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 on all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | static routes. COP security black-lists are applied on DUT1 ingress -| ... | interface from TG. DUT2 is configured with L2XC. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in -| ... | one direction by TG on link to DUT1; on receive TG verifies packets for -| ... | correctness and drops as applicable. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${tg_node}= | ${nodes['TG']} -| ${dut1_node}= | ${nodes['DUT1']} -| ${dut2_node}= | ${nodes['DUT2']} - -| ${dut1_if1_ip}= | 192.168.1.1 -| ${dut1_if2_ip}= | 192.168.2.1 -| ${dut1_if1_ip_GW}= | 192.168.1.2 -| ${dut1_if2_ip_GW}= | 192.168.2.2 - -| ${test_dst_ip}= | 32.0.0.1 -| ${test_src_ip}= | 16.0.0.1 - -| ${cop_dut_ip}= | 16.0.0.0 - -| ${ip_prefix}= | 24 - -| ${fib_table_number}= | 1 - -*** Test Cases *** -| TC01: DUT drops IPv4 pkts with COP blacklist set with IPv4 src-addr -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 \ -| | ... | configure interface IPv4 addresses and routes in the main -| | ... | routing domain, add COP blacklist on interface to TG with IPv4 -| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 -| | ... | xconnect. [Ver] Make TG send ICMPv4 Echo Req on its interface to -| | ... | DUT1; verify no ICMPv4 Echo Req pkts are received. [Ref] -| | Given Configure path in 3-node circular topology -| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} -| | And Set interfaces in 3-node circular topology up -| | And Configure L2XC -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} -| | And VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} -| | And VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} -| | And Vpp Route Add | ${dut1_node} | ${test_dst_ip} | ${ip_prefix} -| | ... | gateway=${dut1_if2_ip_GW} | interface=${dut1_to_dut2} -| | And Add fib table | ${dut1_node} | ${fib_table_number} -| | When COP Add whitelist Entry -| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${fib_table_number} -| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable -| | Then Packet transmission from port to port should fail | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} -| | ... | ${tg_to_dut2_mac} diff --git a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-copwhlistbase-func.robot b/tests/vpp/func/ip4/eth2p-ethip4-ip4base-copwhlistbase-func.robot deleted file mode 100644 index 5fcc74f94a..0000000000 --- a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-copwhlistbase-func.robot +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Library | resources.libraries.python.Cop -| Library | resources.libraries.python.Trace -| ... -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/l2/l2_xconnect.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/interfaces.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| ... -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO -| ... -| Test Setup | Set up functional test -| ... -| Test Teardown | Tear down functional test -| ... -| Documentation | *COP Security IPv4 Whitelist Tests* -| ... -| ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology -| ... | with single links between nodes. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-ICMPv4 on all links. -| ... | *[Cfg] DUT configuration:* DUT1 is configured with IPv4 routing and -| ... | static routes. COP security white-lists are applied on DUT1 ingress -| ... | interface from TG. DUT2 is configured with L2XC. -| ... | *[Ver] TG verification:* Test ICMPv4 Echo Request packets are sent in -| ... | one direction by TG on link to DUT1; on receive TG verifies packets for -| ... | correctness and drops as applicable. -| ... | *[Ref] Applicable standard specifications:* - -*** Variables *** -| ${tg_node}= | ${nodes['TG']} -| ${dut1_node}= | ${nodes['DUT1']} -| ${dut2_node}= | ${nodes['DUT2']} - -| ${dut1_if1_ip}= | 192.168.1.1 -| ${dut1_if2_ip}= | 192.168.2.1 -| ${dut1_if1_ip_GW}= | 192.168.1.2 -| ${dut1_if2_ip_GW}= | 192.168.2.2 - -| ${test_dst_ip}= | 32.0.0.1 -| ${test_src_ip}= | 16.0.0.1 - -| ${cop_dut_ip}= | 16.0.0.0 - -| ${ip_prefix}= | 24 - -| ${fib_table_number}= | 1 - -*** Test Cases *** -| TC01: DUT permits IPv4 pkts with COP whitelist set with IPv4 src-addr -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. [Enc] Eth-IPv4-ICMPv4. [Cfg] On DUT1 \ -| | ... | configure interface IPv4 addresses and routes in the main -| | ... | routing domain, add COP whitelist on interface to TG with IPv4 -| | ... | src-addr matching packets generated by TG; on DUT2 configure L2 -| | ... | xconnect. [Ver] Make TG send ICMPv4 Echo Req on its interface to -| | ... | DUT1; verify received ICMPv4 Echo Req pkts are correct. [Ref] -| | Given Configure path in 3-node circular topology -| | ... | ${tg_node} | ${dut1_node} | ${dut2_node} | ${tg_node} -| | And Set interfaces in 3-node circular topology up -| | And Configure L2XC -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip} | ${ip_prefix} -| | And VPP Interface Set IP Address -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip} | ${ip_prefix} -| | And VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_tg} | ${dut1_if1_ip_GW} | ${tg_to_dut1_mac} -| | And VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_if2_ip_GW} | ${tg_to_dut2_mac} -| | And Vpp Route Add | ${dut1_node} | ${test_dst_ip} | ${ip_prefix} -| | ... | gateway=${dut1_if2_ip_GW} | interface=${dut1_to_dut2} -| | And Add fib table | ${dut1_node} | ${fib_table_number} -| | And Vpp Route Add | ${dut1_node} | ${cop_dut_ip} | ${ip_prefix} -| | ... | vrf=${fib_table_number} | local=${TRUE} -| | When COP Add whitelist Entry -| | ... | ${dut1_node} | ${dut1_to_tg} | ip4 | ${fib_table_number} -| | And COP interface enable or disable | ${dut1_node} | ${dut1_to_tg} | enable -| | Then Send packet and verify headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} | ${dut1_to_dut2_mac} -| | ... | ${tg_to_dut2_mac} diff --git a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-iaclbase-func.robot b/tests/vpp/func/ip4/eth2p-ethip4-ip4base-iaclbase-func.robot deleted file mode 100644 index b8528f36d1..0000000000 --- a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-iaclbase-func.robot +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Library | resources.libraries.python.Classify.Classify -| Library | resources.libraries.python.Trace -| ... -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/l2/l2_traffic.robot -| Resource | resources/libraries/robot/l2/l2_xconnect.robot -| Resource | resources/libraries/robot/shared/counters.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/interfaces.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| ... -| Force Tags | HW_ENV | VM_ENV | 3_NODE_SINGLE_LINK_TOPO | SKIP_VPP_PATCH -| ... -| Test Setup | Set up functional test -| ... -| Test Teardown | Tear down functional test -| ... -| Documentation | *IPv4 routing with ingress ACL test cases* -| ... -| ... | Encapsulations: Eth-IPv4 on links TG-DUT1, TG-DUT2, DUT1-DUT2. IPv4 -| ... | ingress ACL (iACL) tests use 3-node topology TG - DUT1 - DUT2 - TG with -| ... | one link between the nodes. DUT1 and DUT2 are configured with IPv4 -| ... | routing and static routes. DUT1 is configured with iACL on link to TG, -| ... | iACL classification and permit action are configured on a per test -| ... | case basis. Test ICMPv4 Echo Request packets are sent in one direction -| ... | by TG on link to DUT1 and received on TG link to DUT2. On receive TG -| ... | verifies if packets are accepted, or if received verifies packet IPv4 -| ... | src-addr, dst-addr and MAC addresses. - -*** Variables *** -| ${dut1_to_tg_ip}= | 192.168.1.1 -| ${dut1_to_dut2_ip}= | 192.168.2.1 -| ${dut1_to_dut2_ip_GW}= | 192.168.2.2 -| ${test_dst_ip}= | 32.0.0.1 -| ${test_src_ip}= | 16.0.0.1 -| ${non_drop_dst_ip}= | 33.0.0.1 -| ${non_drop_src_ip}= | 15.0.0.1 -| ${prefix_length}= | 24 -| ${ip_version}= | ip4 -| ${l2_table}= | l2 - -*** Test Cases *** -| TC01: DUT with iACL IPv4 src-addr and dst-addr accepts matching pkts -| | [Documentation] -| | ... | On DUT1 add source and destination IPv4 addresses to classify table\ -| | ... | with 'permit'. -| | Given Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set interfaces in 3-node circular topology up -| | And VPP Interface Set IP Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And VPP Interface Set IP Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | gateway=${dut1_to_dut2_ip_GW} | interface=${dut1_to_dut2} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${non_drop_dst_ip} | ${prefix_length} -| | ... | gateway=${dut1_to_dut2_ip_GW} | interface=${dut1_to_dut2} -| | And Configure L2XC -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send packet and verify headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send packet and verify headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | ${table_index_1} | ${skip_n_1} | ${match_n_1}= -| | ... | When Vpp Creates Classify Table L3 | ${dut1_node} -| | ... | ${ip_version} | src | ${test_src_ip} -| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= -| | ... | And Vpp Creates Classify Table L3 | ${dut1_node} | ${ip_version} -| | ... | dst | ${test_dst_ip} -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | permit | ${table_index_1} -| | ... | ${ip_version} | src | ${test_src_ip} -| | And Vpp Configures Classify Session L3 -| | ... | ${dut1_node} | permit | ${table_index_2} -| | ... | ${ip_version} | dst | ${test_dst_ip} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_1} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index_2} -| | Then Send packet and verify headers | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} -| | And Send packet and verify headers | ${tg_node} -| | ... | ${non_drop_src_ip} | ${non_drop_dst_ip} | ${tg_to_dut1} -| | ... | ${tg_to_dut1_mac} | ${dut1_to_tg_mac} | ${tg_to_dut2} -| | ... | ${dut1_to_dut2_mac} | ${tg_to_dut2_mac} - -| TC02: DUT with iACL IPv4 TCP src-ports and dst-ports accepts matching pkts -| | [Documentation] -| | ... | On DUT1 add TCP source and destination ports to classify table\ -| | ... | with 'permit'. -| | Given Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set interfaces in 3-node circular topology up -| | And VPP Interface Set IP Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And VPP Interface Set IP Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | gateway=${dut1_to_dut2_ip_GW} | interface=${dut1_to_dut2} -| | And Configure L2XC -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | TCP -| | ... | source + destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | permit | ${table_index} | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 80 | 20 -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | TCP | 110 | 25 - -| TC03: DUT with iACL IPv4 UDP src-ports and dst-ports accepts matching pkts -| | [Documentation] -| | ... | On DUT1 add UDP source and destination ports to classify table\ -| | ... | with 'permit'. -| | Given Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | And Set interfaces in 3-node circular topology up -| | And VPP Interface Set IP Address | ${dut1_node} -| | ... | ${dut1_to_tg} | ${dut1_to_tg_ip} | ${prefix_length} -| | And VPP Interface Set IP Address | ${dut1_node} -| | ... | ${dut1_to_dut2} | ${dut1_to_dut2_ip} | ${prefix_length} -| | And VPP Add IP Neighbor -| | ... | ${dut1_node} | ${dut1_to_dut2} | ${dut1_to_dut2_ip_GW} -| | ... | ${tg_to_dut2_mac} -| | And Vpp Route Add -| | ... | ${dut1_node} | ${test_dst_ip} | ${prefix_length} -| | ... | gateway=${dut1_to_dut2_ip_GW} | interface=${dut1_to_dut2} -| | And Configure L2XC -| | ... | ${dut2_node} | ${dut2_to_dut1} | ${dut2_to_tg} -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | ${hex_mask}= | Compute Classify Hex Mask | ${ip_version} | UDP -| | ... | source + destination -| | ${hex_value}= | Compute Classify Hex Value | ${hex_mask} | 80 | 20 -| | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table Hex | ${dut1_node} | ${hex_mask} -| | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | permit | ${table_index} | ${hex_value} -| | And Vpp Enable Input Acl Interface -| | ... | ${dut1_node} | ${dut1_to_tg} | ${ip_version} | ${table_index} -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 80 | 20 -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${test_src_ip} | ${test_dst_ip} | ${tg_to_dut1} | ${tg_to_dut1_mac} -| | ... | ${tg_to_dut2} | ${dut1_to_tg_mac} | UDP | 110 | 25 diff --git a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-ipolicemarkbase-func.robot b/tests/vpp/func/ip4/eth2p-ethip4-ip4base-ipolicemarkbase-func.robot deleted file mode 100644 index 60e480c287..0000000000 --- a/tests/vpp/func/ip4/eth2p-ethip4-ip4base-ipolicemarkbase-func.robot +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at: -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -*** Settings *** -| Force Tags | 3_NODE_DOUBLE_LINK_TOPO | VM_ENV | HW_ENV -| Resource | resources/libraries/robot/features/policer.robot -| Library | resources.libraries.python.Trace -| Test Setup | Run Keywords | Set up functional test -| ... | AND | Configure topology for IPv4 policer test -| Test Teardown | Tear down functional test -| Documentation | *IPv4 policer test cases* -| ... -| ... | *[Top] Network topologies:* TG=DUT1 2-node topology with two links\ -| ... | between nodes. -| ... | *[Cfg] DUT configuration:* On DUT1 configure interfaces IPv4 adresses,\ -| ... | and static ARP record on the second interface. -| ... | *[Ver] TG verification:* Test packet is sent from TG on the first link\ -| ... | to DUT1. Packet is received on TG on the second link from DUT1. -| ... | *[Ref] Applicable standard specifications:* RFC2474, RFC2697, RFC2698. - -*** Variables *** -| ${tg_to_dut_if1_ip4}= | 192.168.122.2 -| ${tg_to_dut_if2_ip4}= | 192.168.123.2 -| ${dut_to_tg_if1_ip4}= | 192.168.122.1 -| ${dut_to_tg_if2_ip4}= | 192.168.123.1 -| ${ip4_plen}= | ${24} - -| ${cir}= | ${100} -| ${eir}= | ${150} -| ${cb}= | ${200} -| ${eb}= | ${300} - -*** Test Cases *** -| TC01: VPP policer 2R3C Color-aware marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2698. -| | ... | [Cfg] On DUT1 configure 2R3C color-aware policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set EIR | ${eir} -| | And Policer Set CB | ${cb} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 2R3C 2698 -| | And Policer Set Conform Action Transmit -| | And Policer Set Exceed Action Mark and Transmit | ${dscp} -| | And Policer Set Violate Action Drop -| | And Policer Enable Color Aware -| | And Policer Classify Set Precolor Exceed -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send packet and verify marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC02: VPP policer 2R3C Color-blind marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2698. -| | ... | [Cfg] On DUT1 configure 2R3C color-blind policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set EIR | ${eir} -| | And Policer Set CB | ${cb} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 2R3C 2698 -| | And Policer Set Conform Action Mark and Transmit | ${dscp} -| | And Policer Set Exceed Action Transmit -| | And Policer Set Violate Action Drop -| | And Policer Classify Set Precolor Conform -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send packet and verify marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC03: VPP policer 1R3C Color-aware marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2697. -| | ... | [Cfg] On DUT1 configure 1R3C color-aware policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${1} -| | And Policer Set CB | ${2} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 1R3C -| | And Policer Set Conform Action Transmit -| | And Policer Set Exceed Action Mark and Transmit | ${dscp} -| | And Policer Set Violate Action Drop -| | And Policer Enable Color Aware -| | And Policer Classify Set Precolor Exceed -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send packet and verify marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp} - -| TC04: VPP policer 1R3C Color-blind marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2697. -| | ... | [Cfg] On DUT1 configure 1R3C color-blind policer on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | On DUT1 packet is marked with DSCP tag. Verify if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ${dscp}= | DSCP AF22 -| | Given Policer Set Name | policer1 -| | And Policer Set Node | ${dut_node} -| | And Policer Set CIR | ${cir} -| | And Policer Set CB | ${cb} -| | And Policer Set EB | ${eb} -| | And Policer Set Rate Type pps -| | And Policer Set Round Type Closest -| | And Policer Set Type 1R3C -| | And Policer Set Conform Action Mark and Transmit | ${dscp} -| | And Policer Set Exceed Action Transmit -| | And Policer Set Violate Action Drop -| | And Policer Classify Set Precolor Conform -| | And Policer Classify Set Interface | ${dut_to_tg_if1} -| | And Policer Classify Set Match IP | ${tg_to_dut_if1_ip} -| | When Policer Set Configuration -| | Then Send packet and verify marking | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp}
\ No newline at end of file |