From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4963EA0535; Wed, 5 Feb 2020 00:57:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7DBBD1C1A1; Wed, 5 Feb 2020 00:57:32 +0100 (CET) Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by dpdk.org (Postfix) with ESMTP id 3BCCC1C13A for ; Wed, 5 Feb 2020 00:57:31 +0100 (CET) Received: by mail-lf1-f65.google.com with SMTP id z26so97844lfg.13 for ; Tue, 04 Feb 2020 15:57:31 -0800 (PST) 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=gx1Bo5DDHQgiJBxLPC6qtXicUCX2Au6+FqSv/9OS3mY=; b=FQbemGda5OapqmQsgxm8or/rm7xruaBIf2fuEiA9hJ9g8yRHtebE8SkPCjDSrfcOWj 8Awu3U46LU+SDoJn2nKkqw533PUrcRtrPealKk1o2WEPz9ItyW8nm+Q5N4BWpjwcii5B oT77B3HX8V1DSLe9n/IYC4FD+R0LcTU5ZZ9TFkDbpgTyWycMViZgViW4A+0fG2ia1YBt aBAPI7pmktwChp8isl/xR9FwKM4doCRLi9jz6H/Gc0UjdVzZmyGibY1q/Eg3xQWiC5HZ UoOd4Dy1gsh6fRfEHDvQE7aSRVtJR9oxqzterA8uh7Q8akjLmR4gAvFbUsyEHjtWEC10 NOkg== 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=gx1Bo5DDHQgiJBxLPC6qtXicUCX2Au6+FqSv/9OS3mY=; b=SCqpIX4hoPKb6hD9G1MykOAgpbU+jdv6ayFt/tZ6a4i6GFfmCSxmZ2FY5iNCvp0pE9 xetksuLNz3JNxFlZFRxvZRu2uiKw9G0dYB6XhZQ5MxnwZYbZ5LXidxRuRfGUrDbIxO2d E6WYqPzUWdGsLZnoBTm2Inbjr2/hAIqPYNdn+wGL2GFwQE6v+fFhUIe2I90MpeDL+YAh TJBwFVO1/tlobQQLncs90hulaZ/hkRDAaQ0stvNpXVIEL0cUEV4fdzX78GzVzEHwaGMi bvoeZ32BHnVXpgy3vkxeUxUJE8XWK48CBmXLlhy1G6tphbhRJRdBWWdhCaXRej+76t4U Tb9g== X-Gm-Message-State: APjAAAXOfFi5o2peGHZG20uEZxlp+QFuQISvok9iyy7A2dszHaAX9NS6 rCPtPhMQE4OzrZfoHk2nwqI= X-Google-Smtp-Source: APXvYqw59hfNfb5TAOsneJ7sG6gwY6tnJXKbNXUddFKyXbFEbWHTyrp3hI80Y906hMIqT4RqDaQWWg== X-Received: by 2002:a19:c014:: with SMTP id q20mr16455926lff.208.1580860650691; Tue, 04 Feb 2020 15:57:30 -0800 (PST) Received: from Sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id 19sm13287820lft.81.2020.02.04.15.57.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 15:57:30 -0800 (PST) Date: Wed, 5 Feb 2020 02:57:28 +0300 From: Dmitry Kozlyuk To: Thomas Monjalon Cc: dev@dpdk.org, Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , Ranjit Menon , John McNamara , Marko Kovacevic , Tal Shnaiderman Message-ID: <20200205025728.4562e90b@Sovereign> In-Reply-To: <2467193.BddDVKsqQX@xps> References: <20200131030744.19596-1-dmitry.kozliuk@gmail.com> <20200131030744.19596-7-dmitry.kozliuk@gmail.com> <2467193.BddDVKsqQX@xps> X-Mailer: Claws Mail 3.17.4 (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 6/6] doc: guide for Windows build using MinGW-w64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" > I think having the choice between GCC and Clang for Windows is very cool. > > When starting the Windows port, I asked the fundamental question of the > supported compilers. The answer was MinGW adds "non-standard" DLLs: > https://mails.dpdk.org/archives/dev/2019-January/124236.html Indeed, it does add a pthread implementation DLL, I even documented it. It presents no technical or legal trouble though. > Now the question is to know which one is the easiest to use? The issues are a few (almost all in this message), after they are resolved, there is no significant difference. With MinGW, more things work out of the box. It also allows for immediate cross-compilation from Linux, which is important while Windows drivers are unstable and can crash the system hard. > If I understand well, MinGW brings the missing parts we are trying > to add in the DPDK repository for compliance with POSIX libraries. Yes, having pthread implementation out-of-the-box helps with porting EAL. Clang can use external pthread, e. g. winpthreads [0] (not to be confused with winpthread without S). MinGW doesn't aim to provide POSIX support, it only brings the parts required for GCC toolchain. Clang has structure alignment issue, which is a show-stopper for rte_mbuf, because its carefully crafted layout is broken and becomes 3 cache-lines instead of two: https://bugs.llvm.org/show_bug.cgi?id=24383 For GCC, there is a way force rte_mbuf layout: https://github.com/PlushBeaver/dpdk/commit/37f052cb18d1d5d425818196d5e1d15a7ada0de0 GCC, in its turn, has an AVX bug, although it can be worked around by force-inlining functions in rte_acl (as I did): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412 [0]: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-libraries/winpthreads/ -- Dmitry Kozlyuk