diff --git a/datapath/datapath.c b/datapath/datapath.c index 633185c..cb1f223 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -367,7 +367,7 @@ err_unlock: static int find_portno(struct datapath *dp) { int i; - for (i = 0; i < DP_MAX_PORTS; i++) + for (i = 1; i < DP_MAX_PORTS; i++) if (dp->ports[i] == NULL) return i; return -EXFULL; diff --git a/regress/bin/of_kmod_test.pl b/regress/bin/of_kmod_test.pl index b6b5f0f..783f879 100755 --- a/regress/bin/of_kmod_test.pl +++ b/regress/bin/of_kmod_test.pl @@ -22,6 +22,6 @@ sub INT_Handler { exit(1); } -push (@ARGV, "--root=$ENV{'OFT_ROOT'}", "--common-st-args=kmod"); +push (@ARGV, "--root=$ENV{'OFT_ROOT'}", "--port_base=1", "--common-st-args=kmod"); run_regress_test( \&INT_Handler, @ARGV ); diff --git a/regress/bin/of_kmod_veth_test.pl b/regress/bin/of_kmod_veth_test.pl index 270fa3c..0f08edb 100755 --- a/regress/bin/of_kmod_veth_test.pl +++ b/regress/bin/of_kmod_veth_test.pl @@ -22,6 +22,6 @@ sub INT_Handler { exit(1); } -push (@ARGV, "--map=$ENV{'OFT_ROOT'}/bin/veth.map", "--root=$ENV{'OFT_ROOT'}", "--common-st-args=kmod_veth"); +push (@ARGV, "--map=$ENV{'OFT_ROOT'}/bin/veth.map", "--root=$ENV{'OFT_ROOT'}", "--port_base=1", "--common-st-args=kmod_veth"); run_regress_test( \&INT_Handler, @ARGV ); diff --git a/regress/bin/of_nf2_test.pl b/regress/bin/of_nf2_test.pl index 28062ec..7124c78 100755 --- a/regress/bin/of_nf2_test.pl +++ b/regress/bin/of_nf2_test.pl @@ -22,6 +22,6 @@ sub INT_Handler { exit(1); } -push (@ARGV, "--root=$ENV{'OFT_ROOT'}", "--map=$ENV{'OFT_ROOT'}/bin/nf2.map", "--common-st-args=nf2", "--port_base=0"); +push (@ARGV, "--root=$ENV{'OFT_ROOT'}", "--map=$ENV{'OFT_ROOT'}/bin/nf2.map", "--port_base=1", "--common-st-args=nf2", "--port_base=0"); run_regress_test( \&INT_Handler, @ARGV ); diff --git a/regress/bin/of_user_test.pl b/regress/bin/of_user_test.pl index 3036626..6a1bcbf 100755 --- a/regress/bin/of_user_test.pl +++ b/regress/bin/of_user_test.pl @@ -22,6 +22,6 @@ sub INT_Handler { exit(1); } -push (@ARGV, "--root=$ENV{'OFT_ROOT'}", "--common-st-args=user"); +push (@ARGV, "--root=$ENV{'OFT_ROOT'}", "--port_base=1", "--common-st-args=user"); run_regress_test( \&INT_Handler, @ARGV ); diff --git a/regress/bin/of_user_veth_test.pl b/regress/bin/of_user_veth_test.pl index f4abc7d..63551f9 100755 --- a/regress/bin/of_user_veth_test.pl +++ b/regress/bin/of_user_veth_test.pl @@ -22,6 +22,6 @@ sub INT_Handler { exit(1); } -push( @ARGV, "--map=$ENV{'OFT_ROOT'}/bin/veth.map", "--root=$ENV{'OFT_ROOT'}", "--common-st-args=user_veth"); +push( @ARGV, "--map=$ENV{'OFT_ROOT'}/bin/veth.map", "--root=$ENV{'OFT_ROOT'}", "--port_base=1", "--common-st-args=user_veth"); run_regress_test( \&INT_Handler, @ARGV ); diff --git a/udatapath/datapath.c b/udatapath/datapath.c index 130bf25..ac878e3 100644 --- a/udatapath/datapath.c +++ b/udatapath/datapath.c @@ -246,7 +246,7 @@ int dp_add_port(struct datapath *dp, const char *netdev) { int port_no; - for (port_no = 0; port_no < DP_MAX_PORTS; port_no++) { + for (port_no = 1; port_no < DP_MAX_PORTS; port_no++) { struct sw_port *port = &dp->ports[port_no]; if (!port->netdev) { return new_port(dp, port, port_no, netdev, NULL);