From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C943A0C44; Mon, 12 Apr 2021 12:08:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F224141096; Mon, 12 Apr 2021 12:08:09 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id 2ED4A14108F for ; Mon, 12 Apr 2021 12:08:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618222087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AVzEj8lmotXz6k6tOhMR6gWG3gzhoejIgbh/xLv/cW8=; b=fVus++AG3Vk+GaQxMi8UBzUp/iQJkrK8wJpPh9y0eb2JW2xwx4SJ/aKqdOdjajAzSSZol8 xaGV1qg9GIsdESP32DQr3KZ1eSODZhgjmAJ3jhIwqTMTILN9mnxFT/UXFP5uzwgtaOpaP6 GE4T2Jd2FqYoUXVe1XMh0LkAgEWriUo= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-526-fXMDeXYbOdabG8pmwVxhDA-1; Mon, 12 Apr 2021 06:08:04 -0400 X-MC-Unique: fXMDeXYbOdabG8pmwVxhDA-1 Received: by mail-vs1-f71.google.com with SMTP id y22so14751vsc.7 for ; Mon, 12 Apr 2021 03:08:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AVzEj8lmotXz6k6tOhMR6gWG3gzhoejIgbh/xLv/cW8=; b=Yuwu0v6PkX9FsPTBXFInZIxqlVtWfGkir6U7E+Clq9H9tQ8MoTf/67KlAGx5szC92N CC9lyB70C81uii2jZDXGH0eXkk10phRzV1Lk3mj2ZOXUkwEZ28qHpyOvFqnbX7jEV10v 1ejeqYPNQfyYthPQ8UXWRYGdw8zgC7b0O5iQcjxo6xPIbFs03E5zB249OcTtTP/rgMWA J/+7KFOevn7VNs8fjGcCvXbCzYNp2kJgo7CTDHqtuVXVWhEtjjCCBPKRrpU6j+us7Z1g TsEiAJBl/KzW8cBt+0lCRHZigUhdclloJaZ8mnAIxP2TcpMbYmLT1l2ph2AIQsyMtY+N NmtQ== X-Gm-Message-State: AOAM530KNsbYCm/fzsbGfxZYWUWs9KTHWYbJGQC00efdhtxOMcIVP5+z bxIDuH45pI+56NnyeGF4tFrb+ylSofRLzyVt+tOs4Wcbv7RwUAeeYtJePq16NrSbvDifhe7lE8A qs/y3bamEgfPi8SHKHp4= X-Received: by 2002:a67:efd4:: with SMTP id s20mr16611578vsp.27.1618222083607; Mon, 12 Apr 2021 03:08:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+H9I2iW7C5lIn7cfwZHlyvFUPrfvuR/T8fr19GKdja+7gNwrqNWGNR+Mr0Hfvv6iAf/8rAVfycvZMbNF3Amw= X-Received: by 2002:a67:efd4:: with SMTP id s20mr16611560vsp.27.1618222083401; Mon, 12 Apr 2021 03:08:03 -0700 (PDT) MIME-Version: 1.0 References: <20210410195433.13416-1-talshn@nvidia.com> In-Reply-To: <20210410195433.13416-1-talshn@nvidia.com> From: David Marchand Date: Mon, 12 Apr 2021 12:07:52 +0200 Message-ID: To: Tal Shnaiderman Cc: dev , Thomas Monjalon , Pallavi Kadam , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , "Dmitry Malloy (MESHCHANINOV)" , Luc Pelletier , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] eal/windows: fix pthreads macros return values X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sat, Apr 10, 2021 at 9:55 PM Tal Shnaiderman wrote: > > The macro definitions of the following pthread functions > return incorrect values from the inner function return code. > > while pthread_barrier_init, pthread_barrier_destroy and > pthread_cancel return 0 in a case of success and non zero (errno) value > otherwise the shimming functions InitializeSynchronizationBarrier, > DeleteSynchronizationBarrier and TerminateThread return FALSE (0) > in a case of failure and TRUE(1) in a case of success. > > This issue was undetected as none of the functions return codes was > checked until such check was added in commit 34cc55cce6b1 ("eal: fix > race in control thread creation") exposing the issue by failing > pthread_barrier_init and rte_eal_init on Windows as a result. > > The fix aligned the return value of the 3 function with the expected > pthread API return values. > > Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros") > Fixes: 34cc55cce6b1 ("eal: fix race in control thread creation") Only the first Fixes: makes sense. The second commit you refer to relies on a working pthread implementation. -- David Marchand