Lines Matching refs:table_packets
27 struct table_packets { struct
51 void *key, struct table_packets *table_packets, in test_table_type() argument
177 if (table_packets->n_hit_packets) { in test_table_type()
178 for (i = 0; i < table_packets->n_hit_packets; i++) in test_table_type()
179 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]); in test_table_type()
183 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, in test_table_type()
184 table_packets->n_hit_packets); in test_table_type()
188 if (table_packets->n_miss_packets) { in test_table_type()
189 for (i = 0; i < table_packets->n_miss_packets; i++) in test_table_type()
190 RING_ENQUEUE(RING_RX, table_packets->miss_packet[i]); in test_table_type()
194 VERIFY_TRAFFIC(RING_TX, table_packets->n_miss_packets, 0); in test_table_type()
198 if (table_packets->n_hit_packets && table_packets->n_miss_packets) { in test_table_type()
199 for (i = 0; i < (table_packets->n_hit_packets) / 2; i++) in test_table_type()
200 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]); in test_table_type()
202 for (i = 0; i < (table_packets->n_miss_packets) / 2; i++) in test_table_type()
203 RING_ENQUEUE(RING_RX, table_packets->miss_packet[i]); in test_table_type()
206 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, in test_table_type()
207 table_packets->n_hit_packets / 2); in test_table_type()
211 if (table_packets->n_hit_packets) { in test_table_type()
212 RING_ENQUEUE(RING_RX, table_packets->hit_packet[0]); in test_table_type()
214 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, 1); in test_table_type()
216 if (table_packets->n_miss_packets) { in test_table_type()
217 RING_ENQUEUE(RING_RX, table_packets->miss_packet[0]); in test_table_type()
219 VERIFY_TRAFFIC(RING_TX, table_packets->n_miss_packets, 0); in test_table_type()
241 if (table_packets->n_hit_packets) { in test_table_type()
242 for (i = 0; i < table_packets->n_hit_packets; i++) in test_table_type()
243 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]); in test_table_type()
246 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, 0); in test_table_type()
247 VERIFY_TRAFFIC(RING_TX_2, table_packets->n_hit_packets, in test_table_type()
248 table_packets->n_hit_packets); in test_table_type()
266 struct table_packets table_packets; in test_table_stub_combined() local
272 table_packets.hit_packet[i] = i; in test_table_stub_combined()
274 table_packets.n_hit_packets = N_PACKETS; in test_table_stub_combined()
275 table_packets.n_miss_packets = 0; in test_table_stub_combined()
278 &table_packets, NULL, 1); in test_table_stub_combined()
304 struct table_packets table_packets; in test_table_lpm_combined() local
311 table_packets.hit_packet[i] = 0xadadadad; in test_table_lpm_combined()
314 table_packets.miss_packet[i] = 0xfefefefe; in test_table_lpm_combined()
316 table_packets.n_hit_packets = N_PACKETS; in test_table_lpm_combined()
317 table_packets.n_miss_packets = N_PACKETS; in test_table_lpm_combined()
320 (void *)&lpm_key, &table_packets, NULL, 0); in test_table_lpm_combined()
327 (void *)&lpm_key, &table_packets, NULL, 0); in test_table_lpm_combined()
334 (void *)&lpm_key, &table_packets, NULL, 0); in test_table_lpm_combined()
340 (void *)&lpm_key, &table_packets, NULL, 0); in test_table_lpm_combined()
365 struct table_packets table_packets; in test_table_lpm_ipv6_combined() local
371 table_packets.hit_packet[i] = 0xadadadad; in test_table_lpm_ipv6_combined()
374 table_packets.miss_packet[i] = 0xadadadab; in test_table_lpm_ipv6_combined()
376 table_packets.n_hit_packets = N_PACKETS; in test_table_lpm_ipv6_combined()
377 table_packets.n_miss_packets = N_PACKETS; in test_table_lpm_ipv6_combined()
381 (void *)&lpm_ipv6_key, &table_packets, NULL, 0); in test_table_lpm_ipv6_combined()
389 (void *)&lpm_ipv6_key, &table_packets, NULL, 0); in test_table_lpm_ipv6_combined()
397 (void *)&lpm_ipv6_key, &table_packets, NULL, 0); in test_table_lpm_ipv6_combined()
403 (void *)&lpm_ipv6_key, &table_packets, NULL, 0); in test_table_lpm_ipv6_combined()
432 struct table_packets table_packets; in test_table_hash8lru() local
438 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash8lru()
441 table_packets.miss_packet[i] = 0xfefefefe; in test_table_hash8lru()
443 table_packets.n_hit_packets = 50; in test_table_hash8lru()
444 table_packets.n_miss_packets = 50; in test_table_hash8lru()
447 (void *)&key8lru_params, (void *)key8lru, &table_packets, in test_table_hash8lru()
455 (void *)&key8lru_params, (void *)key8lru, &table_packets, in test_table_hash8lru()
463 (void *)&key8lru_params, (void *)key8lru, &table_packets, in test_table_hash8lru()
493 struct table_packets table_packets; in test_table_hash16lru() local
499 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash16lru()
502 table_packets.miss_packet[i] = 0xfefefefe; in test_table_hash16lru()
504 table_packets.n_hit_packets = 50; in test_table_hash16lru()
505 table_packets.n_miss_packets = 50; in test_table_hash16lru()
508 (void *)&key16lru_params, (void *)key16lru, &table_packets, in test_table_hash16lru()
516 (void *)&key16lru_params, (void *)key16lru, &table_packets, in test_table_hash16lru()
524 (void *)&key16lru_params, (void *)key16lru, &table_packets, in test_table_hash16lru()
554 struct table_packets table_packets; in test_table_hash32lru() local
560 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash32lru()
563 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash32lru()
565 table_packets.n_hit_packets = 50; in test_table_hash32lru()
566 table_packets.n_miss_packets = 50; in test_table_hash32lru()
569 (void *)&key32lru_params, (void *)key32lru, &table_packets, in test_table_hash32lru()
577 (void *)&key32lru_params, (void *)key32lru, &table_packets, in test_table_hash32lru()
585 (void *)&key32lru_params, (void *)key32lru, &table_packets, in test_table_hash32lru()
615 struct table_packets table_packets; in test_table_hash8ext() local
621 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash8ext()
624 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash8ext()
626 table_packets.n_hit_packets = 50; in test_table_hash8ext()
627 table_packets.n_miss_packets = 50; in test_table_hash8ext()
630 (void *)&key8ext_params, (void *)key8ext, &table_packets, in test_table_hash8ext()
638 (void *)&key8ext_params, (void *)key8ext, &table_packets, in test_table_hash8ext()
646 (void *)&key8ext_params, (void *)key8ext, &table_packets, in test_table_hash8ext()
676 struct table_packets table_packets; in test_table_hash16ext() local
682 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash16ext()
685 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash16ext()
687 table_packets.n_hit_packets = 50; in test_table_hash16ext()
688 table_packets.n_miss_packets = 50; in test_table_hash16ext()
691 (void *)&key16ext_params, (void *)key16ext, &table_packets, in test_table_hash16ext()
699 (void *)&key16ext_params, (void *)key16ext, &table_packets, in test_table_hash16ext()
707 (void *)&key16ext_params, (void *)key16ext, &table_packets, in test_table_hash16ext()
737 struct table_packets table_packets; in test_table_hash32ext() local
743 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash32ext()
746 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash32ext()
748 table_packets.n_hit_packets = 50; in test_table_hash32ext()
749 table_packets.n_miss_packets = 50; in test_table_hash32ext()
752 (void *)&key32ext_params, (void *)key32ext, &table_packets, in test_table_hash32ext()
760 (void *)&key32ext_params, (void *)key32ext, &table_packets, in test_table_hash32ext()
768 (void *)&key32ext_params, (void *)key32ext, &table_packets, in test_table_hash32ext()
798 struct table_packets table_packets; in test_table_hash_cuckoo_combined() local
804 table_packets.hit_packet[i] = 0xadadadad; in test_table_hash_cuckoo_combined()
807 table_packets.miss_packet[i] = 0xbdadadad; in test_table_hash_cuckoo_combined()
809 table_packets.n_hit_packets = 50; in test_table_hash_cuckoo_combined()
810 table_packets.n_miss_packets = 50; in test_table_hash_cuckoo_combined()
813 (void *)&cuckoo_params, (void *)key_cuckoo, &table_packets, in test_table_hash_cuckoo_combined()
821 (void *)&cuckoo_params, (void *)key_cuckoo, &table_packets, in test_table_hash_cuckoo_combined()
829 (void *)&cuckoo_params, (void *)key_cuckoo, &table_packets, in test_table_hash_cuckoo_combined()
837 (void *)&cuckoo_params, (void *)key_cuckoo, &table_packets, in test_table_hash_cuckoo_combined()