Start port enumeration: Change OpenFlow start port enumeration at 1
This commit is contained in:
1 parent
a47208dc76
commit
1ae2cd3781
7 files changed
+7
-7
No files matched your search
+1
-1
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
@@ -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 );
|
||||
@@ -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 );
|
||||
@@ -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 );
|
||||
@@ -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 );
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user