table: fix checking extended buckets in unoptimized case
If a key is not found in a bucket and the bucket has been extended, the extended buckets also have to checked for potentially matching keys. The extended buckets are checked at the end of the lookup. In most cases, this logic is skipped as it is uncommon to have buckets in an extended state. In case the lookup is performed with less than 5 packets, an unoptimized version is run instead (the optimized version requires at least 5 packets). The extended buckets should also be checked in this case instead of simply ignoring the extended buckets. Signed-off-by: Balazs Nemeth <balazs.nemeth@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
This commit is contained in:
parent
fb20a4bd0f
commit
14f2544cda
@ -968,8 +968,7 @@ rte_table_hash_lookup_key16_ext(
|
||||
buckets, keys, f);
|
||||
}
|
||||
|
||||
*lookup_hit_mask = pkts_mask_out;
|
||||
return 0;
|
||||
goto grind_next_buckets;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1060,6 +1059,7 @@ rte_table_hash_lookup_key16_ext(
|
||||
bucket20, bucket21, pkts_mask_out, entries,
|
||||
buckets_mask, buckets, keys, f);
|
||||
|
||||
grind_next_buckets:
|
||||
/* Grind next buckets */
|
||||
for ( ; buckets_mask; ) {
|
||||
uint64_t buckets_mask_next = 0;
|
||||
|
@ -988,8 +988,7 @@ rte_table_hash_lookup_key32_ext(
|
||||
keys, f);
|
||||
}
|
||||
|
||||
*lookup_hit_mask = pkts_mask_out;
|
||||
return 0;
|
||||
goto grind_next_buckets;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1080,6 +1079,7 @@ rte_table_hash_lookup_key32_ext(
|
||||
bucket20, bucket21, pkts_mask_out, entries,
|
||||
buckets_mask, buckets, keys, f);
|
||||
|
||||
grind_next_buckets:
|
||||
/* Grind next buckets */
|
||||
for ( ; buckets_mask; ) {
|
||||
uint64_t buckets_mask_next = 0;
|
||||
|
@ -1104,8 +1104,7 @@ rte_table_hash_lookup_key8_ext(
|
||||
keys, f);
|
||||
}
|
||||
|
||||
*lookup_hit_mask = pkts_mask_out;
|
||||
return 0;
|
||||
goto grind_next_buckets;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1196,6 +1195,7 @@ rte_table_hash_lookup_key8_ext(
|
||||
bucket20, bucket21, pkts_mask_out, entries,
|
||||
buckets_mask, buckets, keys, f);
|
||||
|
||||
grind_next_buckets:
|
||||
/* Grind next buckets */
|
||||
for ( ; buckets_mask; ) {
|
||||
uint64_t buckets_mask_next = 0;
|
||||
@ -1250,8 +1250,7 @@ rte_table_hash_lookup_key8_ext_dosig(
|
||||
buckets, keys, f);
|
||||
}
|
||||
|
||||
*lookup_hit_mask = pkts_mask_out;
|
||||
return 0;
|
||||
goto grind_next_buckets;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1342,6 +1341,7 @@ rte_table_hash_lookup_key8_ext_dosig(
|
||||
bucket20, bucket21, pkts_mask_out, entries,
|
||||
buckets_mask, buckets, keys, f);
|
||||
|
||||
grind_next_buckets:
|
||||
/* Grind next buckets */
|
||||
for ( ; buckets_mask; ) {
|
||||
uint64_t buckets_mask_next = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user