4 * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
11 * * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * * Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
17 * * Neither the name of Intel Corporation nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 #include <rte_common.h>
38 #include <rte_memory.h>
39 #include <rte_malloc.h>
42 #include "rte_table_hash.h"
45 #define RTE_TABLE_HASH_KEY_SIZE 8
47 #ifdef RTE_TABLE_STATS_COLLECT
49 #define RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(table, val) \
50 table->stats.n_pkts_in += val
51 #define RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(table, val) \
52 table->stats.n_pkts_lookup_miss += val
56 #define RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(table, val)
57 #define RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(table, val)
61 struct rte_bucket_4_8 {
65 struct rte_bucket_4_8 *next;
74 struct rte_table_hash {
75 struct rte_table_stats stats;
77 /* Input parameters */
79 uint32_t n_entries_per_bucket;
83 uint32_t signature_offset;
86 rte_table_hash_op_hash f_hash;
89 /* Extendible buckets */
90 uint32_t n_buckets_ext;
95 uint8_t memory[0] __rte_cache_aligned;
99 check_params_create_lru(struct rte_table_hash_key8_lru_params *params) {
101 if (params->n_entries == 0) {
102 RTE_LOG(ERR, TABLE, "%s: n_entries is zero\n", __func__);
107 if (params->f_hash == NULL) {
108 RTE_LOG(ERR, TABLE, "%s: f_hash function pointer is NULL\n",
117 rte_table_hash_create_key8_lru(void *params, int socket_id, uint32_t entry_size)
119 struct rte_table_hash_key8_lru_params *p =
120 (struct rte_table_hash_key8_lru_params *) params;
121 struct rte_table_hash *f;
122 uint32_t n_buckets, n_entries_per_bucket, key_size, bucket_size_cl;
123 uint32_t total_size, i;
125 /* Check input parameters */
126 if ((check_params_create_lru(p) != 0) ||
127 ((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0) ||
128 ((sizeof(struct rte_bucket_4_8) % 64) != 0)) {
131 n_entries_per_bucket = 4;
134 /* Memory allocation */
135 n_buckets = rte_align32pow2((p->n_entries + n_entries_per_bucket - 1) /
136 n_entries_per_bucket);
137 bucket_size_cl = (sizeof(struct rte_bucket_4_8) + n_entries_per_bucket *
138 entry_size + RTE_CACHE_LINE_SIZE - 1) / RTE_CACHE_LINE_SIZE;
139 total_size = sizeof(struct rte_table_hash) + n_buckets *
140 bucket_size_cl * RTE_CACHE_LINE_SIZE;
142 f = rte_zmalloc_socket("TABLE", total_size, RTE_CACHE_LINE_SIZE, socket_id);
145 "%s: Cannot allocate %u bytes for hash table\n",
146 __func__, total_size);
150 "%s: Hash table memory footprint is %u bytes\n",
151 __func__, total_size);
153 /* Memory initialization */
154 f->n_buckets = n_buckets;
155 f->n_entries_per_bucket = n_entries_per_bucket;
156 f->key_size = key_size;
157 f->entry_size = entry_size;
158 f->bucket_size = bucket_size_cl * RTE_CACHE_LINE_SIZE;
159 f->signature_offset = p->signature_offset;
160 f->key_offset = p->key_offset;
161 f->f_hash = p->f_hash;
164 if (p->key_mask != NULL)
165 f->key_mask = ((uint64_t *)p->key_mask)[0];
167 f->key_mask = 0xFFFFFFFFFFFFFFFFLLU;
169 for (i = 0; i < n_buckets; i++) {
170 struct rte_bucket_4_8 *bucket;
172 bucket = (struct rte_bucket_4_8 *) &f->memory[i *
174 bucket->lru_list = 0x0000000100020003LLU;
181 rte_table_hash_free_key8_lru(void *table)
183 struct rte_table_hash *f = table;
185 /* Check input parameters */
187 RTE_LOG(ERR, TABLE, "%s: table parameter is NULL\n", __func__);
196 rte_table_hash_entry_add_key8_lru(
203 struct rte_table_hash *f = table;
204 struct rte_bucket_4_8 *bucket;
205 uint64_t signature, mask, pos;
206 uint32_t bucket_index, i;
208 signature = f->f_hash(key, f->key_size, f->seed);
209 bucket_index = signature & (f->n_buckets - 1);
210 bucket = (struct rte_bucket_4_8 *)
211 &f->memory[bucket_index * f->bucket_size];
213 /* Key is present in the bucket */
214 for (i = 0, mask = 1LLU; i < 4; i++, mask <<= 1) {
215 uint64_t bucket_signature = bucket->signature;
216 uint64_t bucket_key = bucket->key[i];
218 if ((bucket_signature & mask) &&
219 (*((uint64_t *) key) == bucket_key)) {
220 uint8_t *bucket_data = &bucket->data[i * f->entry_size];
222 memcpy(bucket_data, entry, f->entry_size);
223 lru_update(bucket, i);
225 *entry_ptr = (void *) bucket_data;
230 /* Key is not present in the bucket */
231 for (i = 0, mask = 1LLU; i < 4; i++, mask <<= 1) {
232 uint64_t bucket_signature = bucket->signature;
234 if ((bucket_signature & mask) == 0) {
235 uint8_t *bucket_data = &bucket->data[i * f->entry_size];
237 bucket->signature |= mask;
238 bucket->key[i] = *((uint64_t *) key);
239 memcpy(bucket_data, entry, f->entry_size);
240 lru_update(bucket, i);
242 *entry_ptr = (void *) bucket_data;
248 /* Bucket full: replace LRU entry */
249 pos = lru_pos(bucket);
250 bucket->key[pos] = *((uint64_t *) key);
251 memcpy(&bucket->data[pos * f->entry_size], entry, f->entry_size);
252 lru_update(bucket, pos);
254 *entry_ptr = (void *) &bucket->data[pos * f->entry_size];
260 rte_table_hash_entry_delete_key8_lru(
266 struct rte_table_hash *f = table;
267 struct rte_bucket_4_8 *bucket;
268 uint64_t signature, mask;
269 uint32_t bucket_index, i;
271 signature = f->f_hash(key, f->key_size, f->seed);
272 bucket_index = signature & (f->n_buckets - 1);
273 bucket = (struct rte_bucket_4_8 *)
274 &f->memory[bucket_index * f->bucket_size];
276 /* Key is present in the bucket */
277 for (i = 0, mask = 1LLU; i < 4; i++, mask <<= 1) {
278 uint64_t bucket_signature = bucket->signature;
279 uint64_t bucket_key = bucket->key[i];
281 if ((bucket_signature & mask) &&
282 (*((uint64_t *) key) == bucket_key)) {
283 uint8_t *bucket_data = &bucket->data[i * f->entry_size];
285 bucket->signature &= ~mask;
288 memcpy(entry, bucket_data, f->entry_size);
294 /* Key is not present in the bucket */
300 check_params_create_ext(struct rte_table_hash_key8_ext_params *params) {
302 if (params->n_entries == 0) {
303 RTE_LOG(ERR, TABLE, "%s: n_entries is zero\n", __func__);
308 if (params->n_entries_ext == 0) {
309 RTE_LOG(ERR, TABLE, "%s: n_entries_ext is zero\n", __func__);
314 if (params->f_hash == NULL) {
315 RTE_LOG(ERR, TABLE, "%s: f_hash function pointer is NULL\n",
324 rte_table_hash_create_key8_ext(void *params, int socket_id, uint32_t entry_size)
326 struct rte_table_hash_key8_ext_params *p =
327 (struct rte_table_hash_key8_ext_params *) params;
328 struct rte_table_hash *f;
329 uint32_t n_buckets, n_buckets_ext, n_entries_per_bucket, key_size;
330 uint32_t bucket_size_cl, stack_size_cl, total_size, i;
332 /* Check input parameters */
333 if ((check_params_create_ext(p) != 0) ||
334 ((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0) ||
335 ((sizeof(struct rte_bucket_4_8) % 64) != 0))
338 n_entries_per_bucket = 4;
341 /* Memory allocation */
342 n_buckets = rte_align32pow2((p->n_entries + n_entries_per_bucket - 1) /
343 n_entries_per_bucket);
344 n_buckets_ext = (p->n_entries_ext + n_entries_per_bucket - 1) /
345 n_entries_per_bucket;
346 bucket_size_cl = (sizeof(struct rte_bucket_4_8) + n_entries_per_bucket *
347 entry_size + RTE_CACHE_LINE_SIZE - 1) / RTE_CACHE_LINE_SIZE;
348 stack_size_cl = (n_buckets_ext * sizeof(uint32_t) + RTE_CACHE_LINE_SIZE - 1)
349 / RTE_CACHE_LINE_SIZE;
350 total_size = sizeof(struct rte_table_hash) + ((n_buckets +
351 n_buckets_ext) * bucket_size_cl + stack_size_cl) *
354 f = rte_zmalloc_socket("TABLE", total_size, RTE_CACHE_LINE_SIZE, socket_id);
357 "%s: Cannot allocate %u bytes for hash table\n",
358 __func__, total_size);
362 "%s: Hash table memory footprint is %u bytes\n",
363 __func__, total_size);
365 /* Memory initialization */
366 f->n_buckets = n_buckets;
367 f->n_entries_per_bucket = n_entries_per_bucket;
368 f->key_size = key_size;
369 f->entry_size = entry_size;
370 f->bucket_size = bucket_size_cl * RTE_CACHE_LINE_SIZE;
371 f->signature_offset = p->signature_offset;
372 f->key_offset = p->key_offset;
373 f->f_hash = p->f_hash;
376 f->n_buckets_ext = n_buckets_ext;
377 f->stack_pos = n_buckets_ext;
378 f->stack = (uint32_t *)
379 &f->memory[(n_buckets + n_buckets_ext) * f->bucket_size];
381 if (p->key_mask != NULL)
382 f->key_mask = ((uint64_t *)p->key_mask)[0];
384 f->key_mask = 0xFFFFFFFFFFFFFFFFLLU;
386 for (i = 0; i < n_buckets_ext; i++)
393 rte_table_hash_free_key8_ext(void *table)
395 struct rte_table_hash *f = table;
397 /* Check input parameters */
399 RTE_LOG(ERR, TABLE, "%s: table parameter is NULL\n", __func__);
408 rte_table_hash_entry_add_key8_ext(
415 struct rte_table_hash *f = table;
416 struct rte_bucket_4_8 *bucket0, *bucket, *bucket_prev;
418 uint32_t bucket_index, i;
420 signature = f->f_hash(key, f->key_size, f->seed);
421 bucket_index = signature & (f->n_buckets - 1);
422 bucket0 = (struct rte_bucket_4_8 *)
423 &f->memory[bucket_index * f->bucket_size];
425 /* Key is present in the bucket */
426 for (bucket = bucket0; bucket != NULL; bucket = bucket->next) {
429 for (i = 0, mask = 1LLU; i < 4; i++, mask <<= 1) {
430 uint64_t bucket_signature = bucket->signature;
431 uint64_t bucket_key = bucket->key[i];
433 if ((bucket_signature & mask) &&
434 (*((uint64_t *) key) == bucket_key)) {
435 uint8_t *bucket_data = &bucket->data[i *
438 memcpy(bucket_data, entry, f->entry_size);
440 *entry_ptr = (void *) bucket_data;
446 /* Key is not present in the bucket */
447 for (bucket_prev = NULL, bucket = bucket0;
448 bucket != NULL; bucket_prev = bucket, bucket = bucket->next) {
451 for (i = 0, mask = 1LLU; i < 4; i++, mask <<= 1) {
452 uint64_t bucket_signature = bucket->signature;
454 if ((bucket_signature & mask) == 0) {
455 uint8_t *bucket_data = &bucket->data[i *
458 bucket->signature |= mask;
459 bucket->key[i] = *((uint64_t *) key);
460 memcpy(bucket_data, entry, f->entry_size);
462 *entry_ptr = (void *) bucket_data;
469 /* Bucket full: extend bucket */
470 if (f->stack_pos > 0) {
471 bucket_index = f->stack[--f->stack_pos];
473 bucket = (struct rte_bucket_4_8 *) &f->memory[(f->n_buckets +
474 bucket_index) * f->bucket_size];
475 bucket_prev->next = bucket;
476 bucket_prev->next_valid = 1;
478 bucket->signature = 1;
479 bucket->key[0] = *((uint64_t *) key);
480 memcpy(&bucket->data[0], entry, f->entry_size);
482 *entry_ptr = (void *) &bucket->data[0];
490 rte_table_hash_entry_delete_key8_ext(
496 struct rte_table_hash *f = table;
497 struct rte_bucket_4_8 *bucket0, *bucket, *bucket_prev;
499 uint32_t bucket_index, i;
501 signature = f->f_hash(key, f->key_size, f->seed);
502 bucket_index = signature & (f->n_buckets - 1);
503 bucket0 = (struct rte_bucket_4_8 *)
504 &f->memory[bucket_index * f->bucket_size];
506 /* Key is present in the bucket */
507 for (bucket_prev = NULL, bucket = bucket0; bucket != NULL;
508 bucket_prev = bucket, bucket = bucket->next) {
511 for (i = 0, mask = 1LLU; i < 4; i++, mask <<= 1) {
512 uint64_t bucket_signature = bucket->signature;
513 uint64_t bucket_key = bucket->key[i];
515 if ((bucket_signature & mask) &&
516 (*((uint64_t *) key) == bucket_key)) {
517 uint8_t *bucket_data = &bucket->data[i *
520 bucket->signature &= ~mask;
523 memcpy(entry, bucket_data,
526 if ((bucket->signature == 0) &&
527 (bucket_prev != NULL)) {
528 bucket_prev->next = bucket->next;
529 bucket_prev->next_valid =
533 sizeof(struct rte_bucket_4_8));
534 bucket_index = (((uint8_t *)bucket -
535 (uint8_t *)f->memory)/f->bucket_size) - f->n_buckets;
536 f->stack[f->stack_pos++] = bucket_index;
544 /* Key is not present in the bucket */
549 #define lookup_key8_cmp(key_in, bucket, pos) \
551 uint64_t xor[4], signature; \
553 signature = ~bucket->signature; \
555 xor[0] = (key_in[0] ^ bucket->key[0]) | (signature & 1);\
556 xor[1] = (key_in[0] ^ bucket->key[1]) | (signature & 2);\
557 xor[2] = (key_in[0] ^ bucket->key[2]) | (signature & 4);\
558 xor[3] = (key_in[0] ^ bucket->key[3]) | (signature & 8);\
571 #define lookup1_stage0(pkt0_index, mbuf0, pkts, pkts_mask, f) \
574 uint32_t key_offset = f->key_offset;\
576 pkt0_index = __builtin_ctzll(pkts_mask); \
577 pkt_mask = 1LLU << pkt0_index; \
578 pkts_mask &= ~pkt_mask; \
580 mbuf0 = pkts[pkt0_index]; \
581 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf0, key_offset)); \
584 #define lookup1_stage1(mbuf1, bucket1, f) \
586 uint64_t signature; \
587 uint32_t bucket_index; \
589 signature = RTE_MBUF_METADATA_UINT32(mbuf1, f->signature_offset);\
590 bucket_index = signature & (f->n_buckets - 1); \
591 bucket1 = (struct rte_bucket_4_8 *) \
592 &f->memory[bucket_index * f->bucket_size]; \
593 rte_prefetch0(bucket1); \
596 #define lookup1_stage1_dosig(mbuf1, bucket1, f) \
599 uint64_t signature; \
600 uint32_t bucket_index; \
601 uint64_t hash_key_buffer; \
603 key = RTE_MBUF_METADATA_UINT64_PTR(mbuf1, f->key_offset);\
604 hash_key_buffer = *key & f->key_mask; \
605 signature = f->f_hash(&hash_key_buffer, \
606 RTE_TABLE_HASH_KEY_SIZE, f->seed); \
607 bucket_index = signature & (f->n_buckets - 1); \
608 bucket1 = (struct rte_bucket_4_8 *) \
609 &f->memory[bucket_index * f->bucket_size]; \
610 rte_prefetch0(bucket1); \
613 #define lookup1_stage2_lru(pkt2_index, mbuf2, bucket2, \
614 pkts_mask_out, entries, f) \
620 uint64_t hash_key_buffer; \
622 key = RTE_MBUF_METADATA_UINT64_PTR(mbuf2, f->key_offset);\
623 hash_key_buffer = key[0] & f->key_mask; \
625 lookup_key8_cmp((&hash_key_buffer), bucket2, pos); \
627 pkt_mask = ((bucket2->signature >> pos) & 1LLU) << pkt2_index;\
628 pkts_mask_out |= pkt_mask; \
630 a = (void *) &bucket2->data[pos * f->entry_size]; \
632 entries[pkt2_index] = a; \
633 lru_update(bucket2, pos); \
636 #define lookup1_stage2_ext(pkt2_index, mbuf2, bucket2, pkts_mask_out,\
637 entries, buckets_mask, buckets, keys, f) \
639 struct rte_bucket_4_8 *bucket_next; \
641 uint64_t pkt_mask, bucket_mask; \
644 uint64_t hash_key_buffer; \
646 key = RTE_MBUF_METADATA_UINT64_PTR(mbuf2, f->key_offset);\
647 hash_key_buffer = *key & f->key_mask; \
649 lookup_key8_cmp((&hash_key_buffer), bucket2, pos); \
651 pkt_mask = ((bucket2->signature >> pos) & 1LLU) << pkt2_index;\
652 pkts_mask_out |= pkt_mask; \
654 a = (void *) &bucket2->data[pos * f->entry_size]; \
656 entries[pkt2_index] = a; \
658 bucket_mask = (~pkt_mask) & (bucket2->next_valid << pkt2_index);\
659 buckets_mask |= bucket_mask; \
660 bucket_next = bucket2->next; \
661 buckets[pkt2_index] = bucket_next; \
662 keys[pkt2_index] = key; \
665 #define lookup_grinder(pkt_index, buckets, keys, pkts_mask_out, entries,\
668 struct rte_bucket_4_8 *bucket, *bucket_next; \
670 uint64_t pkt_mask, bucket_mask; \
673 uint64_t hash_key_buffer; \
675 bucket = buckets[pkt_index]; \
676 key = keys[pkt_index]; \
677 hash_key_buffer = (*key) & f->key_mask; \
679 lookup_key8_cmp((&hash_key_buffer), bucket, pos); \
681 pkt_mask = ((bucket->signature >> pos) & 1LLU) << pkt_index;\
682 pkts_mask_out |= pkt_mask; \
684 a = (void *) &bucket->data[pos * f->entry_size]; \
686 entries[pkt_index] = a; \
688 bucket_mask = (~pkt_mask) & (bucket->next_valid << pkt_index);\
689 buckets_mask |= bucket_mask; \
690 bucket_next = bucket->next; \
691 rte_prefetch0(bucket_next); \
692 buckets[pkt_index] = bucket_next; \
693 keys[pkt_index] = key; \
696 #define lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01,\
697 pkts, pkts_mask, f) \
699 uint64_t pkt00_mask, pkt01_mask; \
700 uint32_t key_offset = f->key_offset; \
702 pkt00_index = __builtin_ctzll(pkts_mask); \
703 pkt00_mask = 1LLU << pkt00_index; \
704 pkts_mask &= ~pkt00_mask; \
706 mbuf00 = pkts[pkt00_index]; \
707 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf00, key_offset));\
709 pkt01_index = __builtin_ctzll(pkts_mask); \
710 pkt01_mask = 1LLU << pkt01_index; \
711 pkts_mask &= ~pkt01_mask; \
713 mbuf01 = pkts[pkt01_index]; \
714 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf01, key_offset));\
717 #define lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,\
718 mbuf00, mbuf01, pkts, pkts_mask, f) \
720 uint64_t pkt00_mask, pkt01_mask; \
721 uint32_t key_offset = f->key_offset; \
723 pkt00_index = __builtin_ctzll(pkts_mask); \
724 pkt00_mask = 1LLU << pkt00_index; \
725 pkts_mask &= ~pkt00_mask; \
727 mbuf00 = pkts[pkt00_index]; \
728 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf00, key_offset));\
730 pkt01_index = __builtin_ctzll(pkts_mask); \
731 if (pkts_mask == 0) \
732 pkt01_index = pkt00_index; \
734 pkt01_mask = 1LLU << pkt01_index; \
735 pkts_mask &= ~pkt01_mask; \
737 mbuf01 = pkts[pkt01_index]; \
738 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf01, key_offset));\
741 #define lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f) \
743 uint64_t signature10, signature11; \
744 uint32_t bucket10_index, bucket11_index; \
746 signature10 = RTE_MBUF_METADATA_UINT32(mbuf10, f->signature_offset);\
747 bucket10_index = signature10 & (f->n_buckets - 1); \
748 bucket10 = (struct rte_bucket_4_8 *) \
749 &f->memory[bucket10_index * f->bucket_size]; \
750 rte_prefetch0(bucket10); \
752 signature11 = RTE_MBUF_METADATA_UINT32(mbuf11, f->signature_offset);\
753 bucket11_index = signature11 & (f->n_buckets - 1); \
754 bucket11 = (struct rte_bucket_4_8 *) \
755 &f->memory[bucket11_index * f->bucket_size]; \
756 rte_prefetch0(bucket11); \
759 #define lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f)\
761 uint64_t *key10, *key11; \
762 uint64_t hash_offset_buffer10; \
763 uint64_t hash_offset_buffer11; \
764 uint64_t signature10, signature11; \
765 uint32_t bucket10_index, bucket11_index; \
766 rte_table_hash_op_hash f_hash = f->f_hash; \
767 uint64_t seed = f->seed; \
768 uint32_t key_offset = f->key_offset; \
770 key10 = RTE_MBUF_METADATA_UINT64_PTR(mbuf10, key_offset);\
771 key11 = RTE_MBUF_METADATA_UINT64_PTR(mbuf11, key_offset);\
772 hash_offset_buffer10 = *key10 & f->key_mask; \
773 hash_offset_buffer11 = *key11 & f->key_mask; \
775 signature10 = f_hash(&hash_offset_buffer10, \
776 RTE_TABLE_HASH_KEY_SIZE, seed); \
777 bucket10_index = signature10 & (f->n_buckets - 1); \
778 bucket10 = (struct rte_bucket_4_8 *) \
779 &f->memory[bucket10_index * f->bucket_size]; \
780 rte_prefetch0(bucket10); \
782 signature11 = f_hash(&hash_offset_buffer11, \
783 RTE_TABLE_HASH_KEY_SIZE, seed); \
784 bucket11_index = signature11 & (f->n_buckets - 1); \
785 bucket11 = (struct rte_bucket_4_8 *) \
786 &f->memory[bucket11_index * f->bucket_size]; \
787 rte_prefetch0(bucket11); \
790 #define lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,\
791 bucket20, bucket21, pkts_mask_out, entries, f) \
794 uint64_t pkt20_mask, pkt21_mask; \
795 uint64_t *key20, *key21; \
796 uint64_t hash_offset_buffer20; \
797 uint64_t hash_offset_buffer21; \
798 uint32_t pos20, pos21; \
800 key20 = RTE_MBUF_METADATA_UINT64_PTR(mbuf20, f->key_offset);\
801 key21 = RTE_MBUF_METADATA_UINT64_PTR(mbuf21, f->key_offset);\
802 hash_offset_buffer20 = *key20 & f->key_mask; \
803 hash_offset_buffer21 = *key21 & f->key_mask; \
805 lookup_key8_cmp((&hash_offset_buffer20), bucket20, pos20);\
806 lookup_key8_cmp((&hash_offset_buffer21), bucket21, pos21);\
808 pkt20_mask = ((bucket20->signature >> pos20) & 1LLU) << pkt20_index;\
809 pkt21_mask = ((bucket21->signature >> pos21) & 1LLU) << pkt21_index;\
810 pkts_mask_out |= pkt20_mask | pkt21_mask; \
812 a20 = (void *) &bucket20->data[pos20 * f->entry_size]; \
813 a21 = (void *) &bucket21->data[pos21 * f->entry_size]; \
814 rte_prefetch0(a20); \
815 rte_prefetch0(a21); \
816 entries[pkt20_index] = a20; \
817 entries[pkt21_index] = a21; \
818 lru_update(bucket20, pos20); \
819 lru_update(bucket21, pos21); \
822 #define lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21, bucket20, \
823 bucket21, pkts_mask_out, entries, buckets_mask, buckets, keys, f)\
825 struct rte_bucket_4_8 *bucket20_next, *bucket21_next; \
827 uint64_t pkt20_mask, pkt21_mask, bucket20_mask, bucket21_mask;\
828 uint64_t *key20, *key21; \
829 uint64_t hash_offset_buffer20; \
830 uint64_t hash_offset_buffer21; \
831 uint32_t pos20, pos21; \
833 key20 = RTE_MBUF_METADATA_UINT64_PTR(mbuf20, f->key_offset);\
834 key21 = RTE_MBUF_METADATA_UINT64_PTR(mbuf21, f->key_offset);\
835 hash_offset_buffer20 = *key20 & f->key_mask; \
836 hash_offset_buffer21 = *key21 & f->key_mask; \
838 lookup_key8_cmp((&hash_offset_buffer20), bucket20, pos20);\
839 lookup_key8_cmp((&hash_offset_buffer21), bucket21, pos21);\
841 pkt20_mask = ((bucket20->signature >> pos20) & 1LLU) << pkt20_index;\
842 pkt21_mask = ((bucket21->signature >> pos21) & 1LLU) << pkt21_index;\
843 pkts_mask_out |= pkt20_mask | pkt21_mask; \
845 a20 = (void *) &bucket20->data[pos20 * f->entry_size]; \
846 a21 = (void *) &bucket21->data[pos21 * f->entry_size]; \
847 rte_prefetch0(a20); \
848 rte_prefetch0(a21); \
849 entries[pkt20_index] = a20; \
850 entries[pkt21_index] = a21; \
852 bucket20_mask = (~pkt20_mask) & (bucket20->next_valid << pkt20_index);\
853 bucket21_mask = (~pkt21_mask) & (bucket21->next_valid << pkt21_index);\
854 buckets_mask |= bucket20_mask | bucket21_mask; \
855 bucket20_next = bucket20->next; \
856 bucket21_next = bucket21->next; \
857 buckets[pkt20_index] = bucket20_next; \
858 buckets[pkt21_index] = bucket21_next; \
859 keys[pkt20_index] = key20; \
860 keys[pkt21_index] = key21; \
864 rte_table_hash_lookup_key8_lru(
866 struct rte_mbuf **pkts,
868 uint64_t *lookup_hit_mask,
871 struct rte_table_hash *f = (struct rte_table_hash *) table;
872 struct rte_bucket_4_8 *bucket10, *bucket11, *bucket20, *bucket21;
873 struct rte_mbuf *mbuf00, *mbuf01, *mbuf10, *mbuf11, *mbuf20, *mbuf21;
874 uint32_t pkt00_index, pkt01_index, pkt10_index,
875 pkt11_index, pkt20_index, pkt21_index;
876 uint64_t pkts_mask_out = 0;
878 __rte_unused uint32_t n_pkts_in = __builtin_popcountll(pkts_mask);
879 RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(f, n_pkts_in);
881 /* Cannot run the pipeline with less than 5 packets */
882 if (__builtin_popcountll(pkts_mask) < 5) {
883 for ( ; pkts_mask; ) {
884 struct rte_bucket_4_8 *bucket;
885 struct rte_mbuf *mbuf;
888 lookup1_stage0(pkt_index, mbuf, pkts, pkts_mask, f);
889 lookup1_stage1(mbuf, bucket, f);
890 lookup1_stage2_lru(pkt_index, mbuf, bucket,
891 pkts_mask_out, entries, f);
894 *lookup_hit_mask = pkts_mask_out;
895 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
903 /* Pipeline stage 0 */
904 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
910 pkt10_index = pkt00_index;
911 pkt11_index = pkt01_index;
913 /* Pipeline stage 0 */
914 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
917 /* Pipeline stage 1 */
918 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
924 for ( ; pkts_mask; ) {
932 pkt20_index = pkt10_index;
933 pkt21_index = pkt11_index;
934 pkt10_index = pkt00_index;
935 pkt11_index = pkt01_index;
937 /* Pipeline stage 0 */
938 lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,
939 mbuf00, mbuf01, pkts, pkts_mask, f);
941 /* Pipeline stage 1 */
942 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
944 /* Pipeline stage 2 */
945 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
946 bucket20, bucket21, pkts_mask_out, entries, f);
960 pkt20_index = pkt10_index;
961 pkt21_index = pkt11_index;
962 pkt10_index = pkt00_index;
963 pkt11_index = pkt01_index;
965 /* Pipeline stage 1 */
966 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
968 /* Pipeline stage 2 */
969 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
970 bucket20, bucket21, pkts_mask_out, entries, f);
977 pkt20_index = pkt10_index;
978 pkt21_index = pkt11_index;
980 /* Pipeline stage 2 */
981 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
982 bucket20, bucket21, pkts_mask_out, entries, f);
984 *lookup_hit_mask = pkts_mask_out;
985 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
987 } /* rte_table_hash_lookup_key8_lru() */
990 rte_table_hash_lookup_key8_lru_dosig(
992 struct rte_mbuf **pkts,
994 uint64_t *lookup_hit_mask,
997 struct rte_table_hash *f = (struct rte_table_hash *) table;
998 struct rte_bucket_4_8 *bucket10, *bucket11, *bucket20, *bucket21;
999 struct rte_mbuf *mbuf00, *mbuf01, *mbuf10, *mbuf11, *mbuf20, *mbuf21;
1000 uint32_t pkt00_index, pkt01_index, pkt10_index;
1001 uint32_t pkt11_index, pkt20_index, pkt21_index;
1002 uint64_t pkts_mask_out = 0;
1004 __rte_unused uint32_t n_pkts_in = __builtin_popcountll(pkts_mask);
1005 RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(f, n_pkts_in);
1007 /* Cannot run the pipeline with less than 5 packets */
1008 if (__builtin_popcountll(pkts_mask) < 5) {
1009 for ( ; pkts_mask; ) {
1010 struct rte_bucket_4_8 *bucket;
1011 struct rte_mbuf *mbuf;
1014 lookup1_stage0(pkt_index, mbuf, pkts, pkts_mask, f);
1015 lookup1_stage1_dosig(mbuf, bucket, f);
1016 lookup1_stage2_lru(pkt_index, mbuf, bucket,
1017 pkts_mask_out, entries, f);
1020 *lookup_hit_mask = pkts_mask_out;
1021 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
1029 /* Pipeline stage 0 */
1030 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1036 pkt10_index = pkt00_index;
1037 pkt11_index = pkt01_index;
1039 /* Pipeline stage 0 */
1040 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1043 /* Pipeline stage 1 */
1044 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1050 for ( ; pkts_mask; ) {
1052 bucket20 = bucket10;
1053 bucket21 = bucket11;
1058 pkt20_index = pkt10_index;
1059 pkt21_index = pkt11_index;
1060 pkt10_index = pkt00_index;
1061 pkt11_index = pkt01_index;
1063 /* Pipeline stage 0 */
1064 lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,
1065 mbuf00, mbuf01, pkts, pkts_mask, f);
1067 /* Pipeline stage 1 */
1068 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1070 /* Pipeline stage 2 */
1071 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
1072 bucket20, bucket21, pkts_mask_out, entries, f);
1080 bucket20 = bucket10;
1081 bucket21 = bucket11;
1086 pkt20_index = pkt10_index;
1087 pkt21_index = pkt11_index;
1088 pkt10_index = pkt00_index;
1089 pkt11_index = pkt01_index;
1091 /* Pipeline stage 1 */
1092 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1094 /* Pipeline stage 2 */
1095 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
1096 bucket20, bucket21, pkts_mask_out, entries, f);
1099 bucket20 = bucket10;
1100 bucket21 = bucket11;
1103 pkt20_index = pkt10_index;
1104 pkt21_index = pkt11_index;
1106 /* Pipeline stage 2 */
1107 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
1108 bucket20, bucket21, pkts_mask_out, entries, f);
1110 *lookup_hit_mask = pkts_mask_out;
1111 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
1113 } /* rte_table_hash_lookup_key8_lru_dosig() */
1116 rte_table_hash_lookup_key8_ext(
1118 struct rte_mbuf **pkts,
1120 uint64_t *lookup_hit_mask,
1123 struct rte_table_hash *f = (struct rte_table_hash *) table;
1124 struct rte_bucket_4_8 *bucket10, *bucket11, *bucket20, *bucket21;
1125 struct rte_mbuf *mbuf00, *mbuf01, *mbuf10, *mbuf11, *mbuf20, *mbuf21;
1126 uint32_t pkt00_index, pkt01_index, pkt10_index;
1127 uint32_t pkt11_index, pkt20_index, pkt21_index;
1128 uint64_t pkts_mask_out = 0, buckets_mask = 0;
1129 struct rte_bucket_4_8 *buckets[RTE_PORT_IN_BURST_SIZE_MAX];
1130 uint64_t *keys[RTE_PORT_IN_BURST_SIZE_MAX];
1132 __rte_unused uint32_t n_pkts_in = __builtin_popcountll(pkts_mask);
1133 RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(f, n_pkts_in);
1135 /* Cannot run the pipeline with less than 5 packets */
1136 if (__builtin_popcountll(pkts_mask) < 5) {
1137 for ( ; pkts_mask; ) {
1138 struct rte_bucket_4_8 *bucket;
1139 struct rte_mbuf *mbuf;
1142 lookup1_stage0(pkt_index, mbuf, pkts, pkts_mask, f);
1143 lookup1_stage1(mbuf, bucket, f);
1144 lookup1_stage2_ext(pkt_index, mbuf, bucket,
1145 pkts_mask_out, entries, buckets_mask, buckets,
1149 goto grind_next_buckets;
1156 /* Pipeline stage 0 */
1157 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1163 pkt10_index = pkt00_index;
1164 pkt11_index = pkt01_index;
1166 /* Pipeline stage 0 */
1167 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1170 /* Pipeline stage 1 */
1171 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
1177 for ( ; pkts_mask; ) {
1179 bucket20 = bucket10;
1180 bucket21 = bucket11;
1185 pkt20_index = pkt10_index;
1186 pkt21_index = pkt11_index;
1187 pkt10_index = pkt00_index;
1188 pkt11_index = pkt01_index;
1190 /* Pipeline stage 0 */
1191 lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,
1192 mbuf00, mbuf01, pkts, pkts_mask, f);
1194 /* Pipeline stage 1 */
1195 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
1197 /* Pipeline stage 2 */
1198 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1199 bucket20, bucket21, pkts_mask_out, entries,
1200 buckets_mask, buckets, keys, f);
1208 bucket20 = bucket10;
1209 bucket21 = bucket11;
1214 pkt20_index = pkt10_index;
1215 pkt21_index = pkt11_index;
1216 pkt10_index = pkt00_index;
1217 pkt11_index = pkt01_index;
1219 /* Pipeline stage 1 */
1220 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
1222 /* Pipeline stage 2 */
1223 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1224 bucket20, bucket21, pkts_mask_out, entries,
1225 buckets_mask, buckets, keys, f);
1228 bucket20 = bucket10;
1229 bucket21 = bucket11;
1232 pkt20_index = pkt10_index;
1233 pkt21_index = pkt11_index;
1235 /* Pipeline stage 2 */
1236 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1237 bucket20, bucket21, pkts_mask_out, entries,
1238 buckets_mask, buckets, keys, f);
1241 /* Grind next buckets */
1242 for ( ; buckets_mask; ) {
1243 uint64_t buckets_mask_next = 0;
1245 for ( ; buckets_mask; ) {
1249 pkt_index = __builtin_ctzll(buckets_mask);
1250 pkt_mask = 1LLU << pkt_index;
1251 buckets_mask &= ~pkt_mask;
1253 lookup_grinder(pkt_index, buckets, keys, pkts_mask_out,
1254 entries, buckets_mask_next, f);
1257 buckets_mask = buckets_mask_next;
1260 *lookup_hit_mask = pkts_mask_out;
1261 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
1263 } /* rte_table_hash_lookup_key8_ext() */
1266 rte_table_hash_lookup_key8_ext_dosig(
1268 struct rte_mbuf **pkts,
1270 uint64_t *lookup_hit_mask,
1273 struct rte_table_hash *f = (struct rte_table_hash *) table;
1274 struct rte_bucket_4_8 *bucket10, *bucket11, *bucket20, *bucket21;
1275 struct rte_mbuf *mbuf00, *mbuf01, *mbuf10, *mbuf11, *mbuf20, *mbuf21;
1276 uint32_t pkt00_index, pkt01_index, pkt10_index;
1277 uint32_t pkt11_index, pkt20_index, pkt21_index;
1278 uint64_t pkts_mask_out = 0, buckets_mask = 0;
1279 struct rte_bucket_4_8 *buckets[RTE_PORT_IN_BURST_SIZE_MAX];
1280 uint64_t *keys[RTE_PORT_IN_BURST_SIZE_MAX];
1282 __rte_unused uint32_t n_pkts_in = __builtin_popcountll(pkts_mask);
1283 RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(f, n_pkts_in);
1285 /* Cannot run the pipeline with less than 5 packets */
1286 if (__builtin_popcountll(pkts_mask) < 5) {
1287 for ( ; pkts_mask; ) {
1288 struct rte_bucket_4_8 *bucket;
1289 struct rte_mbuf *mbuf;
1292 lookup1_stage0(pkt_index, mbuf, pkts, pkts_mask, f);
1293 lookup1_stage1_dosig(mbuf, bucket, f);
1294 lookup1_stage2_ext(pkt_index, mbuf, bucket,
1295 pkts_mask_out, entries, buckets_mask,
1299 goto grind_next_buckets;
1306 /* Pipeline stage 0 */
1307 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1313 pkt10_index = pkt00_index;
1314 pkt11_index = pkt01_index;
1316 /* Pipeline stage 0 */
1317 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1320 /* Pipeline stage 1 */
1321 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1327 for ( ; pkts_mask; ) {
1329 bucket20 = bucket10;
1330 bucket21 = bucket11;
1335 pkt20_index = pkt10_index;
1336 pkt21_index = pkt11_index;
1337 pkt10_index = pkt00_index;
1338 pkt11_index = pkt01_index;
1340 /* Pipeline stage 0 */
1341 lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,
1342 mbuf00, mbuf01, pkts, pkts_mask, f);
1344 /* Pipeline stage 1 */
1345 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1347 /* Pipeline stage 2 */
1348 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1349 bucket20, bucket21, pkts_mask_out, entries,
1350 buckets_mask, buckets, keys, f);
1358 bucket20 = bucket10;
1359 bucket21 = bucket11;
1364 pkt20_index = pkt10_index;
1365 pkt21_index = pkt11_index;
1366 pkt10_index = pkt00_index;
1367 pkt11_index = pkt01_index;
1369 /* Pipeline stage 1 */
1370 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1372 /* Pipeline stage 2 */
1373 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1374 bucket20, bucket21, pkts_mask_out, entries,
1375 buckets_mask, buckets, keys, f);
1378 bucket20 = bucket10;
1379 bucket21 = bucket11;
1382 pkt20_index = pkt10_index;
1383 pkt21_index = pkt11_index;
1385 /* Pipeline stage 2 */
1386 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1387 bucket20, bucket21, pkts_mask_out, entries,
1388 buckets_mask, buckets, keys, f);
1391 /* Grind next buckets */
1392 for ( ; buckets_mask; ) {
1393 uint64_t buckets_mask_next = 0;
1395 for ( ; buckets_mask; ) {
1399 pkt_index = __builtin_ctzll(buckets_mask);
1400 pkt_mask = 1LLU << pkt_index;
1401 buckets_mask &= ~pkt_mask;
1403 lookup_grinder(pkt_index, buckets, keys, pkts_mask_out,
1404 entries, buckets_mask_next, f);
1407 buckets_mask = buckets_mask_next;
1410 *lookup_hit_mask = pkts_mask_out;
1411 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
1413 } /* rte_table_hash_lookup_key8_dosig_ext() */
1416 rte_table_hash_key8_stats_read(void *table, struct rte_table_stats *stats, int clear)
1418 struct rte_table_hash *t = table;
1421 memcpy(stats, &t->stats, sizeof(t->stats));
1424 memset(&t->stats, 0, sizeof(t->stats));
1429 struct rte_table_ops rte_table_hash_key8_lru_ops = {
1430 .f_create = rte_table_hash_create_key8_lru,
1431 .f_free = rte_table_hash_free_key8_lru,
1432 .f_add = rte_table_hash_entry_add_key8_lru,
1433 .f_delete = rte_table_hash_entry_delete_key8_lru,
1435 .f_delete_bulk = NULL,
1436 .f_lookup = rte_table_hash_lookup_key8_lru,
1437 .f_stats = rte_table_hash_key8_stats_read,
1440 struct rte_table_ops rte_table_hash_key8_lru_dosig_ops = {
1441 .f_create = rte_table_hash_create_key8_lru,
1442 .f_free = rte_table_hash_free_key8_lru,
1443 .f_add = rte_table_hash_entry_add_key8_lru,
1444 .f_delete = rte_table_hash_entry_delete_key8_lru,
1446 .f_delete_bulk = NULL,
1447 .f_lookup = rte_table_hash_lookup_key8_lru_dosig,
1448 .f_stats = rte_table_hash_key8_stats_read,
1451 struct rte_table_ops rte_table_hash_key8_ext_ops = {
1452 .f_create = rte_table_hash_create_key8_ext,
1453 .f_free = rte_table_hash_free_key8_ext,
1454 .f_add = rte_table_hash_entry_add_key8_ext,
1455 .f_delete = rte_table_hash_entry_delete_key8_ext,
1457 .f_delete_bulk = NULL,
1458 .f_lookup = rte_table_hash_lookup_key8_ext,
1459 .f_stats = rte_table_hash_key8_stats_read,
1462 struct rte_table_ops rte_table_hash_key8_ext_dosig_ops = {
1463 .f_create = rte_table_hash_create_key8_ext,
1464 .f_free = rte_table_hash_free_key8_ext,
1465 .f_add = rte_table_hash_entry_add_key8_ext,
1466 .f_delete = rte_table_hash_entry_delete_key8_ext,
1468 .f_delete_bulk = NULL,
1469 .f_lookup = rte_table_hash_lookup_key8_ext_dosig,
1470 .f_stats = rte_table_hash_key8_stats_read,