bridge: Refactor the 'Instant' stats logic.
authorAlex Wang <alexw@nicira.com>
Thu, 3 Apr 2014 20:12:35 +0000 (13:12 -0700)
committerAlex Wang <alexw@nicira.com>
Mon, 28 Apr 2014 04:21:51 +0000 (21:21 -0700)
This commit refactors the 'Instant' stats related logic in bridge.c
by moving it into bridge_run().

This change brings the following effects:

1. bridge.c will wait on the global connectivity sequence number when
   there is no pending instant stats transaction.  and the main thread
   will no longer be waken up every 100 ms for 'Instant' stats check.
   the related overhead is eliminated.

2. the netdev's sequence number is used to avoid updating unchanged netdev
   status.  so, the update is more efficient.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>

No differences found