From 10e0393fde6d919cf0e5848bc5e506d981642ef8 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Fri, 14 Jun 2019 09:26:38 +0200 Subject: VAT-to-PAPI: Classify Change-Id: Ic06a0a65429680e6ecdc3f5288d091c2c2630921 Signed-off-by: Tibor Frank --- .../l2xc/eth2p-eth-l2xcbase-iaclbase-func.robot | 63 +++++++++++----------- 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'tests/vpp/func/l2xc') diff --git a/tests/vpp/func/l2xc/eth2p-eth-l2xcbase-iaclbase-func.robot b/tests/vpp/func/l2xc/eth2p-eth-l2xcbase-iaclbase-func.robot index b62f0f8731..c12a6100f4 100644 --- a/tests/vpp/func/l2xc/eth2p-eth-l2xcbase-iaclbase-func.robot +++ b/tests/vpp/func/l2xc/eth2p-eth-l2xcbase-iaclbase-func.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. +# 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: @@ -31,17 +31,16 @@ | ... | DUT1 is configured with iACL classification on link to TG, | ... | *[Ver] TG verification:* 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 dropped. +| ... | to DUT2. On receive TG verifies if packets are accepted. *** Variables *** | ${l2_table}= | l2 *** Test Cases *** -| TC01: DUT with iACL MAC src-addr drops matching pkts +| TC01: DUT with iACL MAC src-addr accepts matching pkts | | [Documentation] | | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 add source MAC address to classify table with 'deny'. -| | ... | [Ver] Make TG verify matching packets are dropped. +| | ... | [Cfg] On DUT1 add source MAC address 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 @@ -52,21 +51,21 @@ | | Then Send ICMP packet and verify received packet | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src -| | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | | ... | src | ${tg_to_dut1_mac} +| | And Vpp Configures Classify Session L2 +| | ... | ${dut1_node} | permit | ${table_index} | src | ${tg_to_dut1_mac} | | And Vpp Enable Input ACL Interface | | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} -| | Then ICMP packet transmission should fail +| | Then Send ICMP packet and verify received packet | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -| TC02: DUT with iACL MAC dst-addr drops matching pkts +| TC02: DUT with iACL MAC dst-addr accepts matching pkts | | [Documentation] | | ... | [Top] TG-DUT1-DUT2-TG. | | ... | [Cfg] On DUT1 add destination MAC address to classify -| | ... | table with 'deny'. -| | ... | [Ver] Make TG verify matching packets are dropped. +| | ... | table with 'permit'. +| | ... | [Ver] Make TG verify matching packets are accepted. | | 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 @@ -77,21 +76,21 @@ | | Then Send ICMP packet and verify received packet | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | | ${table_index} | ${skip_n} | ${match_n}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | dst -| | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | | ... | dst | ${tg_to_dut2_mac} +| | And Vpp Configures Classify Session L2 +| | ... | ${dut1_node} | permit | ${table_index} | dst | ${tg_to_dut2_mac} | | And Vpp Enable Input ACL Interface | | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} -| | Then ICMP packet transmission should fail +| | Then Send ICMP packet and verify received packet | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -| TC03: DUT with iACL MAC src-addr and dst-addr drops matching pkts +| TC03: DUT with iACL MAC src-addr and dst-addr accepts matching pkts | | [Documentation] | | ... | [Top] TG-DUT1-DUT2-TG. | | ... | [Cfg] On DUT1 add source and destination MAC address to classify -| | ... | table with 'deny'. -| | ... | [Ver] Make TG verify matching packets are dropped. +| | ... | table with 'permit'. +| | ... | [Ver] Make TG verify matching packets are accepted. | | 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 @@ -102,27 +101,28 @@ | | Then Send ICMP packet and verify received packet | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} | | ${table_index_1} | ${skip_n_1} | ${match_n_1}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | src -| | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index_1} | ${skip_n_1} | ${match_n_1} +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | | ... | src | ${tg_to_dut1_mac} -| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= -| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | dst | | And Vpp Configures Classify Session L2 -| | ... | ${dut1_node} | deny | ${table_index_2} | ${skip_n_2} | ${match_n_2} +| | ... | ${dut1_node} | permit | ${table_index_1} | src | ${tg_to_dut1_mac} +| | ${table_index_2} | ${skip_n_2} | ${match_n_2}= +| | ... | When Vpp Creates Classify Table L2 | ${dut1_node} | | ... | dst | ${tg_to_dut1_mac} +| | And Vpp Configures Classify Session L2 +| | ... | ${dut1_node} | permit | ${table_index_2} | dst | ${tg_to_dut1_mac} | | And Vpp Enable Input ACL Interface | | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index_1} | | And Vpp Enable Input ACL Interface | | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index_2} -| | Then ICMP packet transmission should fail +| | Then Send ICMP packet and verify received packet | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -| TC04: DUT with iACL EtherType drops matching pkts +| TC04: DUT with iACL EtherType accepts matching pkts | | [Documentation] | | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 add EtherType IPv4(0x0800) to classify table with 'deny'. -| | ... | [Ver] Make TG verify matching packets are dropped. +| | ... | [Cfg] On DUT1 add EtherType IPv4(0x0800) to classify table with +| | ... | 'permit'. +| | ... | [Ver] Make TG verify matching packets are accepted. | | 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 @@ -136,9 +136,8 @@ | | ... | When Vpp Creates Classify Table Hex | | ... | ${dut1_node} | 000000000000000000000000ffff | | And Vpp Configures Classify Session Hex -| | ... | ${dut1_node} | deny | ${table_index} | ${skip_n} | ${match_n} -| | ... | 0000000000000000000000000800 +| | ... | ${dut1_node} | permit | ${table_index} | 0000000000000000000000000800 | | And Vpp Enable Input ACL Interface | | ... | ${dut1_node} | ${dut1_to_tg} | ${l2_table} | ${table_index} -| | Then ICMP packet transmission should fail +| | Then Send ICMP packet and verify received packet | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2} -- cgit 1.2.3-korg