From af5739857a23c29953520e0fe9e79860d12b256c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 16 Mar 2011 14:32:38 -0700 Subject: [PATCH] cfm: Immediately signal a fault upon receiving an unexpected MPID. An unexpected MPID is always a fault, but the CFM code didn't signal the fault until the next time cfm_run() was called. In one experiment I saw a visible lag in the database (although I wasn't able to reproduce it again within a few tries). --- lib/cfm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cfm.c b/lib/cfm.c index 567dc579..0d720946 100644 --- a/lib/cfm.c +++ b/lib/cfm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Nicira Networks. + * Copyright (c) 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -435,6 +435,7 @@ cfm_process_heartbeat(struct cfm *cfm, const struct ofpbuf *p) rmp = xzalloc(sizeof *rmp); rmp->mpid = ccm_mpid; hmap_insert(&cfm->x_remote_mps, &rmp->node, hash_mpid(ccm_mpid)); + cfm->fault = true; } rmp->recv_time = time_msec(); -- 2.30.2