diff --git a/regress/lib/Perl5/Test/RegressTest.pm b/regress/lib/Perl5/Test/RegressTest.pm index f749075..071630f 100644 --- a/regress/lib/Perl5/Test/RegressTest.pm +++ b/regress/lib/Perl5/Test/RegressTest.pm @@ -66,6 +66,7 @@ my $portBase = 0; my $sendDelay; my $baseIdle; my $ignoreByteCount; +my $noVlan; my $noSlicing; my $noBarrier; my $lessPorts; @@ -98,6 +99,7 @@ sub run_regress_test { "send_delay=s" => \$sendDelay, "base_idle=s" => \$baseIdle, "ignore_byte_count" => \$ignoreByteCount, + "no_vlan" => \$noVlan, "no_slicing" => \$noSlicing, "no_barrier" => \$noBarrier, "less_ports" => \$lessPorts @@ -585,6 +587,10 @@ sub runTest { if ( defined($ignoreByteCount) ) { $args .= " --ignore_byte_count"; } + # Some setup can not do VLANs - Jean II + if ( defined($noVlan) ) { + $args .= " --no_vlan"; + } # Some platforms can not do Slicing - Jean II if ( defined($noSlicing) ) { $args .= " --no_slicing"; diff --git a/regress/lib/Perl5/Test/TestLib.pm b/regress/lib/Perl5/Test/TestLib.pm index fe7a062..eda284e 100644 --- a/regress/lib/Perl5/Test/TestLib.pm +++ b/regress/lib/Perl5/Test/TestLib.pm @@ -231,6 +231,7 @@ sub nftest_init { "ignore_byte_count", "num_ports=i", "common-st-args=s", + "no_vlan", "no_slicing", "no_barrier", "less_ports" diff --git a/regress/projects/black_box/regress/test_forward_exact_all/run.pl b/regress/projects/black_box/regress/test_forward_exact_all/run.pl index 233c111..052ebbe 100755 --- a/regress/projects/black_box/regress/test_forward_exact_all/run.pl +++ b/regress/projects/black_box/regress/test_forward_exact_all/run.pl @@ -22,7 +22,9 @@ sub my_test { my ( $sock, $options_ref ) = @_; for_all_ports( $ofp, $sock, $options_ref, \&forward_all, 0x0); - for_all_ports( $ofp, $sock, $options_ref, \&forward_all_vlan, 0x0); + if ( not defined( $$options_ref{'no_vlan'} ) ) { + for_all_ports( $ofp, $sock, $options_ref, \&forward_all_vlan, 0x0); + } } run_black_box_test( \&my_test, \@ARGV ); diff --git a/regress/projects/black_box/regress/test_forward_exact_controller/run.pl b/regress/projects/black_box/regress/test_forward_exact_controller/run.pl index 109d044..e0888d1 100755 --- a/regress/projects/black_box/regress/test_forward_exact_controller/run.pl +++ b/regress/projects/black_box/regress/test_forward_exact_controller/run.pl @@ -24,7 +24,9 @@ sub my_test { my ( $sock, $options_ref ) = @_; for_all_ports( $ofp, $sock, $options_ref, \&forward_controller, 0x0); - for_all_ports( $ofp, $sock, $options_ref, \&forward_controller_vlan, 0x0); + if ( not defined( $$options_ref{'no_vlan'} ) ) { + for_all_ports( $ofp, $sock, $options_ref, \&forward_controller_vlan, 0x0); + } } run_black_box_test( \&my_test, \@ARGV ); diff --git a/regress/projects/black_box/regress/test_forward_exact_modify_action/run.pl b/regress/projects/black_box/regress/test_forward_exact_modify_action/run.pl index 795a9ee..805c9ad 100755 --- a/regress/projects/black_box/regress/test_forward_exact_modify_action/run.pl +++ b/regress/projects/black_box/regress/test_forward_exact_modify_action/run.pl @@ -6,7 +6,15 @@ use OF::Includes; sub forward_port { - my @chg_field = ('vlan_vid', 'vlan_pcp', 'dl_src', 'dl_dst', 'nw_src', 'nw_dst', 'tp_src', 'tp_dst'); + my ( $ofp, $sock, $options_ref, $in_port_offset, $out_port_offset, + $wildcards ) = @_; + + my @chg_field; + if ( not defined( $$options_ref{'no_vlan'} ) ) { + @chg_field = ('vlan_vid', 'vlan_pcp', 'dl_src', 'dl_dst', 'nw_src', 'nw_dst', 'tp_src', 'tp_dst'); + } else { + @chg_field = ('dl_src', 'dl_dst', 'nw_src', 'nw_dst', 'tp_src', 'tp_dst'); + } foreach (@chg_field) { forward_simple(@_, 'port', undef, $_ ); } @@ -26,7 +34,9 @@ sub my_test { my ( $sock, $options_ref ) = @_; for_all_port_pairs( $ofp, $sock, $options_ref, \&forward_port, 0x0); - for_all_port_pairs( $ofp, $sock, $options_ref, \&forward_port_vlan, 0x0); + if ( not defined( $$options_ref{'no_vlan'} ) ) { + for_all_port_pairs( $ofp, $sock, $options_ref, \&forward_port_vlan, 0x0); + } } run_black_box_test( \&my_test, \@ARGV ); diff --git a/regress/projects/black_box/regress/test_forward_exact_port/run.pl b/regress/projects/black_box/regress/test_forward_exact_port/run.pl index 436ceaf..c3fc215 100755 --- a/regress/projects/black_box/regress/test_forward_exact_port/run.pl +++ b/regress/projects/black_box/regress/test_forward_exact_port/run.pl @@ -19,7 +19,9 @@ sub my_test { my ($sock, $options_ref) = @_; for_all_port_pairs($ofp, $sock, $options_ref, \&forward_unicast_port, 0x0); - for_all_port_pairs($ofp, $sock, $options_ref, \&forward_unicast_vlan_port, 0x0); + if ( not defined( $$options_ref{'no_vlan'} ) ) { + for_all_port_pairs($ofp, $sock, $options_ref, \&forward_unicast_vlan_port, 0x0); + } } run_black_box_test(\&my_test, \@ARGV); diff --git a/regress/projects/black_box/regress/test_forward_wildcard_all/run.pl b/regress/projects/black_box/regress/test_forward_wildcard_all/run.pl index 41575f1..51a504b 100755 --- a/regress/projects/black_box/regress/test_forward_wildcard_all/run.pl +++ b/regress/projects/black_box/regress/test_forward_wildcard_all/run.pl @@ -21,7 +21,9 @@ sub my_test { my ( $sock, $options_ref ) = @_; for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_all); - for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_all_vlan); + if ( not defined( $$options_ref{'no_vlan'} ) ) { + for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_all_vlan); + } } run_black_box_test( \&my_test, \@ARGV ); diff --git a/regress/projects/black_box/regress/test_forward_wildcard_controller/run.pl b/regress/projects/black_box/regress/test_forward_wildcard_controller/run.pl index 5b4ee94..125c507 100755 --- a/regress/projects/black_box/regress/test_forward_wildcard_controller/run.pl +++ b/regress/projects/black_box/regress/test_forward_wildcard_controller/run.pl @@ -21,7 +21,9 @@ sub my_test { my ( $sock, $options_ref ) = @_; for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_controller); - for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_controller_vlan); + if ( not defined( $$options_ref{'no_vlan'} ) ) { + for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_controller_vlan); + } } run_black_box_test( \&my_test, \@ARGV ); diff --git a/regress/projects/black_box/regress/test_forward_wildcard_modify_action/run.pl b/regress/projects/black_box/regress/test_forward_wildcard_modify_action/run.pl index 6e0dc19..ca32aaa 100755 --- a/regress/projects/black_box/regress/test_forward_wildcard_modify_action/run.pl +++ b/regress/projects/black_box/regress/test_forward_wildcard_modify_action/run.pl @@ -26,7 +26,9 @@ sub my_test { my ( $sock, $options_ref ) = @_; for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port); - for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port_vlan); + if ( not defined( $$options_ref{'no_vlan'} ) ) { + for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port_vlan); + } } run_black_box_test( \&my_test, \@ARGV ); diff --git a/regress/projects/black_box/regress/test_forward_wildcard_port/run.pl b/regress/projects/black_box/regress/test_forward_wildcard_port/run.pl index eeb5155..934da7c 100755 --- a/regress/projects/black_box/regress/test_forward_wildcard_port/run.pl +++ b/regress/projects/black_box/regress/test_forward_wildcard_port/run.pl @@ -21,7 +21,9 @@ sub my_test { my ( $sock, $options_ref ) = @_; for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port); - for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port_vlan); + if ( not defined( $$options_ref{'no_vlan'} ) ) { + for_all_wildcards( $ofp, $sock, $options_ref, \&forward_wc_port_vlan); + } } run_black_box_test( \&my_test, \@ARGV );