ofproto-dpif: Don't poll ports when nothing changes
authorJoe Stringer <joestringer@nicira.com>
Fri, 13 Dec 2013 03:33:47 +0000 (03:33 +0000)
committerEthan Jackson <ethan@nicira.com>
Thu, 12 Dec 2013 23:03:50 +0000 (15:03 -0800)
commitf23d157c05649d369c5456e9a18bb47716306893
tree2fe9b12007b6a0a5ed840e275e372346bb8ed65b
parentda4a619179d6d6e9e6a82977c41cfcc2d1533ad8
ofproto-dpif: Don't poll ports when nothing changes

Previously, as part of ofproto-dpif run() processing, we would loop
through all ports and poll for changes to carrier, bfd, cfm and lacp
status. This information is used to determine whether bundles may be
enabled, and to perform revalidation when needed.

This patch makes the bfd, cfm, lacp and stp modules aware of the new
global connectivity_seq, notifying on changes in port status. We can
then use connectivity_seq to check if anything has changed before
looping through all ports in ofproto-dpif. In a test environment of 5000
internal ports and 50 tunnel ports with bfd, this reduces average CPU
usage of the main thread from about 35% to about 25%.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/bfd.c
lib/cfm.c
lib/lacp.c
lib/stp.c
ofproto/ofproto-dpif.c