tunnel: Recreate tunnel port only when the netdev status change.
authorAlex Wang <alexw@nicira.com>
Fri, 5 Dec 2014 22:02:53 +0000 (14:02 -0800)
committerAlex Wang <alexw@nicira.com>
Fri, 5 Dec 2014 22:02:53 +0000 (14:02 -0800)
commit7631e9bc5209e5b06d1d2fb3c06ee7fb343028c6
treed195292377324c4018d4b057038a045a451d946f
parentec26264171cf866f453d7f2ab55569b36678c488
tunnel: Recreate tunnel port only when the netdev status change.

On current master, the 'struct tnl_port' in tunnel module will be
recreated whenever the global connectivity sequence number changes
(e.g. when adding unrelated flow).  This is unnecessary and could
cause drop of tunnel packet if a lookup happens between the removal
and recreate.

This commit fixes the above issue by only checking the netdev's own
sequence number.

Found by code inspection.

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