On Tue, Mar 04, 2025 at 01:53:18PM -0800, Andre Muezerie wrote:
> The mechanism used to initialize an __m128i data type in rte_thash.h is
> non-portable and MSVC does not like it. It clearly is not doing what
> is desired:
> 
> ..\lib\hash\rte_thash.h(38): warning C4305: 'initializing':
>     truncation from 'unsigned __int64' to 'char'
> ..\lib\hash\rte_thash.h(38): warning C4305: 'initializing':
>     truncation from 'unsigned __int64' to 'char'
> 
> A more portable approach is to use compiler intrinsics to perform the
> initialization. This patch uses a single compiler intrinsic to
> initialize the data.
> 
> Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com>
> ---
>  lib/hash/rte_thash.h | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
Much simpler fix, thanks.

Acked-by: Bruce Richardson <bruce.richard...@intel.com>

Reply via email to