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 4695BA0C44; Wed, 9 Jun 2021 01:04:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE36C40E3C; Wed, 9 Jun 2021 01:04:22 +0200 (CEST) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mails.dpdk.org (Postfix) with ESMTP id D809140DFD for ; Wed, 9 Jun 2021 01:04:21 +0200 (CEST) Received: by mail-lf1-f53.google.com with SMTP id p17so33955477lfc.6 for ; Tue, 08 Jun 2021 16:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xz7iU0WggOqAwpKVYquu96P3u+3zovGskN8SZzeUQnk=; b=CuojWciP2nboFf7RYk7Jc07Um8hOwc6ZKVkUwjyy4Cmf2FgGHy1wy77jdpezar3VxT jTQanQX9hdDo2C0OdHGqXzUMzSc2NZuhdbpVAPZFKJj01kpzupX41/3y0TNWw78b05V1 p3AP9ogTF543JF/ZyjhpigFgW7GKI0oLMCOGugTbBNNUCJQQAMTOeKswdvDfZTEAnm1I C+yFcxDT7NvLZpBIbewcHtbt11of7+IYxDpR10dWIsYy1jWKRFcKaPITCBi4ScJ30TmF b2i+39rS4oPUyB635YwDPJ67JWwbsReBvME9e5F0XxB8El7hPi1yQyojko8b/JqUn2Za Gf1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xz7iU0WggOqAwpKVYquu96P3u+3zovGskN8SZzeUQnk=; b=ecF+Q3YYICCnvjHs9rbwAQeEsgi82wsZvpUS7Ryzwik6XlVVkMiXErjViFRJOOji5t eRqJ65StWVav/OZhyStPVtfXubApfN8VKMbfvQzrY5UN0Jen+YIiiB0jJ77/rRHRVrdr J0dVz1/wF9loNrcMPbmRyetbPl03Y19Hz5WEEo5xx+s+nfLY0Hsfw0ABotV5zNC0basw mdSZ8OYLissWpJ85ZvQQIpEq4L1sSvetkm1xHaTFY0DNM+VLEvCLkXxoAelgbk3HA5DU B0R08pUFm/28Mor5TpjHOmQdKdKXVVpjw2xV1H9Zm2cowNMeyhr/27PkDQW71vY34Ey/ cuTg== X-Gm-Message-State: AOAM533y67ERKC7wcVxcz34ukMUoOevG1OlxBfumH6tOg6fVCjvMpTjZ uQ1H26Z63t06TrASmOGCogc= X-Google-Smtp-Source: ABdhPJxzZHlfMHRXu3TenR0esAJDY3Fgay5xHZH0BJyENkktBE9GtDcmdgLCd7mIKaGlxUmgctYwEg== X-Received: by 2002:ac2:5338:: with SMTP id f24mr17019702lfh.274.1623193461546; Tue, 08 Jun 2021 16:04:21 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id 76sm127402ljj.32.2021.06.08.16.04.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 16:04:21 -0700 (PDT) Date: Wed, 9 Jun 2021 02:04:19 +0300 From: Dmitry Kozlyuk To: Narcisa Ana Maria Vasile Cc: dev@dpdk.org, thomas@monjalon.net, khot@microsoft.com, navasile@microsoft.com, dmitrym@microsoft.com, roretzla@microsoft.com, talshn@nvidia.com, ocardona@microsoft.com, bruce.richardson@intel.com, david.marchand@redhat.com, pallavi.kadam@intel.com Message-ID: <20210609020419.6671302f@sovereign> In-Reply-To: <1622850274-6946-8-git-send-email-navasile@linux.microsoft.com> References: <1622849908-5710-1-git-send-email-navasile@linux.microsoft.com> <1622850274-6946-1-git-send-email-navasile@linux.microsoft.com> <1622850274-6946-8-git-send-email-navasile@linux.microsoft.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v9 07/10] eal: implement functions for mutex management 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" 2021-06-04 16:44 (UTC-0700), Narcisa Ana Maria Vasile: [...] > diff --git a/lib/eal/include/rte_thread_types.h b/lib/eal/include/rte_thread_types.h > index d67b24a563..7bb0d2948c 100644 > --- a/lib/eal/include/rte_thread_types.h > +++ b/lib/eal/include/rte_thread_types.h > @@ -7,4 +7,8 @@ > > #include > > +#define RTE_THREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER > + > +typedef pthread_mutex_t rte_thread_mutex_t; > + > #endif /* _RTE_THREAD_TYPES_H_ */ > diff --git a/lib/eal/windows/include/rte_windows_thread_types.h b/lib/eal/windows/include/rte_windows_thread_types.h > index 60e6d94553..c6c8502bfb 100644 > --- a/lib/eal/windows/include/rte_windows_thread_types.h > +++ b/lib/eal/windows/include/rte_windows_thread_types.h > @@ -7,4 +7,13 @@ > > #include > > +#define WINDOWS_MUTEX_INITIALIZER (void*)-1 > +#define RTE_THREAD_MUTEX_INITIALIZER {WINDOWS_MUTEX_INITIALIZER} > + > +struct thread_mutex_t { > + void* mutex_id; > +}; > + > +typedef struct thread_mutex_t rte_thread_mutex_t; > + > #endif /* _RTE_THREAD_TYPES_H_ */ In previous patches rte_thread content was made opaque and of equal size for pthread (most implementations) and non-pthread variant. AFAIU, we agree on the requirement of compatible ABI between variants, that is, a compiled app can work with any threading variant of DPDK. Above definition of `rte_thread_mutex_t` does not satisfy it. Or do we only promise API compatibility? This is the most important question now. Also: DPDK should not export names without `rte_` prefix, i. e. `WINDOWS_MUTEX_INITIALIZER` and `thread_mutex_t`. Besides, why `_t`?