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) % RTE_CACHE_LINE_SIZE) != 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 = (struct rte_table_hash *) 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 = (struct rte_table_hash *) 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 = (struct rte_table_hash *) 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) % RTE_CACHE_LINE_SIZE) != 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 = (struct rte_table_hash *) 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 = (struct rte_table_hash *) 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 = (struct rte_table_hash *) 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) \
575 pkt0_index = __builtin_ctzll(pkts_mask); \
576 pkt_mask = 1LLU << pkt0_index; \
577 pkts_mask &= ~pkt_mask; \
579 mbuf0 = pkts[pkt0_index]; \
580 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf0, 0)); \
583 #define lookup1_stage1(mbuf1, bucket1, f) \
585 uint64_t signature; \
586 uint32_t bucket_index; \
588 signature = RTE_MBUF_METADATA_UINT32(mbuf1, f->signature_offset);\
589 bucket_index = signature & (f->n_buckets - 1); \
590 bucket1 = (struct rte_bucket_4_8 *) \
591 &f->memory[bucket_index * f->bucket_size]; \
592 rte_prefetch0(bucket1); \
595 #define lookup1_stage1_dosig(mbuf1, bucket1, f) \
598 uint64_t signature; \
599 uint32_t bucket_index; \
600 uint64_t hash_key_buffer; \
602 key = RTE_MBUF_METADATA_UINT64_PTR(mbuf1, f->key_offset);\
603 hash_key_buffer = *key & f->key_mask; \
604 signature = f->f_hash(&hash_key_buffer, \
605 RTE_TABLE_HASH_KEY_SIZE, f->seed); \
606 bucket_index = signature & (f->n_buckets - 1); \
607 bucket1 = (struct rte_bucket_4_8 *) \
608 &f->memory[bucket_index * f->bucket_size]; \
609 rte_prefetch0(bucket1); \
612 #define lookup1_stage2_lru(pkt2_index, mbuf2, bucket2, \
613 pkts_mask_out, entries, f) \
619 uint64_t hash_key_buffer; \
621 key = RTE_MBUF_METADATA_UINT64_PTR(mbuf2, f->key_offset);\
622 hash_key_buffer = key[0] & f->key_mask; \
624 lookup_key8_cmp((&hash_key_buffer), bucket2, pos); \
626 pkt_mask = ((bucket2->signature >> pos) & 1LLU) << pkt2_index;\
627 pkts_mask_out |= pkt_mask; \
629 a = (void *) &bucket2->data[pos * f->entry_size]; \
631 entries[pkt2_index] = a; \
632 lru_update(bucket2, pos); \
635 #define lookup1_stage2_ext(pkt2_index, mbuf2, bucket2, pkts_mask_out,\
636 entries, buckets_mask, buckets, keys, f) \
638 struct rte_bucket_4_8 *bucket_next; \
640 uint64_t pkt_mask, bucket_mask; \
643 uint64_t hash_key_buffer; \
645 key = RTE_MBUF_METADATA_UINT64_PTR(mbuf2, f->key_offset);\
646 hash_key_buffer = *key & f->key_mask; \
648 lookup_key8_cmp((&hash_key_buffer), bucket2, pos); \
650 pkt_mask = ((bucket2->signature >> pos) & 1LLU) << pkt2_index;\
651 pkts_mask_out |= pkt_mask; \
653 a = (void *) &bucket2->data[pos * f->entry_size]; \
655 entries[pkt2_index] = a; \
657 bucket_mask = (~pkt_mask) & (bucket2->next_valid << pkt2_index);\
658 buckets_mask |= bucket_mask; \
659 bucket_next = bucket2->next; \
660 buckets[pkt2_index] = bucket_next; \
661 keys[pkt2_index] = key; \
664 #define lookup_grinder(pkt_index, buckets, keys, pkts_mask_out, entries,\
667 struct rte_bucket_4_8 *bucket, *bucket_next; \
669 uint64_t pkt_mask, bucket_mask; \
672 uint64_t hash_key_buffer; \
674 bucket = buckets[pkt_index]; \
675 key = keys[pkt_index]; \
676 hash_key_buffer = (*key) & f->key_mask; \
678 lookup_key8_cmp((&hash_key_buffer), bucket, pos); \
680 pkt_mask = ((bucket->signature >> pos) & 1LLU) << pkt_index;\
681 pkts_mask_out |= pkt_mask; \
683 a = (void *) &bucket->data[pos * f->entry_size]; \
685 entries[pkt_index] = a; \
687 bucket_mask = (~pkt_mask) & (bucket->next_valid << pkt_index);\
688 buckets_mask |= bucket_mask; \
689 bucket_next = bucket->next; \
690 rte_prefetch0(bucket_next); \
691 buckets[pkt_index] = bucket_next; \
692 keys[pkt_index] = key; \
695 #define lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01,\
698 uint64_t pkt00_mask, pkt01_mask; \
700 pkt00_index = __builtin_ctzll(pkts_mask); \
701 pkt00_mask = 1LLU << pkt00_index; \
702 pkts_mask &= ~pkt00_mask; \
704 mbuf00 = pkts[pkt00_index]; \
705 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf00, 0)); \
707 pkt01_index = __builtin_ctzll(pkts_mask); \
708 pkt01_mask = 1LLU << pkt01_index; \
709 pkts_mask &= ~pkt01_mask; \
711 mbuf01 = pkts[pkt01_index]; \
712 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf01, 0)); \
715 #define lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,\
716 mbuf00, mbuf01, pkts, pkts_mask) \
718 uint64_t pkt00_mask, pkt01_mask; \
720 pkt00_index = __builtin_ctzll(pkts_mask); \
721 pkt00_mask = 1LLU << pkt00_index; \
722 pkts_mask &= ~pkt00_mask; \
724 mbuf00 = pkts[pkt00_index]; \
725 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf00, 0)); \
727 pkt01_index = __builtin_ctzll(pkts_mask); \
728 if (pkts_mask == 0) \
729 pkt01_index = pkt00_index; \
731 pkt01_mask = 1LLU << pkt01_index; \
732 pkts_mask &= ~pkt01_mask; \
734 mbuf01 = pkts[pkt01_index]; \
735 rte_prefetch0(RTE_MBUF_METADATA_UINT8_PTR(mbuf01, 0)); \
738 #define lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f) \
740 uint64_t signature10, signature11; \
741 uint32_t bucket10_index, bucket11_index; \
743 signature10 = RTE_MBUF_METADATA_UINT32(mbuf10, f->signature_offset);\
744 bucket10_index = signature10 & (f->n_buckets - 1); \
745 bucket10 = (struct rte_bucket_4_8 *) \
746 &f->memory[bucket10_index * f->bucket_size]; \
747 rte_prefetch0(bucket10); \
749 signature11 = RTE_MBUF_METADATA_UINT32(mbuf11, f->signature_offset);\
750 bucket11_index = signature11 & (f->n_buckets - 1); \
751 bucket11 = (struct rte_bucket_4_8 *) \
752 &f->memory[bucket11_index * f->bucket_size]; \
753 rte_prefetch0(bucket11); \
756 #define lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f)\
758 uint64_t *key10, *key11; \
759 uint64_t hash_offset_buffer10; \
760 uint64_t hash_offset_buffer11; \
761 uint64_t signature10, signature11; \
762 uint32_t bucket10_index, bucket11_index; \
763 rte_table_hash_op_hash f_hash = f->f_hash; \
764 uint64_t seed = f->seed; \
765 uint32_t key_offset = f->key_offset; \
767 key10 = RTE_MBUF_METADATA_UINT64_PTR(mbuf10, key_offset);\
768 key11 = RTE_MBUF_METADATA_UINT64_PTR(mbuf11, key_offset);\
769 hash_offset_buffer10 = *key10 & f->key_mask; \
770 hash_offset_buffer11 = *key11 & f->key_mask; \
772 signature10 = f_hash(&hash_offset_buffer10, \
773 RTE_TABLE_HASH_KEY_SIZE, seed); \
774 bucket10_index = signature10 & (f->n_buckets - 1); \
775 bucket10 = (struct rte_bucket_4_8 *) \
776 &f->memory[bucket10_index * f->bucket_size]; \
777 rte_prefetch0(bucket10); \
779 signature11 = f_hash(&hash_offset_buffer11, \
780 RTE_TABLE_HASH_KEY_SIZE, seed); \
781 bucket11_index = signature11 & (f->n_buckets - 1); \
782 bucket11 = (struct rte_bucket_4_8 *) \
783 &f->memory[bucket11_index * f->bucket_size]; \
784 rte_prefetch0(bucket11); \
787 #define lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,\
788 bucket20, bucket21, pkts_mask_out, entries, f) \
791 uint64_t pkt20_mask, pkt21_mask; \
792 uint64_t *key20, *key21; \
793 uint64_t hash_offset_buffer20; \
794 uint64_t hash_offset_buffer21; \
795 uint32_t pos20, pos21; \
797 key20 = RTE_MBUF_METADATA_UINT64_PTR(mbuf20, f->key_offset);\
798 key21 = RTE_MBUF_METADATA_UINT64_PTR(mbuf21, f->key_offset);\
799 hash_offset_buffer20 = *key20 & f->key_mask; \
800 hash_offset_buffer21 = *key21 & f->key_mask; \
802 lookup_key8_cmp((&hash_offset_buffer20), bucket20, pos20);\
803 lookup_key8_cmp((&hash_offset_buffer21), bucket21, pos21);\
805 pkt20_mask = ((bucket20->signature >> pos20) & 1LLU) << pkt20_index;\
806 pkt21_mask = ((bucket21->signature >> pos21) & 1LLU) << pkt21_index;\
807 pkts_mask_out |= pkt20_mask | pkt21_mask; \
809 a20 = (void *) &bucket20->data[pos20 * f->entry_size]; \
810 a21 = (void *) &bucket21->data[pos21 * f->entry_size]; \
811 rte_prefetch0(a20); \
812 rte_prefetch0(a21); \
813 entries[pkt20_index] = a20; \
814 entries[pkt21_index] = a21; \
815 lru_update(bucket20, pos20); \
816 lru_update(bucket21, pos21); \
819 #define lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21, bucket20, \
820 bucket21, pkts_mask_out, entries, buckets_mask, buckets, keys, f)\
822 struct rte_bucket_4_8 *bucket20_next, *bucket21_next; \
824 uint64_t pkt20_mask, pkt21_mask, bucket20_mask, bucket21_mask;\
825 uint64_t *key20, *key21; \
826 uint64_t hash_offset_buffer20; \
827 uint64_t hash_offset_buffer21; \
828 uint32_t pos20, pos21; \
830 key20 = RTE_MBUF_METADATA_UINT64_PTR(mbuf20, f->key_offset);\
831 key21 = RTE_MBUF_METADATA_UINT64_PTR(mbuf21, f->key_offset);\
832 hash_offset_buffer20 = *key20 & f->key_mask; \
833 hash_offset_buffer21 = *key21 & f->key_mask; \
835 lookup_key8_cmp((&hash_offset_buffer20), bucket20, pos20);\
836 lookup_key8_cmp((&hash_offset_buffer21), bucket21, pos21);\
838 pkt20_mask = ((bucket20->signature >> pos20) & 1LLU) << pkt20_index;\
839 pkt21_mask = ((bucket21->signature >> pos21) & 1LLU) << pkt21_index;\
840 pkts_mask_out |= pkt20_mask | pkt21_mask; \
842 a20 = (void *) &bucket20->data[pos20 * f->entry_size]; \
843 a21 = (void *) &bucket21->data[pos21 * f->entry_size]; \
844 rte_prefetch0(a20); \
845 rte_prefetch0(a21); \
846 entries[pkt20_index] = a20; \
847 entries[pkt21_index] = a21; \
849 bucket20_mask = (~pkt20_mask) & (bucket20->next_valid << pkt20_index);\
850 bucket21_mask = (~pkt21_mask) & (bucket21->next_valid << pkt21_index);\
851 buckets_mask |= bucket20_mask | bucket21_mask; \
852 bucket20_next = bucket20->next; \
853 bucket21_next = bucket21->next; \
854 buckets[pkt20_index] = bucket20_next; \
855 buckets[pkt21_index] = bucket21_next; \
856 keys[pkt20_index] = key20; \
857 keys[pkt21_index] = key21; \
861 rte_table_hash_lookup_key8_lru(
863 struct rte_mbuf **pkts,
865 uint64_t *lookup_hit_mask,
868 struct rte_table_hash *f = (struct rte_table_hash *) table;
869 struct rte_bucket_4_8 *bucket10, *bucket11, *bucket20, *bucket21;
870 struct rte_mbuf *mbuf00, *mbuf01, *mbuf10, *mbuf11, *mbuf20, *mbuf21;
871 uint32_t pkt00_index, pkt01_index, pkt10_index,
872 pkt11_index, pkt20_index, pkt21_index;
873 uint64_t pkts_mask_out = 0;
875 __rte_unused uint32_t n_pkts_in = __builtin_popcountll(pkts_mask);
876 RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(f, n_pkts_in);
878 /* Cannot run the pipeline with less than 5 packets */
879 if (__builtin_popcountll(pkts_mask) < 5) {
880 for ( ; pkts_mask; ) {
881 struct rte_bucket_4_8 *bucket;
882 struct rte_mbuf *mbuf;
885 lookup1_stage0(pkt_index, mbuf, pkts, pkts_mask);
886 lookup1_stage1(mbuf, bucket, f);
887 lookup1_stage2_lru(pkt_index, mbuf, bucket,
888 pkts_mask_out, entries, f);
891 *lookup_hit_mask = pkts_mask_out;
892 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
900 /* Pipeline stage 0 */
901 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
907 pkt10_index = pkt00_index;
908 pkt11_index = pkt01_index;
910 /* Pipeline stage 0 */
911 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
914 /* Pipeline stage 1 */
915 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
921 for ( ; pkts_mask; ) {
929 pkt20_index = pkt10_index;
930 pkt21_index = pkt11_index;
931 pkt10_index = pkt00_index;
932 pkt11_index = pkt01_index;
934 /* Pipeline stage 0 */
935 lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,
936 mbuf00, mbuf01, pkts, pkts_mask);
938 /* Pipeline stage 1 */
939 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
941 /* Pipeline stage 2 */
942 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
943 bucket20, bucket21, pkts_mask_out, entries, f);
957 pkt20_index = pkt10_index;
958 pkt21_index = pkt11_index;
959 pkt10_index = pkt00_index;
960 pkt11_index = pkt01_index;
962 /* Pipeline stage 1 */
963 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
965 /* Pipeline stage 2 */
966 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
967 bucket20, bucket21, pkts_mask_out, entries, f);
974 pkt20_index = pkt10_index;
975 pkt21_index = pkt11_index;
977 /* Pipeline stage 2 */
978 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
979 bucket20, bucket21, pkts_mask_out, entries, f);
981 *lookup_hit_mask = pkts_mask_out;
982 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
984 } /* rte_table_hash_lookup_key8_lru() */
987 rte_table_hash_lookup_key8_lru_dosig(
989 struct rte_mbuf **pkts,
991 uint64_t *lookup_hit_mask,
994 struct rte_table_hash *f = (struct rte_table_hash *) table;
995 struct rte_bucket_4_8 *bucket10, *bucket11, *bucket20, *bucket21;
996 struct rte_mbuf *mbuf00, *mbuf01, *mbuf10, *mbuf11, *mbuf20, *mbuf21;
997 uint32_t pkt00_index, pkt01_index, pkt10_index;
998 uint32_t pkt11_index, pkt20_index, pkt21_index;
999 uint64_t pkts_mask_out = 0;
1001 __rte_unused uint32_t n_pkts_in = __builtin_popcountll(pkts_mask);
1002 RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(f, n_pkts_in);
1004 /* Cannot run the pipeline with less than 5 packets */
1005 if (__builtin_popcountll(pkts_mask) < 5) {
1006 for ( ; pkts_mask; ) {
1007 struct rte_bucket_4_8 *bucket;
1008 struct rte_mbuf *mbuf;
1011 lookup1_stage0(pkt_index, mbuf, pkts, pkts_mask);
1012 lookup1_stage1_dosig(mbuf, bucket, f);
1013 lookup1_stage2_lru(pkt_index, mbuf, bucket,
1014 pkts_mask_out, entries, f);
1017 *lookup_hit_mask = pkts_mask_out;
1018 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
1026 /* Pipeline stage 0 */
1027 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1033 pkt10_index = pkt00_index;
1034 pkt11_index = pkt01_index;
1036 /* Pipeline stage 0 */
1037 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1040 /* Pipeline stage 1 */
1041 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1047 for ( ; pkts_mask; ) {
1049 bucket20 = bucket10;
1050 bucket21 = bucket11;
1055 pkt20_index = pkt10_index;
1056 pkt21_index = pkt11_index;
1057 pkt10_index = pkt00_index;
1058 pkt11_index = pkt01_index;
1060 /* Pipeline stage 0 */
1061 lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,
1062 mbuf00, mbuf01, pkts, pkts_mask);
1064 /* Pipeline stage 1 */
1065 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1067 /* Pipeline stage 2 */
1068 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
1069 bucket20, bucket21, pkts_mask_out, entries, f);
1077 bucket20 = bucket10;
1078 bucket21 = bucket11;
1083 pkt20_index = pkt10_index;
1084 pkt21_index = pkt11_index;
1085 pkt10_index = pkt00_index;
1086 pkt11_index = pkt01_index;
1088 /* Pipeline stage 1 */
1089 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1091 /* Pipeline stage 2 */
1092 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
1093 bucket20, bucket21, pkts_mask_out, entries, f);
1096 bucket20 = bucket10;
1097 bucket21 = bucket11;
1100 pkt20_index = pkt10_index;
1101 pkt21_index = pkt11_index;
1103 /* Pipeline stage 2 */
1104 lookup2_stage2_lru(pkt20_index, pkt21_index, mbuf20, mbuf21,
1105 bucket20, bucket21, pkts_mask_out, entries, f);
1107 *lookup_hit_mask = pkts_mask_out;
1108 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
1110 } /* rte_table_hash_lookup_key8_lru_dosig() */
1113 rte_table_hash_lookup_key8_ext(
1115 struct rte_mbuf **pkts,
1117 uint64_t *lookup_hit_mask,
1120 struct rte_table_hash *f = (struct rte_table_hash *) table;
1121 struct rte_bucket_4_8 *bucket10, *bucket11, *bucket20, *bucket21;
1122 struct rte_mbuf *mbuf00, *mbuf01, *mbuf10, *mbuf11, *mbuf20, *mbuf21;
1123 uint32_t pkt00_index, pkt01_index, pkt10_index;
1124 uint32_t pkt11_index, pkt20_index, pkt21_index;
1125 uint64_t pkts_mask_out = 0, buckets_mask = 0;
1126 struct rte_bucket_4_8 *buckets[RTE_PORT_IN_BURST_SIZE_MAX];
1127 uint64_t *keys[RTE_PORT_IN_BURST_SIZE_MAX];
1129 __rte_unused uint32_t n_pkts_in = __builtin_popcountll(pkts_mask);
1130 RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(f, n_pkts_in);
1132 /* Cannot run the pipeline with less than 5 packets */
1133 if (__builtin_popcountll(pkts_mask) < 5) {
1134 for ( ; pkts_mask; ) {
1135 struct rte_bucket_4_8 *bucket;
1136 struct rte_mbuf *mbuf;
1139 lookup1_stage0(pkt_index, mbuf, pkts, pkts_mask);
1140 lookup1_stage1(mbuf, bucket, f);
1141 lookup1_stage2_ext(pkt_index, mbuf, bucket,
1142 pkts_mask_out, entries, buckets_mask, buckets,
1146 goto grind_next_buckets;
1153 /* Pipeline stage 0 */
1154 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1160 pkt10_index = pkt00_index;
1161 pkt11_index = pkt01_index;
1163 /* Pipeline stage 0 */
1164 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1167 /* Pipeline stage 1 */
1168 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
1174 for ( ; pkts_mask; ) {
1176 bucket20 = bucket10;
1177 bucket21 = bucket11;
1182 pkt20_index = pkt10_index;
1183 pkt21_index = pkt11_index;
1184 pkt10_index = pkt00_index;
1185 pkt11_index = pkt01_index;
1187 /* Pipeline stage 0 */
1188 lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,
1189 mbuf00, mbuf01, pkts, pkts_mask);
1191 /* Pipeline stage 1 */
1192 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
1194 /* Pipeline stage 2 */
1195 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1196 bucket20, bucket21, pkts_mask_out, entries,
1197 buckets_mask, buckets, keys, f);
1205 bucket20 = bucket10;
1206 bucket21 = bucket11;
1211 pkt20_index = pkt10_index;
1212 pkt21_index = pkt11_index;
1213 pkt10_index = pkt00_index;
1214 pkt11_index = pkt01_index;
1216 /* Pipeline stage 1 */
1217 lookup2_stage1(mbuf10, mbuf11, bucket10, bucket11, f);
1219 /* Pipeline stage 2 */
1220 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1221 bucket20, bucket21, pkts_mask_out, entries,
1222 buckets_mask, buckets, keys, f);
1225 bucket20 = bucket10;
1226 bucket21 = bucket11;
1229 pkt20_index = pkt10_index;
1230 pkt21_index = pkt11_index;
1232 /* Pipeline stage 2 */
1233 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1234 bucket20, bucket21, pkts_mask_out, entries,
1235 buckets_mask, buckets, keys, f);
1238 /* Grind next buckets */
1239 for ( ; buckets_mask; ) {
1240 uint64_t buckets_mask_next = 0;
1242 for ( ; buckets_mask; ) {
1246 pkt_index = __builtin_ctzll(buckets_mask);
1247 pkt_mask = 1LLU << pkt_index;
1248 buckets_mask &= ~pkt_mask;
1250 lookup_grinder(pkt_index, buckets, keys, pkts_mask_out,
1251 entries, buckets_mask_next, f);
1254 buckets_mask = buckets_mask_next;
1257 *lookup_hit_mask = pkts_mask_out;
1258 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
1260 } /* rte_table_hash_lookup_key8_ext() */
1263 rte_table_hash_lookup_key8_ext_dosig(
1265 struct rte_mbuf **pkts,
1267 uint64_t *lookup_hit_mask,
1270 struct rte_table_hash *f = (struct rte_table_hash *) table;
1271 struct rte_bucket_4_8 *bucket10, *bucket11, *bucket20, *bucket21;
1272 struct rte_mbuf *mbuf00, *mbuf01, *mbuf10, *mbuf11, *mbuf20, *mbuf21;
1273 uint32_t pkt00_index, pkt01_index, pkt10_index;
1274 uint32_t pkt11_index, pkt20_index, pkt21_index;
1275 uint64_t pkts_mask_out = 0, buckets_mask = 0;
1276 struct rte_bucket_4_8 *buckets[RTE_PORT_IN_BURST_SIZE_MAX];
1277 uint64_t *keys[RTE_PORT_IN_BURST_SIZE_MAX];
1279 __rte_unused uint32_t n_pkts_in = __builtin_popcountll(pkts_mask);
1280 RTE_TABLE_HASH_KEY8_STATS_PKTS_IN_ADD(f, n_pkts_in);
1282 /* Cannot run the pipeline with less than 5 packets */
1283 if (__builtin_popcountll(pkts_mask) < 5) {
1284 for ( ; pkts_mask; ) {
1285 struct rte_bucket_4_8 *bucket;
1286 struct rte_mbuf *mbuf;
1289 lookup1_stage0(pkt_index, mbuf, pkts, pkts_mask);
1290 lookup1_stage1_dosig(mbuf, bucket, f);
1291 lookup1_stage2_ext(pkt_index, mbuf, bucket,
1292 pkts_mask_out, entries, buckets_mask,
1296 goto grind_next_buckets;
1303 /* Pipeline stage 0 */
1304 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1310 pkt10_index = pkt00_index;
1311 pkt11_index = pkt01_index;
1313 /* Pipeline stage 0 */
1314 lookup2_stage0(pkt00_index, pkt01_index, mbuf00, mbuf01, pkts,
1317 /* Pipeline stage 1 */
1318 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1324 for ( ; pkts_mask; ) {
1326 bucket20 = bucket10;
1327 bucket21 = bucket11;
1332 pkt20_index = pkt10_index;
1333 pkt21_index = pkt11_index;
1334 pkt10_index = pkt00_index;
1335 pkt11_index = pkt01_index;
1337 /* Pipeline stage 0 */
1338 lookup2_stage0_with_odd_support(pkt00_index, pkt01_index,
1339 mbuf00, mbuf01, pkts, pkts_mask);
1341 /* Pipeline stage 1 */
1342 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1344 /* Pipeline stage 2 */
1345 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1346 bucket20, bucket21, pkts_mask_out, entries,
1347 buckets_mask, buckets, keys, f);
1355 bucket20 = bucket10;
1356 bucket21 = bucket11;
1361 pkt20_index = pkt10_index;
1362 pkt21_index = pkt11_index;
1363 pkt10_index = pkt00_index;
1364 pkt11_index = pkt01_index;
1366 /* Pipeline stage 1 */
1367 lookup2_stage1_dosig(mbuf10, mbuf11, bucket10, bucket11, f);
1369 /* Pipeline stage 2 */
1370 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1371 bucket20, bucket21, pkts_mask_out, entries,
1372 buckets_mask, buckets, keys, f);
1375 bucket20 = bucket10;
1376 bucket21 = bucket11;
1379 pkt20_index = pkt10_index;
1380 pkt21_index = pkt11_index;
1382 /* Pipeline stage 2 */
1383 lookup2_stage2_ext(pkt20_index, pkt21_index, mbuf20, mbuf21,
1384 bucket20, bucket21, pkts_mask_out, entries,
1385 buckets_mask, buckets, keys, f);
1388 /* Grind next buckets */
1389 for ( ; buckets_mask; ) {
1390 uint64_t buckets_mask_next = 0;
1392 for ( ; buckets_mask; ) {
1396 pkt_index = __builtin_ctzll(buckets_mask);
1397 pkt_mask = 1LLU << pkt_index;
1398 buckets_mask &= ~pkt_mask;
1400 lookup_grinder(pkt_index, buckets, keys, pkts_mask_out,
1401 entries, buckets_mask_next, f);
1404 buckets_mask = buckets_mask_next;
1407 *lookup_hit_mask = pkts_mask_out;
1408 RTE_TABLE_HASH_KEY8_STATS_PKTS_LOOKUP_MISS(f, n_pkts_in - __builtin_popcountll(pkts_mask_out));
1410 } /* rte_table_hash_lookup_key8_dosig_ext() */
1413 rte_table_hash_key8_stats_read(void *table, struct rte_table_stats *stats, int clear)
1415 struct rte_table_hash *t = (struct rte_table_hash *) table;
1418 memcpy(stats, &t->stats, sizeof(t->stats));
1421 memset(&t->stats, 0, sizeof(t->stats));
1426 struct rte_table_ops rte_table_hash_key8_lru_ops = {
1427 .f_create = rte_table_hash_create_key8_lru,
1428 .f_free = rte_table_hash_free_key8_lru,
1429 .f_add = rte_table_hash_entry_add_key8_lru,
1430 .f_delete = rte_table_hash_entry_delete_key8_lru,
1432 .f_delete_bulk = NULL,
1433 .f_lookup = rte_table_hash_lookup_key8_lru,
1434 .f_stats = rte_table_hash_key8_stats_read,
1437 struct rte_table_ops rte_table_hash_key8_lru_dosig_ops = {
1438 .f_create = rte_table_hash_create_key8_lru,
1439 .f_free = rte_table_hash_free_key8_lru,
1440 .f_add = rte_table_hash_entry_add_key8_lru,
1441 .f_delete = rte_table_hash_entry_delete_key8_lru,
1443 .f_delete_bulk = NULL,
1444 .f_lookup = rte_table_hash_lookup_key8_lru_dosig,
1445 .f_stats = rte_table_hash_key8_stats_read,
1448 struct rte_table_ops rte_table_hash_key8_ext_ops = {
1449 .f_create = rte_table_hash_create_key8_ext,
1450 .f_free = rte_table_hash_free_key8_ext,
1451 .f_add = rte_table_hash_entry_add_key8_ext,
1452 .f_delete = rte_table_hash_entry_delete_key8_ext,
1454 .f_delete_bulk = NULL,
1455 .f_lookup = rte_table_hash_lookup_key8_ext,
1456 .f_stats = rte_table_hash_key8_stats_read,
1459 struct rte_table_ops rte_table_hash_key8_ext_dosig_ops = {
1460 .f_create = rte_table_hash_create_key8_ext,
1461 .f_free = rte_table_hash_free_key8_ext,
1462 .f_add = rte_table_hash_entry_add_key8_ext,
1463 .f_delete = rte_table_hash_entry_delete_key8_ext,
1465 .f_delete_bulk = NULL,
1466 .f_lookup = rte_table_hash_lookup_key8_ext_dosig,
1467 .f_stats = rte_table_hash_key8_stats_read,