[ovs-dev] [PATCH] ofproto-dpif-upcall: Fix a bug.

Joe Stringer joestringer at nicira.com
Sat Apr 26 00:47:49 UTC 2014


Thanks for fixing this, Alex. I think there was a bit of mixup the last
time I rebased.


On 26 April 2014 07:33, Alex Wang <alexw at nicira.com> wrote:

> Applied, thx a lot,
>
> Now, let's fix the build (unittest) issue~~~
>
>
> On Fri, Apr 25, 2014 at 11:31 AM, Gurucharan Shetty <shettyg at nicira.com>wrote:
>
>> On Fri, Apr 25, 2014 at 11:04 AM, Alex Wang <alexw at nicira.com> wrote:
>> > Commit 7d170098 (ofproto-dpif-upcall: Remove the flow_dumper thread.)
>> > initialized the memory barrier inside the udpif_start_threads()
>> function.
>> > However, the udpif_start_threads() function does not check the number of
>> > revalidator threads specified in udpif.  So, when the number is zero, it
>> > causes the error in barrier initialization.  This could happen when the
>> > other_config:flow-restore-wait is set and the udpif_flush() is called.
>> >
>> > This commit fixes the issue, by checking the specified number of threads
>> > in udpif_start_threads().
>> >
>> > Reported-by: Gurucharan Shetty <gshetty at nicira.com>
>> > Signed-off-by: Alex Wang <alexw at nicira.com>
>>
>> This patch fixes the problem for me. It also looks correct. But the
>> code here has changed so much over the past few months, that I do not
>> understand all the implications.
>> So, with that :
>> Acked-by: Gurucharan Shetty <gshetty at nicira.com>
>>
>> > ---
>> >  ofproto/ofproto-dpif-upcall.c |    2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/ofproto/ofproto-dpif-upcall.c
>> b/ofproto/ofproto-dpif-upcall.c
>> > index 84afc56..717563a 100644
>> > --- a/ofproto/ofproto-dpif-upcall.c
>> > +++ b/ofproto/ofproto-dpif-upcall.c
>> > @@ -342,7 +342,7 @@ static void
>> >  udpif_start_threads(struct udpif *udpif, size_t n_handlers,
>> >                      size_t n_revalidators)
>> >  {
>> > -    if (udpif && (!udpif->handlers && !udpif->revalidators)) {
>> > +    if (udpif && n_handlers && n_revalidators) {
>> >          size_t i;
>> >
>> >          udpif->n_handlers = n_handlers;
>> > --
>> > 1.7.9.5
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20140426/64f8a88a/attachment-0005.html>


More information about the dev mailing list