On Wed, May 4, 2022 at 4:53 AM Wang, Yipeng1 <yipeng1.w...@intel.com> wrote: > > static inline void > > rte_hash_crc_set_alg(uint8_t alg) > > { > > + crc32_alg = CRC32_SW; > > > > + if (alg == CRC32_SW) > > + return; > > > > + if (!(alg & CRC32_SSE42_x64)) > > + RTE_LOG(WARNING, HASH, > > + "Unsupported CRC32 algorithm requested using > > CRC32_x64/CRC32_SSE42\n"); > [Wang, Yipeng] > I have a question regarding this logic. > For the set_alg API, how about if user specify to use sse42 (not the 64bit > version) algorithm on a em64 CPU, does it also warn "unsupported algorithm" > and force user to use the x64 version? > It seems behaves differently than the current API definition.
Can we conclude on this topic? Thanks. > > > + if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T)) > > + crc32_alg = CRC32_SSE42; > > + else > > + crc32_alg = CRC32_SSE42_x64; > > #endif > > -- David Marchand