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 58498A00C4; Fri, 25 Mar 2022 17:35:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30D2440687; Fri, 25 Mar 2022 17:35:56 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1042240140 for ; Fri, 25 Mar 2022 17:35:54 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2AD2D20DECD6; Fri, 25 Mar 2022 09:35:53 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2AD2D20DECD6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1648226153; bh=H2sSEgWCzrvGH7J/U7PB0KVu0qB+Tdit2ipfq6dRoMk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TgVVYuln4X0sHdllIq1lZ4GnCMAzoDPTmijZ3TbMjSBwwtvLd/N3ccY+XEcc+KDHB SIlapnwvfDYEe5kljrPZuiI1HApeJSRLdqAWK2iKWRLwAkGt54GHJNaDLGIlbYUpOu j+Ya8jrvazSuUThOID4OrlVV2VxerQyWvVh6v/4s= Date: Fri, 25 Mar 2022 09:35:53 -0700 From: Tyler Retzlaff To: Dmitry Kozlyuk Cc: Tarun Badnora , "dev@dpdk.org" , Anurag Berdia , Omar Cardona , Dmitry Kozlyuk , Daniel Havey , Tyler Retzlaff Subject: Re: DPDK for Windows with MSVC compiler Message-ID: <20220325163553.GA11014@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20220322145500.4716ccca@sovereign> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Fri, Mar 25, 2022 at 01:25:51PM +0000, Dmitry Kozlyuk wrote: > > Is there a way to integrate DPDK module, built with clang/mingw, to our > > MSVC application ? > > I know both are different compilers, but in case if you are aware of a > > way/tweak that will be of our help. > > OR > > If porting our application is the only option available then which > > compiler (clang or mingw) is recommended for optimal performance. > > DPDK headers are incompatible with MSVC > due to heavy use of extensions common to GCC, clang, and ICC. > DPDK libraries can be linked trivially. > If your app cannot be easily recompiled with clang, > I think the best way is to use two compilers: > compile the module that interfaces DPDK with clang > and the rest of the app with MSVC, > link DPDK libraries as any other external libraries. > Note that DPDK installation on Windows is not fully functional yet: > it does not install pthread.h which you can find in lib/eal/windows/include. > > +Tyler who might have relevant experience. while you could compile dpdk with clang and your application with msvc it is non-trivial and i would strongly advise against it. you'll spend more effort on maintaining the dpdk fork you have to create than it will take to improve your applications code to be more compiler agnostic. i would advise you to port your application to clang and when doing so use as much standard c as possible as opposed to compiler builtins or intrinsics and abstracting when standards don't provide common facilities. the desire to use msvc has been expressed by multiple dpdk community members both directly to microsoft and on the community mailing lists. microsoft is aware of the interest in using msvc and discussions are ongoing about how to best service the community members interested. thanks