Lines Matching refs:table_packets
29 struct table_packets { struct
53 void *key, struct table_packets *table_packets, in test_table_type() argument
179 if (table_packets->n_hit_packets) { in test_table_type()
180 for (i = 0; i < table_packets->n_hit_packets; i++) in test_table_type()
181 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]); in test_table_type()
185 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, in test_table_type()
186 table_packets->n_hit_packets); in test_table_type()
190 if (table_packets->n_miss_packets) { in test_table_type()
191 for (i = 0; i < table_packets->n_miss_packets; i++) in test_table_type()
192 RING_ENQUEUE(RING_RX, table_packets->miss_packet[i]); in test_table_type()
196 VERIFY_TRAFFIC(RING_TX, table_packets->n_miss_packets, 0); in test_table_type()
200 if (table_packets->n_hit_packets && table_packets->n_miss_packets) { in test_table_type()
201 for (i = 0; i < (table_packets->n_hit_packets) / 2; i++) in test_table_type()
202 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]); in test_table_type()
204 for (i = 0; i < (table_packets->n_miss_packets) / 2; i++) in test_table_type()
205 RING_ENQUEUE(RING_RX, table_packets->miss_packet[i]); in test_table_type()
208 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, in test_table_type()
209 table_packets->n_hit_packets / 2); in test_table_type()
213 if (table_packets->n_hit_packets) { in test_table_type()
214 RING_ENQUEUE(RING_RX, table_packets->hit_packet[0]); in test_table_type()
216 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, 1); in test_table_type()
218 if (table_packets->n_miss_packets) { in test_table_type()
219 RING_ENQUEUE(RING_RX, table_packets->miss_packet[0]); in test_table_type()
221 VERIFY_TRAFFIC(RING_TX, table_packets->n_miss_packets, 0); in test_table_type()
243 if (table_packets->n_hit_packets) { in test_table_type()
244 for (i = 0; i < table_packets->n_hit_packets; i++) in test_table_type()
245 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]); in test_table_type()
248 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, 0); in test_table_type()
249 VERIFY_TRAFFIC(RING_TX_2, table_packets->n_hit_packets, in test_table_type()
250 table_packets->n_hit_packets); in test_table_type()
268 struct table_packets table_packets; in test_table_stub_combined() local
274 table_packets.hit_packet[i] = i; in test_table_stub_combined()
276 table_packets.n_hit_packets = N_PACKETS; in test_table_stub_combined()
277 table_packets.n_miss_packets = 0; in test_table_stub_combined()
280 &table_packets, NULL, 1); in test_table_stub_combined()
306 struct table_packets table_packets; in test_table_lpm_combined() local
313 table_packets.hit_packet[i] = 0xadadadad; in test_table_lpm_combined()
316 table_packets.miss_packet[i] = 0xfefefefe; in test_table_lpm_combined()
318 table_packets.n_hit_packets = N_PACKETS; in test_table_lpm_combined()
319 table_packets.n_miss_packets = N_PACKETS; in test_table_lpm_combined()
322 (void *)&lpm_key, &table_packets, NULL, 0); in test_table_lpm_combined()
329 (void *)&lpm_key, &table_packets, NULL, 0); in test_table_lpm_combined()
336 (void *)&lpm_key, &table_packets, NULL, 0); in test_table_lpm_combined()
342 (void *)&lpm_key, &table_packets, NULL, 0); in test_table_lpm_combined()
367 struct table_packets table_packets; in test_table_lpm_ipv6_combined() local
373 table_packets.hit_packet[i] = 0xadadadad; in test_table_lpm_ipv6_combined()
376 table_packets.miss_packet[i] = 0xadadadab; in test_table_lpm_ipv6_combined()
378 table_packets.n_hit_packets = N_PACKETS; in test_table_lpm_ipv6_combined()
379 table_packets.n_miss_packets = N_PACKETS; in test_table_lpm_ipv6_combined()
383 (void *)&lpm_ipv6_key, &table_packets, NULL, 0); in test_table_lpm_ipv6_combined()
391 (void *)&lpm_ipv6_key, &table_packets, NULL, 0); in test_table_lpm_ipv6_combined()
399 (void *)&lpm_ipv6_key, &table_packets, NULL, 0); in test_table_lpm_ipv6_combined()
405 (void *)&lpm_ipv6_key, &table_packets, NULL, 0); in test_table_lpm_ipv6_combined()
434 struct table_packets table_packets; in test_table_hash8lru() local
440 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash8lru()
443 table_packets.miss_packet[i] = 0xfefefefe; in test_table_hash8lru()
445 table_packets.n_hit_packets = 50; in test_table_hash8lru()
446 table_packets.n_miss_packets = 50; in test_table_hash8lru()
449 (void *)&key8lru_params, (void *)key8lru, &table_packets, in test_table_hash8lru()
457 (void *)&key8lru_params, (void *)key8lru, &table_packets, in test_table_hash8lru()
465 (void *)&key8lru_params, (void *)key8lru, &table_packets, in test_table_hash8lru()
495 struct table_packets table_packets; in test_table_hash16lru() local
501 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash16lru()
504 table_packets.miss_packet[i] = 0xfefefefe; in test_table_hash16lru()
506 table_packets.n_hit_packets = 50; in test_table_hash16lru()
507 table_packets.n_miss_packets = 50; in test_table_hash16lru()
510 (void *)&key16lru_params, (void *)key16lru, &table_packets, in test_table_hash16lru()
518 (void *)&key16lru_params, (void *)key16lru, &table_packets, in test_table_hash16lru()
526 (void *)&key16lru_params, (void *)key16lru, &table_packets, in test_table_hash16lru()
556 struct table_packets table_packets; in test_table_hash32lru() local
562 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash32lru()
565 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash32lru()
567 table_packets.n_hit_packets = 50; in test_table_hash32lru()
568 table_packets.n_miss_packets = 50; in test_table_hash32lru()
571 (void *)&key32lru_params, (void *)key32lru, &table_packets, in test_table_hash32lru()
579 (void *)&key32lru_params, (void *)key32lru, &table_packets, in test_table_hash32lru()
587 (void *)&key32lru_params, (void *)key32lru, &table_packets, in test_table_hash32lru()
617 struct table_packets table_packets; in test_table_hash8ext() local
623 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash8ext()
626 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash8ext()
628 table_packets.n_hit_packets = 50; in test_table_hash8ext()
629 table_packets.n_miss_packets = 50; in test_table_hash8ext()
632 (void *)&key8ext_params, (void *)key8ext, &table_packets, in test_table_hash8ext()
640 (void *)&key8ext_params, (void *)key8ext, &table_packets, in test_table_hash8ext()
648 (void *)&key8ext_params, (void *)key8ext, &table_packets, in test_table_hash8ext()
678 struct table_packets table_packets; in test_table_hash16ext() local
684 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash16ext()
687 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash16ext()
689 table_packets.n_hit_packets = 50; in test_table_hash16ext()
690 table_packets.n_miss_packets = 50; in test_table_hash16ext()
693 (void *)&key16ext_params, (void *)key16ext, &table_packets, in test_table_hash16ext()
701 (void *)&key16ext_params, (void *)key16ext, &table_packets, in test_table_hash16ext()
709 (void *)&key16ext_params, (void *)key16ext, &table_packets, in test_table_hash16ext()
739 struct table_packets table_packets; in test_table_hash32ext() local
745 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash32ext()
748 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash32ext()
750 table_packets.n_hit_packets = 50; in test_table_hash32ext()
751 table_packets.n_miss_packets = 50; in test_table_hash32ext()
754 (void *)&key32ext_params, (void *)key32ext, &table_packets, in test_table_hash32ext()
762 (void *)&key32ext_params, (void *)key32ext, &table_packets, in test_table_hash32ext()
770 (void *)&key32ext_params, (void *)key32ext, &table_packets, in test_table_hash32ext()
800 struct table_packets table_packets; in test_table_hash_cuckoo_combined() local
806 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash_cuckoo_combined()
809 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash_cuckoo_combined()
811 table_packets.n_hit_packets = 50; in test_table_hash_cuckoo_combined()
812 table_packets.n_miss_packets = 50; in test_table_hash_cuckoo_combined()
815 (void *)&cuckoo_params, (void *)key_cuckoo, &table_packets, in test_table_hash_cuckoo_combined()
823 (void *)&cuckoo_params, (void *)key_cuckoo, &table_packets, in test_table_hash_cuckoo_combined()
831 (void *)&cuckoo_params, (void *)key_cuckoo, &table_packets, in test_table_hash_cuckoo_combined()
839 (void *)&cuckoo_params, (void *)key_cuckoo, &table_packets, in test_table_hash_cuckoo_combined()