Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-06 Thread Ben Pfaff
On Thu, Apr 05, 2012 at 05:57:57PM -0700, Mehak Mahajan wrote: > The CFM packets that are out of sequence or contain invalid cfm_interval were > previously not ignored. The behavior is changed with this patch to not > process those CFM frames. > > Signed-off-by: Mehak Mahajan Please put a space

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Ethan Jackson
Thanks, this looks good to me. > +            if (rmp->mpid == cfm->mpid) { > +               cfm_fault |= CFM_FAULT_LOOPBACK; > +                VLOG_WARN_RL(&rl,"%s: received CCM with local MPID" > +                             " %"PRIu64, cfm->name, rmp->mpid); > +            } The indentatio

[ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Mehak Mahajan
The CFM packets that are out of sequence or contain invalid cfm_interval were previously not ignored. The behavior is changed with this patch to not process those CFM frames. Signed-off-by: Mehak Mahajan --- lib/cfm.c| 61 ++--- lib/cfm.h

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Mehak Mahajan
Hey, Thank Ben and Ethan for your comments. I have taken care of them. We are now setting all possible faults when we get the heartbeat message. thanx! mehak On Thu, Apr 5, 2012 at 4:00 PM, Ethan Jackson wrote: > > -rmp->recv = true; > > -if (!fault) { > > +

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Ethan Jackson
> -            rmp->recv = true; > -            if (!fault) { > +            if (!cfm_fault && !ccm_rdi) { >                 rmp->num_health_ccm++; >             } > +            if (!cfm_fault) { > +                rmp->recv = true; > +            } > +            cfm->recv_fault |= cfm_fault; I

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Ben Pfaff
On Thu, Apr 05, 2012 at 03:41:45PM -0700, Ethan Jackson wrote: > > That sounds even better, because the CFM object would signal RDI > > immediately without waiting for the next fault check. > > No actually this data only changes on fault checks. Ah, you're right, of course. __

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Ethan Jackson
> No actually this data only changes on fault checks. i.e. it's only written to the database on fault checks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Ethan Jackson
> That sounds even better, because the CFM object would signal RDI > immediately without waiting for the next fault check. No actually this data only changes on fault checks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinf

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Ben Pfaff
On Thu, Apr 05, 2012 at 03:32:50PM -0700, Ethan Jackson wrote: > > It looks like rdi gets updated on every CCM packet receive, so that if > > we receive a CCM without RDI after one with it between fault checks, > > cfm_run() won't report the RDI.  I wonder whether we should actually > > only reset

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Ethan Jackson
> It looks like rdi gets updated on every CCM packet receive, so that if > we receive a CCM without RDI after one with it between fault checks, > cfm_run() won't report the RDI.  I wonder whether we should actually > only reset rdi to false in cfm_run() and only set it to true, never to > false, in

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Ben Pfaff
On Thu, Apr 05, 2012 at 03:12:21PM -0700, Mehak Mahajan wrote: > The CFM packets that are out of sequence or contain invalid cfm_interval were > previously not ignored. The behavior is changed with this patch to not > process those CFM frames. > > Signed-off-by: Mehak Mahajan I guess Ethan ought

[ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-05 Thread Mehak Mahajan
The CFM packets that are out of sequence or contain invalid cfm_interval were previously not ignored. The behavior is changed with this patch to not process those CFM frames. Signed-off-by: Mehak Mahajan --- lib/cfm.c| 21 ++--- lib/cfm.h|4 +++- vsw

Re: [ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-04 Thread Ethan Jackson
Thanks for doing this. It basically looks like what we want. One question, shouldn't we calculate the new cfm_fault flag and then set then OR it into the old recv fault flag? It looks like with this code the new fault reasons won't cause the fault flag to be triggered. Ethan On Apr 4, 2

[ovs-dev] [PATCH] Added handling of previously ignored cfm faults.

2012-04-04 Thread Mehak Mahajan
The CFM packets that are out of sequence or contain invalid cfm_interval were previously not ignored. The behavior is changed with this patch to not process those CFM frames. Signed-off-by: Mehak Mahajan --- lib/cfm.c|9 - lib/cfm.h|4 +++- vswitchd/vswitc