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.
35 #include "test_table_combined.h"
36 #include "test_table.h"
37 #include <rte_table_lpm_ipv6.h>
39 #define MAX_TEST_KEYS 128
42 enum check_table_result {
44 CHECK_TABLE_PORT_CONFIG,
45 CHECK_TABLE_PORT_ENABLE,
46 CHECK_TABLE_TABLE_CONFIG,
47 CHECK_TABLE_ENTRY_ADD,
48 CHECK_TABLE_DEFAULT_ENTRY_ADD,
50 CHECK_TABLE_MANAGE_ERROR,
51 CHECK_TABLE_CONSISTENCY,
52 CHECK_TABLE_NO_TRAFFIC,
53 CHECK_TABLE_INVALID_PARAMETER,
56 struct table_packets {
57 uint32_t hit_packet[MAX_TEST_KEYS];
58 uint32_t miss_packet[MAX_TEST_KEYS];
59 uint32_t n_hit_packets;
60 uint32_t n_miss_packets;
63 combined_table_test table_tests_combined[] = {
64 test_table_lpm_combined,
65 test_table_lpm_ipv6_combined,
74 unsigned n_table_tests_combined = RTE_DIM(table_tests_combined);
76 /* Generic port tester function */
78 test_table_type(struct rte_table_ops *table_ops, void *table_args,
79 void *key, struct table_packets *table_packets,
80 struct manage_ops *manage_ops, unsigned n_ops)
82 uint32_t ring_in_id, table_id, ring_out_id, ring_out_2_id;
85 RTE_SET_USED(manage_ops);
88 struct rte_pipeline_params pipeline_params = {
93 struct rte_pipeline *pipeline = rte_pipeline_create(&pipeline_params);
95 /* Create input ring */
96 struct rte_port_ring_reader_params ring_params_rx = {
100 struct rte_port_ring_writer_params ring_params_tx = {
102 .tx_burst_sz = RTE_PORT_IN_BURST_SIZE_MAX,
105 struct rte_pipeline_port_in_params ring_in_params = {
106 .ops = &rte_port_ring_reader_ops,
107 .arg_create = (void *)&ring_params_rx,
109 .burst_size = RTE_PORT_IN_BURST_SIZE_MAX,
112 if (rte_pipeline_port_in_create(pipeline, &ring_in_params,
114 return -CHECK_TABLE_PORT_CONFIG;
117 struct rte_pipeline_table_params table_params = {
119 .arg_create = table_args,
120 .f_action_hit = NULL,
121 .f_action_miss = NULL,
123 .action_data_size = 0,
126 if (rte_pipeline_table_create(pipeline, &table_params, &table_id) != 0)
127 return -CHECK_TABLE_TABLE_CONFIG;
129 /* Create output ports */
130 ring_params_tx.ring = RING_TX;
132 struct rte_pipeline_port_out_params ring_out_params = {
133 .ops = &rte_port_ring_writer_ops,
134 .arg_create = (void *)&ring_params_tx,
138 if (rte_pipeline_port_out_create(pipeline, &ring_out_params,
140 return -CHECK_TABLE_PORT_CONFIG;
142 ring_params_tx.ring = RING_TX_2;
144 if (rte_pipeline_port_out_create(pipeline, &ring_out_params,
145 &ring_out_2_id) != 0)
146 return -CHECK_TABLE_PORT_CONFIG;
148 /* Add entry to the table */
149 struct rte_pipeline_table_entry default_entry = {
150 .action = RTE_PIPELINE_ACTION_DROP,
151 {.table_id = ring_out_id},
154 struct rte_pipeline_table_entry table_entry = {
155 .action = RTE_PIPELINE_ACTION_PORT,
156 {.table_id = ring_out_id},
159 struct rte_pipeline_table_entry *default_entry_ptr, *entry_ptr;
163 if (rte_pipeline_table_default_entry_add(pipeline, table_id,
164 &default_entry, &default_entry_ptr) != 0)
165 return -CHECK_TABLE_DEFAULT_ENTRY_ADD;
167 if (rte_pipeline_table_entry_add(pipeline, table_id,
168 key ? key : &table_entry, &table_entry, &key_found,
170 return -CHECK_TABLE_ENTRY_ADD;
172 /* Create connections and check consistency */
173 if (rte_pipeline_port_in_connect_to_table(pipeline, ring_in_id,
175 return -CHECK_TABLE_CONNECT;
177 if (rte_pipeline_port_in_enable(pipeline, ring_in_id) != 0)
178 return -CHECK_TABLE_PORT_ENABLE;
180 if (rte_pipeline_check(pipeline) != 0)
181 return -CHECK_TABLE_CONSISTENCY;
185 /* Flow test - All hits */
186 if (table_packets->n_hit_packets) {
187 for (i = 0; i < table_packets->n_hit_packets; i++)
188 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]);
190 RUN_PIPELINE(pipeline);
192 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets,
193 table_packets->n_hit_packets);
196 /* Flow test - All misses */
197 if (table_packets->n_miss_packets) {
198 for (i = 0; i < table_packets->n_miss_packets; i++)
199 RING_ENQUEUE(RING_RX, table_packets->miss_packet[i]);
201 RUN_PIPELINE(pipeline);
203 VERIFY_TRAFFIC(RING_TX, table_packets->n_miss_packets, 0);
206 /* Flow test - Half hits, half misses */
207 if (table_packets->n_hit_packets && table_packets->n_miss_packets) {
208 for (i = 0; i < (table_packets->n_hit_packets) / 2; i++)
209 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]);
211 for (i = 0; i < (table_packets->n_miss_packets) / 2; i++)
212 RING_ENQUEUE(RING_RX, table_packets->miss_packet[i]);
214 RUN_PIPELINE(pipeline);
215 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets,
216 table_packets->n_hit_packets / 2);
219 /* Flow test - Single packet */
220 if (table_packets->n_hit_packets) {
221 RING_ENQUEUE(RING_RX, table_packets->hit_packet[0]);
222 RUN_PIPELINE(pipeline);
223 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, 1);
225 if (table_packets->n_miss_packets) {
226 RING_ENQUEUE(RING_RX, table_packets->miss_packet[0]);
227 RUN_PIPELINE(pipeline);
228 VERIFY_TRAFFIC(RING_TX, table_packets->n_miss_packets, 0);
232 /* Change table entry action */
233 printf("Change entry action\n");
234 table_entry.table_id = ring_out_2_id;
236 if (rte_pipeline_table_default_entry_add(pipeline, table_id,
237 &default_entry, &default_entry_ptr) != 0)
238 return -CHECK_TABLE_ENTRY_ADD;
240 if (rte_pipeline_table_entry_add(pipeline, table_id,
241 key ? key : &table_entry, &table_entry, &key_found,
243 return -CHECK_TABLE_ENTRY_ADD;
245 /* Check that traffic destination has changed */
246 if (table_packets->n_hit_packets) {
247 for (i = 0; i < table_packets->n_hit_packets; i++)
248 RING_ENQUEUE(RING_RX, table_packets->hit_packet[i]);
250 RUN_PIPELINE(pipeline);
251 VERIFY_TRAFFIC(RING_TX, table_packets->n_hit_packets, 0);
252 VERIFY_TRAFFIC(RING_TX_2, table_packets->n_hit_packets,
253 table_packets->n_hit_packets);
256 printf("delete entry\n");
257 /* Delete table entry */
258 rte_pipeline_table_entry_delete(pipeline, table_id,
259 key ? key : &table_entry, &key_found, NULL);
261 rte_pipeline_free(pipeline);
268 test_table_stub_combined(void)
271 struct table_packets table_packets;
273 printf("--------------\n");
274 printf("RUNNING TEST - %s\n", __func__);
275 printf("--------------\n");
276 for (i = 0; i < N_PACKETS; i++)
277 table_packets.hit_packet[i] = i;
279 table_packets.n_hit_packets = N_PACKETS;
280 table_packets.n_miss_packets = 0;
282 status = test_table_type(&rte_table_stub_ops, NULL, NULL,
283 &table_packets, NULL, 1);
284 VERIFY(status, CHECK_TABLE_OK);
290 test_table_lpm_combined(void)
295 struct rte_table_lpm_params lpm_params = {
298 .entry_unique_size = 8,
299 .offset = APP_METADATA_OFFSET(0),
302 struct rte_table_lpm_key lpm_key = {
307 struct table_packets table_packets;
309 printf("--------------\n");
310 printf("RUNNING TEST - %s\n", __func__);
311 printf("--------------\n");
313 for (i = 0; i < N_PACKETS; i++)
314 table_packets.hit_packet[i] = 0xadadadad;
316 for (i = 0; i < N_PACKETS; i++)
317 table_packets.miss_packet[i] = 0xfefefefe;
319 table_packets.n_hit_packets = N_PACKETS;
320 table_packets.n_miss_packets = N_PACKETS;
322 status = test_table_type(&rte_table_lpm_ops, (void *)&lpm_params,
323 (void *)&lpm_key, &table_packets, NULL, 0);
324 VERIFY(status, CHECK_TABLE_OK);
326 /* Invalid parameters */
327 lpm_params.n_rules = 0;
329 status = test_table_type(&rte_table_lpm_ops, (void *)&lpm_params,
330 (void *)&lpm_key, &table_packets, NULL, 0);
331 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
333 lpm_params.n_rules = 1 << 24;
336 status = test_table_type(&rte_table_lpm_ops, (void *)&lpm_params,
337 (void *)&lpm_key, &table_packets, NULL, 0);
338 VERIFY(status, CHECK_TABLE_ENTRY_ADD);
342 status = test_table_type(&rte_table_lpm_ops, (void *)&lpm_params,
343 (void *)&lpm_key, &table_packets, NULL, 0);
344 VERIFY(status, CHECK_TABLE_ENTRY_ADD);
350 test_table_lpm_ipv6_combined(void)
355 struct rte_table_lpm_ipv6_params lpm_ipv6_params = {
358 .number_tbl8s = 1 << 13,
359 .entry_unique_size = 8,
360 .offset = APP_METADATA_OFFSET(32),
363 struct rte_table_lpm_ipv6_key lpm_ipv6_key = {
366 memset(lpm_ipv6_key.ip, 0xad, 16);
368 struct table_packets table_packets;
370 printf("--------------\n");
371 printf("RUNNING TEST - %s\n", __func__);
372 printf("--------------\n");
373 for (i = 0; i < N_PACKETS; i++)
374 table_packets.hit_packet[i] = 0xadadadad;
376 for (i = 0; i < N_PACKETS; i++)
377 table_packets.miss_packet[i] = 0xadadadab;
379 table_packets.n_hit_packets = N_PACKETS;
380 table_packets.n_miss_packets = N_PACKETS;
382 status = test_table_type(&rte_table_lpm_ipv6_ops,
383 (void *)&lpm_ipv6_params,
384 (void *)&lpm_ipv6_key, &table_packets, NULL, 0);
385 VERIFY(status, CHECK_TABLE_OK);
387 /* Invalid parameters */
388 lpm_ipv6_params.n_rules = 0;
390 status = test_table_type(&rte_table_lpm_ipv6_ops,
391 (void *)&lpm_ipv6_params,
392 (void *)&lpm_ipv6_key, &table_packets, NULL, 0);
393 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
395 lpm_ipv6_params.n_rules = 1 << 24;
396 lpm_ipv6_key.depth = 0;
398 status = test_table_type(&rte_table_lpm_ipv6_ops,
399 (void *)&lpm_ipv6_params,
400 (void *)&lpm_ipv6_key, &table_packets, NULL, 0);
401 VERIFY(status, CHECK_TABLE_ENTRY_ADD);
403 lpm_ipv6_key.depth = 129;
404 status = test_table_type(&rte_table_lpm_ipv6_ops,
405 (void *)&lpm_ipv6_params,
406 (void *)&lpm_ipv6_key, &table_packets, NULL, 0);
407 VERIFY(status, CHECK_TABLE_ENTRY_ADD);
413 test_table_hash8lru(void)
418 struct rte_table_hash_key8_lru_params key8lru_params = {
420 .f_hash = pipeline_test_hash,
421 .signature_offset = APP_METADATA_OFFSET(0),
422 .key_offset = APP_METADATA_OFFSET(32),
427 uint32_t *k8lru = (uint32_t *) key8lru;
429 memset(key8lru, 0, sizeof(key8lru));
430 k8lru[0] = 0xadadadad;
432 struct table_packets table_packets;
434 printf("--------------\n");
435 printf("RUNNING TEST - %s\n", __func__);
436 printf("--------------\n");
437 for (i = 0; i < 50; i++)
438 table_packets.hit_packet[i] = 0xadadadad;
440 for (i = 0; i < 50; i++)
441 table_packets.miss_packet[i] = 0xfefefefe;
443 table_packets.n_hit_packets = 50;
444 table_packets.n_miss_packets = 50;
446 status = test_table_type(&rte_table_hash_key8_lru_ops,
447 (void *)&key8lru_params, (void *)key8lru, &table_packets,
449 VERIFY(status, CHECK_TABLE_OK);
451 /* Invalid parameters */
452 key8lru_params.n_entries = 0;
454 status = test_table_type(&rte_table_hash_key8_lru_ops,
455 (void *)&key8lru_params, (void *)key8lru, &table_packets,
457 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
459 key8lru_params.n_entries = 1<<16;
460 key8lru_params.f_hash = NULL;
462 status = test_table_type(&rte_table_hash_key8_lru_ops,
463 (void *)&key8lru_params, (void *)key8lru, &table_packets,
465 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
471 test_table_hash16lru(void)
476 struct rte_table_hash_key16_lru_params key16lru_params = {
478 .f_hash = pipeline_test_hash,
480 .signature_offset = APP_METADATA_OFFSET(0),
481 .key_offset = APP_METADATA_OFFSET(32),
485 uint8_t key16lru[16];
486 uint32_t *k16lru = (uint32_t *) key16lru;
488 memset(key16lru, 0, sizeof(key16lru));
489 k16lru[0] = 0xadadadad;
491 struct table_packets table_packets;
493 printf("--------------\n");
494 printf("RUNNING TEST - %s\n", __func__);
495 printf("--------------\n");
496 for (i = 0; i < 50; i++)
497 table_packets.hit_packet[i] = 0xadadadad;
499 for (i = 0; i < 50; i++)
500 table_packets.miss_packet[i] = 0xfefefefe;
502 table_packets.n_hit_packets = 50;
503 table_packets.n_miss_packets = 50;
505 status = test_table_type(&rte_table_hash_key16_lru_ops,
506 (void *)&key16lru_params, (void *)key16lru, &table_packets,
508 VERIFY(status, CHECK_TABLE_OK);
510 /* Invalid parameters */
511 key16lru_params.n_entries = 0;
513 status = test_table_type(&rte_table_hash_key16_lru_ops,
514 (void *)&key16lru_params, (void *)key16lru, &table_packets,
516 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
518 key16lru_params.n_entries = 1<<16;
519 key16lru_params.f_hash = NULL;
521 status = test_table_type(&rte_table_hash_key16_lru_ops,
522 (void *)&key16lru_params, (void *)key16lru, &table_packets,
524 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
530 test_table_hash32lru(void)
535 struct rte_table_hash_key32_lru_params key32lru_params = {
537 .f_hash = pipeline_test_hash,
539 .signature_offset = APP_METADATA_OFFSET(0),
540 .key_offset = APP_METADATA_OFFSET(32),
543 uint8_t key32lru[32];
544 uint32_t *k32lru = (uint32_t *) key32lru;
546 memset(key32lru, 0, sizeof(key32lru));
547 k32lru[0] = 0xadadadad;
549 struct table_packets table_packets;
551 printf("--------------\n");
552 printf("RUNNING TEST - %s\n", __func__);
553 printf("--------------\n");
554 for (i = 0; i < 50; i++)
555 table_packets.hit_packet[i] = 0xadadadad;
557 for (i = 0; i < 50; i++)
558 table_packets.miss_packet[i] = 0xbdadadad;
560 table_packets.n_hit_packets = 50;
561 table_packets.n_miss_packets = 50;
563 status = test_table_type(&rte_table_hash_key32_lru_ops,
564 (void *)&key32lru_params, (void *)key32lru, &table_packets,
566 VERIFY(status, CHECK_TABLE_OK);
568 /* Invalid parameters */
569 key32lru_params.n_entries = 0;
571 status = test_table_type(&rte_table_hash_key32_lru_ops,
572 (void *)&key32lru_params, (void *)key32lru, &table_packets,
574 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
576 key32lru_params.n_entries = 1<<16;
577 key32lru_params.f_hash = NULL;
579 status = test_table_type(&rte_table_hash_key32_lru_ops,
580 (void *)&key32lru_params, (void *)key32lru, &table_packets,
582 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
588 test_table_hash8ext(void)
593 struct rte_table_hash_key8_ext_params key8ext_params = {
595 .n_entries_ext = 1<<15,
596 .f_hash = pipeline_test_hash,
598 .signature_offset = APP_METADATA_OFFSET(0),
599 .key_offset = APP_METADATA_OFFSET(32),
604 uint32_t *k8ext = (uint32_t *) key8ext;
606 memset(key8ext, 0, sizeof(key8ext));
607 k8ext[0] = 0xadadadad;
609 struct table_packets table_packets;
611 printf("--------------\n");
612 printf("RUNNING TEST - %s\n", __func__);
613 printf("--------------\n");
614 for (i = 0; i < 50; i++)
615 table_packets.hit_packet[i] = 0xadadadad;
617 for (i = 0; i < 50; i++)
618 table_packets.miss_packet[i] = 0xbdadadad;
620 table_packets.n_hit_packets = 50;
621 table_packets.n_miss_packets = 50;
623 status = test_table_type(&rte_table_hash_key8_ext_ops,
624 (void *)&key8ext_params, (void *)key8ext, &table_packets,
626 VERIFY(status, CHECK_TABLE_OK);
628 /* Invalid parameters */
629 key8ext_params.n_entries = 0;
631 status = test_table_type(&rte_table_hash_key8_ext_ops,
632 (void *)&key8ext_params, (void *)key8ext, &table_packets,
634 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
636 key8ext_params.n_entries = 1<<16;
637 key8ext_params.f_hash = NULL;
639 status = test_table_type(&rte_table_hash_key8_ext_ops,
640 (void *)&key8ext_params, (void *)key8ext, &table_packets,
642 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
644 key8ext_params.f_hash = pipeline_test_hash;
645 key8ext_params.n_entries_ext = 0;
647 status = test_table_type(&rte_table_hash_key8_ext_ops,
648 (void *)&key8ext_params, (void *)key8ext, &table_packets, NULL, 0);
649 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
655 test_table_hash16ext(void)
660 struct rte_table_hash_key16_ext_params key16ext_params = {
662 .n_entries_ext = 1<<15,
663 .f_hash = pipeline_test_hash,
665 .signature_offset = APP_METADATA_OFFSET(0),
666 .key_offset = APP_METADATA_OFFSET(32),
670 uint8_t key16ext[16];
671 uint32_t *k16ext = (uint32_t *) key16ext;
673 memset(key16ext, 0, sizeof(key16ext));
674 k16ext[0] = 0xadadadad;
676 struct table_packets table_packets;
678 printf("--------------\n");
679 printf("RUNNING TEST - %s\n", __func__);
680 printf("--------------\n");
681 for (i = 0; i < 50; i++)
682 table_packets.hit_packet[i] = 0xadadadad;
684 for (i = 0; i < 50; i++)
685 table_packets.miss_packet[i] = 0xbdadadad;
687 table_packets.n_hit_packets = 50;
688 table_packets.n_miss_packets = 50;
690 status = test_table_type(&rte_table_hash_key16_ext_ops,
691 (void *)&key16ext_params, (void *)key16ext, &table_packets,
693 VERIFY(status, CHECK_TABLE_OK);
695 /* Invalid parameters */
696 key16ext_params.n_entries = 0;
698 status = test_table_type(&rte_table_hash_key16_ext_ops,
699 (void *)&key16ext_params, (void *)key16ext, &table_packets,
701 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
703 key16ext_params.n_entries = 1<<16;
704 key16ext_params.f_hash = NULL;
706 status = test_table_type(&rte_table_hash_key16_ext_ops,
707 (void *)&key16ext_params, (void *)key16ext, &table_packets,
709 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
711 key16ext_params.f_hash = pipeline_test_hash;
712 key16ext_params.n_entries_ext = 0;
714 status = test_table_type(&rte_table_hash_key16_ext_ops,
715 (void *)&key16ext_params, (void *)key16ext, &table_packets, NULL, 0);
716 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
722 test_table_hash32ext(void)
727 struct rte_table_hash_key32_ext_params key32ext_params = {
729 .n_entries_ext = 1<<15,
730 .f_hash = pipeline_test_hash,
732 .signature_offset = APP_METADATA_OFFSET(0),
733 .key_offset = APP_METADATA_OFFSET(32),
736 uint8_t key32ext[32];
737 uint32_t *k32ext = (uint32_t *) key32ext;
739 memset(key32ext, 0, sizeof(key32ext));
740 k32ext[0] = 0xadadadad;
742 struct table_packets table_packets;
744 printf("--------------\n");
745 printf("RUNNING TEST - %s\n", __func__);
746 printf("--------------\n");
747 for (i = 0; i < 50; i++)
748 table_packets.hit_packet[i] = 0xadadadad;
750 for (i = 0; i < 50; i++)
751 table_packets.miss_packet[i] = 0xbdadadad;
753 table_packets.n_hit_packets = 50;
754 table_packets.n_miss_packets = 50;
756 status = test_table_type(&rte_table_hash_key32_ext_ops,
757 (void *)&key32ext_params, (void *)key32ext, &table_packets,
759 VERIFY(status, CHECK_TABLE_OK);
761 /* Invalid parameters */
762 key32ext_params.n_entries = 0;
764 status = test_table_type(&rte_table_hash_key32_ext_ops,
765 (void *)&key32ext_params, (void *)key32ext, &table_packets,
767 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
769 key32ext_params.n_entries = 1<<16;
770 key32ext_params.f_hash = NULL;
772 status = test_table_type(&rte_table_hash_key32_ext_ops,
773 (void *)&key32ext_params, (void *)key32ext, &table_packets,
775 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);
777 key32ext_params.f_hash = pipeline_test_hash;
778 key32ext_params.n_entries_ext = 0;
780 status = test_table_type(&rte_table_hash_key32_ext_ops,
781 (void *)&key32ext_params, (void *)key32ext, &table_packets,
783 VERIFY(status, CHECK_TABLE_TABLE_CONFIG);