DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Cc: Tarun Badnora <tarun.badnora@clear-trail.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Anurag Berdia <anurag.berdia@clear-trail.com>,
	Omar Cardona <ocardona@microsoft.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Daniel Havey <dahavey@microsoft.com>,
	Tyler Retzlaff <roretzla@microsoft.com>
Subject: Re: DPDK for Windows with MSVC compiler
Date: Fri, 25 Mar 2022 09:35:53 -0700	[thread overview]
Message-ID: <20220325163553.GA11014@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <BL1PR12MB5945578F10D3681FEDF43240B91A9@BL1PR12MB5945.namprd12.prod.outlook.com>

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

      reply	other threads:[~2022-03-25 16:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 10:26 Tarun Badnora
2022-03-22 11:55 ` Dmitry Kozlyuk
2022-03-23  8:30   ` Tarun Badnora
2022-03-25 13:25     ` Dmitry Kozlyuk
2022-03-25 16:35       ` Tyler Retzlaff [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220325163553.GA11014@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=roretzla@linux.microsoft.com \
    --cc=anurag.berdia@clear-trail.com \
    --cc=dahavey@microsoft.com \
    --cc=dev@dpdk.org \
    --cc=dkozlyuk@nvidia.com \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=ocardona@microsoft.com \
    --cc=roretzla@microsoft.com \
    --cc=tarun.badnora@clear-trail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).