ofproto: Start ofport allocation from the previous max after restart.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 19 Aug 2013 21:45:02 +0000 (14:45 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 21 Aug 2013 21:24:17 +0000 (14:24 -0700)
commit7c35397c84dc4930e7c2be9d5dcef3a4955abbda
tree1a6186871b70e30eb5d4be1f34772fc76099fc3b
parent3fd6ef29e72aae6eb16e2e0bae7b599ddf6062b9
ofproto: Start ofport allocation from the previous max after restart.

We currently do not recycle ofport numbers from interfaces that are recently
deleted by maintaining the maximum allocated ofport value and
allocating new ofport numbers greater than the previous maximum.
But after a restart of ovs-vswitchd, we start again from ofport value of '1'.
This means that after a restart, we can immeditaley recycle the 'ofport'
value of the most recently deleted interface.

With this commit, during ovs-vswitchd initial configuration, we figure
out the previously allocated max ofport value. New interfaces get ofport
value that is greater than this.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto.c