Re: [ovs-dev] [RFC] bfd: Replace bfd.{c, h} with generic implementation.

2014-03-04 Thread Alex Wang
On Mon, Mar 3, 2014 at 11:38 PM, Ben Pfaff wrote: > OK. > > I didn't review the whole patch, by the way, I just noticed this > glancing at the first little bit. Sure, I'm aware of that. After checking the random.c code, I think it may be require converting more ovs code (e.g. pthread data, en

Re: [ovs-dev] [RFC] bfd: Replace bfd.{c, h} with generic implementation.

2014-03-03 Thread Ben Pfaff
OK. I didn't review the whole patch, by the way, I just noticed this glancing at the first little bit. On Mon, Mar 03, 2014 at 05:57:55PM -0800, Alex Wang wrote: > Yeah, I was not sure about this either. > > I was trying to avoid pulling any ovs specific library to the 'libbfd' and > considering

Re: [ovs-dev] [RFC] bfd: Replace bfd.{c, h} with generic implementation.

2014-03-03 Thread Alex Wang
Yeah, I was not sure about this either. I was trying to avoid pulling any ovs specific library to the 'libbfd' and considering that bfd_set_next_tx() (which uses rand()) will only be called while holding the global lock. I agree that this will leave risk for future development. I think I will ju

Re: [ovs-dev] [RFC] bfd: Replace bfd.{c, h} with generic implementation.

2014-03-03 Thread Ben Pfaff
On Mon, Mar 03, 2014 at 05:46:41PM -0800, Alex Wang wrote: > This commit replaces the current bfd.{c,h} with a generic library-like > implementation. Wrappers (in bfd_ts.{c,h}) are then added to guarantee > the thread-safety and compatibility with current invocation pattern. > > Signed-off-by: Al