10 #ifndef __RTE_EFD_LSX_H__ 11 #define __RTE_EFD_LSX_H__ 15 static inline efd_value_t
16 efd_lookup_internal_lsx(
const efd_hashfunc_t *group_hash_idx,
17 const efd_lookuptbl_t *group_lookup_table,
18 const uint32_t hash_val_a,
const uint32_t hash_val_b)
20 efd_value_t value = 0;
22 __m128i xtmp = __lsx_vldi(0);
23 __m128i vhash_val_a = __lsx_vreplgr2vr_w(hash_val_a);
24 __m128i vhash_val_b = __lsx_vreplgr2vr_w(hash_val_b);
28 t_val = *(uint64_t
const *)&group_hash_idx[i];
29 xtmp = __lsx_vinsgr2vr_d(xtmp, t_val, 0);
30 __m128i vhash_idx = __lsx_vsllwil_wu_hu(xtmp, 0);
31 t_val = *(uint64_t
const *)&group_lookup_table[i];
32 xtmp = __lsx_vinsgr2vr_d(xtmp, t_val, 0);
33 __m128i vlookup_table = __lsx_vsllwil_wu_hu(xtmp, 0);
34 __m128i vhash = __lsx_vadd_w(vhash_val_a,
35 __lsx_vmul_w(vhash_idx, vhash_val_b));
36 __m128i vbucket_idx = __lsx_vsrli_w(vhash, EFD_LOOKUPTBL_SHIFT);
37 __m128i vresult = __lsx_vsrl_w(vlookup_table, vbucket_idx);
38 xtmp = __lsx_vmskltz_w(__lsx_vslli_w(vresult, 31));
39 value |= (__lsx_vpickve2gr_d(xtmp, 0) &
#define RTE_EFD_VALUE_NUM_BITS