[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-20 Thread Yerden Zhumabekov
19.11.2014 21:07, Neil Horman ?: > On Wed, Nov 19, 2014 at 05:35:51PM +0600, Yerden Zhumabekov wrote: >> static inline uint32_t >> crc32_sse42_u32(uint32_t data, uint32_t init_val) >> { >> /*??__asm__ volatile( >> "crc32l %[data], %[init_val];" >> : [init_val] "+r" (ini

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Yerden Zhumabekov
19.11.2014 17:50, Ananyev, Konstantin ?: > > As I remember with gcc & icc it is possible to specify tht you'd like to > compile that particular function > for different target. > From https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html: > "target > The target attribute is used to spec

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Yerden Zhumabekov
19.11.2014 16:16, Bruce Richardson ?: > On Tue, Nov 18, 2014 at 04:36:24PM -0500, Neil Horman wrote: >> an alternate option would be to not use the intrinsic, and craft some >> explicit >> __asm__ statement that executes the right sse42 instructions. That way the >> asm >> is directly emitt

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Ananyev, Konstantin
> -Original Message- > From: Neil Horman [mailto:nhorman at tuxdriver.com] > Sent: Wednesday, November 19, 2014 3:06 PM > To: Ananyev, Konstantin > Cc: Richardson, Bruce; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Ananyev, Konstantin
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson > Sent: Wednesday, November 19, 2014 11:38 AM > To: Neil Horman > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 > i

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Bruce Richardson
On Wed, Nov 19, 2014 at 06:34:08AM -0500, Neil Horman wrote: > On Wed, Nov 19, 2014 at 10:16:14AM +, Bruce Richardson wrote: > > On Tue, Nov 18, 2014 at 04:36:24PM -0500, Neil Horman wrote: > > > On Tue, Nov 18, 2014 at 05:52:27PM +, Bruce Richardson wrote: > > > > On Tue, Nov 18, 2014 at 1

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Bruce Richardson
On Tue, Nov 18, 2014 at 04:36:24PM -0500, Neil Horman wrote: > On Tue, Nov 18, 2014 at 05:52:27PM +, Bruce Richardson wrote: > > On Tue, Nov 18, 2014 at 12:46:19PM -0500, Neil Horman wrote: > > > On Tue, Nov 18, 2014 at 11:13:17PM +0600, Yerden Zhumabekov wrote: > > > > > > > > 18.11.2014 22:0

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Neil Horman
On Wed, Nov 19, 2014 at 05:35:51PM +0600, Yerden Zhumabekov wrote: > > 19.11.2014 16:16, Bruce Richardson ?: > > On Tue, Nov 18, 2014 at 04:36:24PM -0500, Neil Horman wrote: > >> an alternate option would be to not use the intrinsic, and craft some > >> explicit > >> __asm__ statement that ex

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Yerden Zhumabekov
18.11.2014 23:29, Wang, Shawn ?: > I have a general question about using CPUID to detect supported instruction > set. > What if we are compiling the software with some old hardware which does not > support SSE4.2, but run it on new hardware which does support SSE4.2. Is > there still a stat

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Neil Horman
v at dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 > > implementation > > > > On Wed, Nov 19, 2014 at 06:34:08AM -0500, Neil Horman wrote: > > > On Wed, Nov 19, 2014 at 10:16:14AM +, Bruce Richardson wrote: > > &g

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Yerden Zhumabekov
19.11.2014 3:36, Neil Horman ?: > On Tue, Nov 18, 2014 at 05:52:27PM +, Bruce Richardson wrote: >> On Tue, Nov 18, 2014 at 12:46:19PM -0500, Neil Horman wrote: >>> On Tue, Nov 18, 2014 at 11:13:17PM +0600, Yerden Zhumabekov wrote: Everybody's up for the second option? :) >>> Crud

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-19 Thread Neil Horman
On Wed, Nov 19, 2014 at 10:16:14AM +, Bruce Richardson wrote: > On Tue, Nov 18, 2014 at 04:36:24PM -0500, Neil Horman wrote: > > On Tue, Nov 18, 2014 at 05:52:27PM +, Bruce Richardson wrote: > > > On Tue, Nov 18, 2014 at 12:46:19PM -0500, Neil Horman wrote: > > > > On Tue, Nov 18, 2014 at 1

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Yerden Zhumabekov
18.11.2014 23:46, Neil Horman ?: > On Tue, Nov 18, 2014 at 11:13:17PM +0600, Yerden Zhumabekov wrote: >> 18.11.2014 22:00, Neil Horman ?: >>> >>> You need to edit the makefile so that the compiler gets passed the option >>> -msse42. That way it will know to emit sse42 instructions. It wil

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Yerden Zhumabekov
18.11.2014 22:00, Neil Horman ?: > On Tue, Nov 18, 2014 at 09:06:35PM +0600, Yerden Zhumabekov wrote: >> 18.11.2014 20:41, Neil Horman ?: >>> On Tue, Nov 18, 2014 at 08:03:40PM +0600, Yerden Zhumabekov wrote: /** * Use single crc32 instruction to perform a hash on a 4 byte val

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Yerden Zhumabekov
18.11.2014 20:41, Neil Horman ?: > On Tue, Nov 18, 2014 at 08:03:40PM +0600, Yerden Zhumabekov wrote: >> Initially, SSE4.2 support is detected via CPUID instruction. >> >> Added rte_hash_crc_set_alg() function to detect and set CRC32 >> implementation if necessary. SSE4.2 is allowed by default

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Yerden Zhumabekov
Initially, SSE4.2 support is detected via CPUID instruction. Added rte_hash_crc_set_alg() function to detect and set CRC32 implementation if necessary. SSE4.2 is allowed by default. If it's not available, fall back to sw implementation. Best available algorithm is detected upon application startu

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Bruce Richardson
On Tue, Nov 18, 2014 at 12:46:19PM -0500, Neil Horman wrote: > On Tue, Nov 18, 2014 at 11:13:17PM +0600, Yerden Zhumabekov wrote: > > > > 18.11.2014 22:00, Neil Horman ?: > > > On Tue, Nov 18, 2014 at 09:06:35PM +0600, Yerden Zhumabekov wrote: > > >> 18.11.2014 20:41, Neil Horman ?: > > >>

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Wang, Shawn
Horman; Richardson, Bruce; dev at dpdk.org Subject: Re: [dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation 18.11.2014 22:00, Neil Horman ?: > On Tue, Nov 18, 2014 at 09:06:35PM +0600, Yerden Zhumabekov wrote: >> 18.11.2014 20:41, Neil Horman ?: >&g

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Neil Horman
On Tue, Nov 18, 2014 at 05:52:27PM +, Bruce Richardson wrote: > On Tue, Nov 18, 2014 at 12:46:19PM -0500, Neil Horman wrote: > > On Tue, Nov 18, 2014 at 11:13:17PM +0600, Yerden Zhumabekov wrote: > > > > > > 18.11.2014 22:00, Neil Horman ?: > > > > On Tue, Nov 18, 2014 at 09:06:35PM +0600,

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Bruce Richardson
On Tue, Nov 18, 2014 at 04:04:26PM +, Bruce Richardson wrote: > On Tue, Nov 18, 2014 at 11:00:05AM -0500, Neil Horman wrote: > > On Tue, Nov 18, 2014 at 09:06:35PM +0600, Yerden Zhumabekov wrote: > > > > > > 18.11.2014 20:41, Neil Horman ?: > > > > On Tue, Nov 18, 2014 at 08:03:40PM +0600,

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Bruce Richardson
On Tue, Nov 18, 2014 at 11:00:05AM -0500, Neil Horman wrote: > On Tue, Nov 18, 2014 at 09:06:35PM +0600, Yerden Zhumabekov wrote: > > > > 18.11.2014 20:41, Neil Horman ?: > > > On Tue, Nov 18, 2014 at 08:03:40PM +0600, Yerden Zhumabekov wrote: > > >> Initially, SSE4.2 support is detected via C

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Neil Horman
On Tue, Nov 18, 2014 at 11:13:17PM +0600, Yerden Zhumabekov wrote: > > 18.11.2014 22:00, Neil Horman ?: > > On Tue, Nov 18, 2014 at 09:06:35PM +0600, Yerden Zhumabekov wrote: > >> 18.11.2014 20:41, Neil Horman ?: > >>> On Tue, Nov 18, 2014 at 08:03:40PM +0600, Yerden Zhumabekov wrote: > >>

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Neil Horman
On Tue, Nov 18, 2014 at 04:04:26PM +, Bruce Richardson wrote: > On Tue, Nov 18, 2014 at 11:00:05AM -0500, Neil Horman wrote: > > On Tue, Nov 18, 2014 at 09:06:35PM +0600, Yerden Zhumabekov wrote: > > > > > > 18.11.2014 20:41, Neil Horman ?: > > > > On Tue, Nov 18, 2014 at 08:03:40PM +0600,

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Neil Horman
On Tue, Nov 18, 2014 at 09:06:35PM +0600, Yerden Zhumabekov wrote: > > 18.11.2014 20:41, Neil Horman ?: > > On Tue, Nov 18, 2014 at 08:03:40PM +0600, Yerden Zhumabekov wrote: > >> Initially, SSE4.2 support is detected via CPUID instruction. > >> > >> Added rte_hash_crc_set_alg() function to de

[dpdk-dev] [PATCH v4 3/5] hash: add fallback to software CRC32 implementation

2014-11-18 Thread Neil Horman
On Tue, Nov 18, 2014 at 08:03:40PM +0600, Yerden Zhumabekov wrote: > Initially, SSE4.2 support is detected via CPUID instruction. > > Added rte_hash_crc_set_alg() function to detect and set CRC32 > implementation if necessary. SSE4.2 is allowed by default. If it's > not available, fall back to sw