DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
	Jasvinder Singh <jasvinder.singh@intel.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	david.marchand@redhat.com
Subject: Re: [PATCH] net: stop using mmx intrinsics
Date: Thu, 28 Mar 2024 09:16:42 -0700	[thread overview]
Message-ID: <20240328161642.GA2014@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <5822839.1B3tZ46Xf9@thomas>

On Thu, Mar 21, 2024 at 07:01:17PM +0100, Thomas Monjalon wrote:
> 21/03/2024 18:27, Tyler Retzlaff:
> > On Thu, Mar 21, 2024 at 06:09:01PM +0100, Thomas Monjalon wrote:
> > > 20/03/2024 22:12, Tyler Retzlaff:
> > > > +#ifdef RTE_TOOLCHAIN_MSVC
> > > > +#include <intrin.h>
> > > > +#else
> > > >  #include <x86intrin.h>
> > > > +#endif
> > > 
> > > It is not the same include in MSVC?
> > 
> > unfortunately intrin.h is vestigial in the monolithic approach. to use
> > any intrinsic you're supposed to include only the one and only true
> > header instead of vendor/arch feature specific headers.
> > 
> > > Is it something we want to wrap in a DPDK header file?
> > 
> > do you mean create a monolithic rte_intrinsic.h header that is
> > essentially
> > 
> > #ifdef MSVC
> > #include <intrin.h>
> > #else
> > #include <x86intrin.h>
> > #include <immintrin.h>
> > #include <nmmintrin.h>
> > ...
> > #endif
> > 
> > i assumed that doing something like this might be unpopular due to the
> > unnecessary namespace pollution.
> 
> We already have such a file.
> It is rte_vect.h.
> I suppose we should just make sure it is included consistently
> instead of x86intrin.h or immintrin.h
> 
> This command will show where changes are required:
> 	git grep intrin.h

thanks! i saw none of the problems i had before so this worked great.

there is only one other include of intrin.h in eal now and it is not for
vector intrinsics so it should be cleaner to just include rte_vect.h
whenever SIMD / vector intrinsics are required for windows and !windows.

> 
> 

  parent reply	other threads:[~2024-03-28 16:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 21:12 [PATCH] " Tyler Retzlaff
2024-03-20 21:12 ` [PATCH] net: " Tyler Retzlaff
2024-03-21 17:09   ` Thomas Monjalon
2024-03-21 17:27     ` Tyler Retzlaff
2024-03-21 18:01       ` Thomas Monjalon
2024-03-21 18:18         ` Tyler Retzlaff
2024-03-28 16:16         ` Tyler Retzlaff [this message]
2024-03-28 16:14 ` [PATCH v2 0/2] " Tyler Retzlaff
2024-03-28 16:14   ` [PATCH v2 1/2] eal: include header for MSVC SIMD intrinsics Tyler Retzlaff
2024-03-28 17:19     ` Bruce Richardson
2024-03-28 16:14   ` [PATCH v2 2/2] net: stop using mmx intrinsics Tyler Retzlaff
2024-03-28 17:21     ` Bruce Richardson

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=20240328161642.GA2014@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=roretzla@linux.microsoft.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=thomas@monjalon.net \
    /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).