New upstream version 17.11-rc3
[deb_dpdk.git] / test / test / test_link_bonding_rssconf.c
1 /*-
2  *   BSD LICENSE
3  *
4  *   Copyright(c) 2015 Intel Corporation. All rights reserved.
5  *   All rights reserved.
6  *
7  *   Redistribution and use in source and binary forms, with or without
8  *   modification, are permitted provided that the following conditions
9  *   are met:
10  *
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
16  *       distribution.
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.
20  *
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.
32  */
33
34 #include <string.h>
35 #include <stdarg.h>
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <stdint.h>
39 #include <inttypes.h>
40 #include <errno.h>
41 #include <rte_cycles.h>
42 #include <sys/queue.h>
43
44 #include <rte_byteorder.h>
45 #include <rte_common.h>
46 #include <rte_debug.h>
47 #include <rte_ethdev.h>
48 #include <rte_log.h>
49 #include <rte_lcore.h>
50 #include <rte_memory.h>
51 #include <rte_bus_vdev.h>
52
53 #include <rte_string_fns.h>
54 #include <rte_errno.h>
55 #include <rte_eth_bond.h>
56
57 #include "test.h"
58
59 #define SLAVE_COUNT (4)
60
61 #define RXTX_RING_SIZE                  1024
62 #define RXTX_QUEUE_COUNT                4
63
64 #define BONDED_DEV_NAME         ("net_bonding_rss")
65
66 #define SLAVE_DEV_NAME_FMT      ("net_null%d")
67 #define SLAVE_RXTX_QUEUE_FMT      ("rssconf_slave%d_q%d")
68
69 #define NUM_MBUFS 8191
70 #define MBUF_SIZE (1600 + RTE_PKTMBUF_HEADROOM)
71 #define MBUF_CACHE_SIZE 250
72 #define BURST_SIZE 32
73
74 #define INVALID_SOCKET_ID       (-1)
75 #define INVALID_PORT_ID         (0xFF)
76 #define INVALID_BONDING_MODE    (-1)
77
78 struct slave_conf {
79         uint16_t port_id;
80         struct rte_eth_dev_info dev_info;
81
82         struct rte_eth_rss_conf rss_conf;
83         uint8_t rss_key[40];
84         struct rte_eth_rss_reta_entry64 reta_conf[512 / RTE_RETA_GROUP_SIZE];
85
86         uint8_t is_slave;
87         struct rte_ring *rxtx_queue[RXTX_QUEUE_COUNT];
88 };
89
90 struct link_bonding_rssconf_unittest_params {
91         uint8_t bond_port_id;
92         struct rte_eth_dev_info bond_dev_info;
93         struct rte_eth_rss_reta_entry64 bond_reta_conf[512 / RTE_RETA_GROUP_SIZE];
94         struct slave_conf slave_ports[SLAVE_COUNT];
95
96         struct rte_mempool *mbuf_pool;
97 };
98
99 static struct link_bonding_rssconf_unittest_params test_params  = {
100         .bond_port_id = INVALID_PORT_ID,
101         .slave_ports = {
102                 [0 ... SLAVE_COUNT - 1] = { .port_id = INVALID_PORT_ID, .is_slave = 0}
103         },
104         .mbuf_pool = NULL,
105 };
106
107 /**
108  * Default port configuration with RSS turned off
109  */
110 static struct rte_eth_conf default_pmd_conf = {
111         .rxmode = {
112                 .mq_mode = ETH_MQ_RX_NONE,
113                 .max_rx_pkt_len = ETHER_MAX_LEN,
114                 .split_hdr_size = 0,
115                 .header_split   = 0, /**< Header Split disabled */
116                 .hw_ip_checksum = 0, /**< IP checksum offload enabled */
117                 .hw_vlan_filter = 0, /**< VLAN filtering disabled */
118                 .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
119                 .hw_strip_crc   = 1, /**< CRC stripped by hardware */
120         },
121         .txmode = {
122                 .mq_mode = ETH_MQ_TX_NONE,
123         },
124         .lpbk_mode = 0,
125 };
126
127 static struct rte_eth_conf rss_pmd_conf = {
128         .rxmode = {
129                 .mq_mode = ETH_MQ_RX_RSS,
130                 .max_rx_pkt_len = ETHER_MAX_LEN,
131                 .split_hdr_size = 0,
132                 .header_split   = 0, /**< Header Split disabled */
133                 .hw_ip_checksum = 0, /**< IP checksum offload enabled */
134                 .hw_vlan_filter = 0, /**< VLAN filtering disabled */
135                 .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
136                 .hw_strip_crc   = 1, /**< CRC stripped by hardware */
137         },
138         .txmode = {
139                 .mq_mode = ETH_MQ_TX_NONE,
140         },
141         .rx_adv_conf = {
142                 .rss_conf = {
143                         .rss_key = NULL,
144                         .rss_hf = ETH_RSS_IPV6,
145                 },
146         },
147         .lpbk_mode = 0,
148 };
149
150 #define FOR_EACH(_i, _item, _array, _size) \
151         for (_i = 0, _item = &_array[0]; _i < _size && (_item = &_array[_i]); _i++)
152
153 /* Macro for iterating over every port that can be used as a slave
154  * in this test.
155  * _i variable used as an index in test_params->slave_ports
156  * _slave pointer to &test_params->slave_ports[_idx]
157  */
158 #define FOR_EACH_PORT(_i, _port) \
159         FOR_EACH(_i, _port, test_params.slave_ports, \
160                 RTE_DIM(test_params.slave_ports))
161
162 static int
163 configure_ethdev(uint16_t port_id, struct rte_eth_conf *eth_conf,
164                  uint8_t start)
165 {
166         int rxq, txq;
167
168         TEST_ASSERT(rte_eth_dev_configure(port_id, RXTX_QUEUE_COUNT,
169                         RXTX_QUEUE_COUNT, eth_conf) == 0, "Failed to configure device %u",
170                         port_id);
171
172         for (rxq = 0; rxq < RXTX_QUEUE_COUNT; rxq++) {
173                 TEST_ASSERT(rte_eth_rx_queue_setup(port_id, rxq, RXTX_RING_SIZE,
174                                 rte_eth_dev_socket_id(port_id), NULL,
175                                 test_params.mbuf_pool) == 0, "Failed to setup rx queue.");
176         }
177
178         for (txq = 0; txq < RXTX_QUEUE_COUNT; txq++) {
179                 TEST_ASSERT(rte_eth_tx_queue_setup(port_id, txq, RXTX_RING_SIZE,
180                                 rte_eth_dev_socket_id(port_id), NULL) == 0,
181                                 "Failed to setup tx queue.");
182         }
183
184         if (start) {
185                 TEST_ASSERT(rte_eth_dev_start(port_id) == 0,
186                 "Failed to start device (%d).", port_id);
187         }
188
189         return 0;
190 }
191
192 /**
193  * Remove all slaves from bonding
194  */
195 static int
196 remove_slaves(void)
197 {
198         unsigned n;
199         struct slave_conf *port;
200
201         FOR_EACH_PORT(n, port) {
202                 port = &test_params.slave_ports[n];
203                 if (port->is_slave) {
204                         TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(
205                                         test_params.bond_port_id, port->port_id),
206                                         "Cannot remove slave %d from bonding", port->port_id);
207                         port->is_slave = 0;
208                 }
209         }
210
211         return 0;
212 }
213
214 static int
215 remove_slaves_and_stop_bonded_device(void)
216 {
217         TEST_ASSERT_SUCCESS(remove_slaves(), "Removing slaves");
218         rte_eth_dev_stop(test_params.bond_port_id);
219         return TEST_SUCCESS;
220 }
221
222 /**
223  * Add all slaves to bonding
224  */
225 static int
226 bond_slaves(void)
227 {
228         unsigned n;
229         struct slave_conf *port;
230
231         FOR_EACH_PORT(n, port) {
232                 port = &test_params.slave_ports[n];
233                 if (!port->is_slave) {
234                         TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params.bond_port_id,
235                                         port->port_id), "Cannot attach slave %d to the bonding",
236                                         port->port_id);
237                         port->is_slave = 1;
238                 }
239         }
240
241         return 0;
242 }
243
244 /**
245  * Set all RETA values in port_id to value
246  */
247 static int
248 reta_set(uint16_t port_id, uint8_t value, int reta_size)
249 {
250         struct rte_eth_rss_reta_entry64 reta_conf[512/RTE_RETA_GROUP_SIZE];
251         int i, j;
252
253         for (i = 0; i < reta_size / RTE_RETA_GROUP_SIZE; i++) {
254                 /* select all fields to set */
255                 reta_conf[i].mask = ~0LL;
256                 for (j = 0; j < RTE_RETA_GROUP_SIZE; j++)
257                         reta_conf[i].reta[j] = value;
258         }
259
260         return rte_eth_dev_rss_reta_update(port_id, reta_conf, reta_size);
261 }
262
263 /**
264  * Check if slaves RETA is synchronized with bonding port. Returns 1 if slave
265  * port is synced with bonding port.
266  */
267 static int
268 reta_check_synced(struct slave_conf *port)
269 {
270         unsigned i;
271
272         for (i = 0; i < test_params.bond_dev_info.reta_size;
273                         i++) {
274
275                 int index = i / RTE_RETA_GROUP_SIZE;
276                 int shift = i % RTE_RETA_GROUP_SIZE;
277
278                 if (port->reta_conf[index].reta[shift] !=
279                                 test_params.bond_reta_conf[index].reta[shift])
280                         return 0;
281
282         }
283
284         return 1;
285 }
286
287 /**
288  * Fetch bonding ports RETA
289  */
290 static int
291 bond_reta_fetch(void) {
292         unsigned j;
293
294         for (j = 0; j < test_params.bond_dev_info.reta_size / RTE_RETA_GROUP_SIZE;
295                         j++)
296                 test_params.bond_reta_conf[j].mask = ~0LL;
297
298         TEST_ASSERT_SUCCESS(rte_eth_dev_rss_reta_query(test_params.bond_port_id,
299                         test_params.bond_reta_conf, test_params.bond_dev_info.reta_size),
300                         "Cannot take bonding ports RSS configuration");
301         return 0;
302 }
303
304 /**
305  * Fetch slaves RETA
306  */
307 static int
308 slave_reta_fetch(struct slave_conf *port) {
309         unsigned j;
310
311         for (j = 0; j < port->dev_info.reta_size / RTE_RETA_GROUP_SIZE; j++)
312                 port->reta_conf[j].mask = ~0LL;
313
314         TEST_ASSERT_SUCCESS(rte_eth_dev_rss_reta_query(port->port_id,
315                         port->reta_conf, port->dev_info.reta_size),
316                         "Cannot take bonding ports RSS configuration");
317         return 0;
318 }
319
320 /**
321  * Remove and add slave to check if slaves configuration is synced with
322  * the bonding ports values after adding new slave.
323  */
324 static int
325 slave_remove_and_add(void)
326 {
327         struct slave_conf *port = &(test_params.slave_ports[0]);
328
329         /* 1. Remove first slave from bonding */
330         TEST_ASSERT_SUCCESS(rte_eth_bond_slave_remove(test_params.bond_port_id,
331                         port->port_id), "Cannot remove slave #d from bonding");
332
333         /* 2. Change removed (ex-)slave and bonding configuration to different
334          *    values
335          */
336         reta_set(test_params.bond_port_id, 1, test_params.bond_dev_info.reta_size);
337         bond_reta_fetch();
338
339         reta_set(port->port_id, 2, port->dev_info.reta_size);
340         slave_reta_fetch(port);
341
342         TEST_ASSERT(reta_check_synced(port) == 0,
343                         "Removed slave didn't should be synchronized with bonding port");
344
345         /* 3. Add (ex-)slave and check if configuration changed*/
346         TEST_ASSERT_SUCCESS(rte_eth_bond_slave_add(test_params.bond_port_id,
347                         port->port_id), "Cannot add slave");
348
349         bond_reta_fetch();
350         slave_reta_fetch(port);
351
352         return reta_check_synced(port);
353 }
354
355 /**
356  * Test configuration propagation over slaves.
357  */
358 static int
359 test_propagate(void)
360 {
361         unsigned i;
362         uint8_t n;
363         struct slave_conf *port;
364         uint8_t bond_rss_key[40];
365         struct rte_eth_rss_conf bond_rss_conf;
366
367         int retval = 0;
368         uint64_t rss_hf = 0;
369         uint64_t default_rss_hf = 0;
370
371         rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info);
372
373         /*
374          *  Test hash function propagation
375          */
376         for (i = 0; i < sizeof(test_params.bond_dev_info.flow_type_rss_offloads)*8;
377                         i++) {
378
379                 rss_hf = test_params.bond_dev_info.flow_type_rss_offloads & (1<<i);
380                 if (rss_hf) {
381                         bond_rss_conf.rss_key = NULL;
382                         bond_rss_conf.rss_hf = rss_hf;
383
384                         retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id,
385                                         &bond_rss_conf);
386                         TEST_ASSERT_SUCCESS(retval, "Cannot set slaves hash function");
387
388                         FOR_EACH_PORT(n, port) {
389                                 port = &test_params.slave_ports[n];
390
391                                 retval = rte_eth_dev_rss_hash_conf_get(port->port_id,
392                                                 &port->rss_conf);
393                                 TEST_ASSERT_SUCCESS(retval,
394                                                 "Cannot take slaves RSS configuration");
395
396                                 TEST_ASSERT(port->rss_conf.rss_hf == rss_hf,
397                                                 "Hash function not propagated for slave %d",
398                                                 port->port_id);
399                         }
400
401                         default_rss_hf = rss_hf;
402                 }
403
404         }
405
406         /*
407          *  Test key propagation
408          */
409         for (i = 1; i < 10; i++) {
410
411                 /* Set all keys to zero */
412                 FOR_EACH_PORT(n, port) {
413                         port = &test_params.slave_ports[n];
414                         memset(port->rss_conf.rss_key, 0, 40);
415                         retval = rte_eth_dev_rss_hash_update(port->port_id,
416                                         &port->rss_conf);
417                         TEST_ASSERT_SUCCESS(retval, "Cannot set slaves RSS keys");
418                 }
419
420                 memset(bond_rss_key, i, sizeof(bond_rss_key));
421                 bond_rss_conf.rss_hf = default_rss_hf,
422                 bond_rss_conf.rss_key = bond_rss_key;
423                 bond_rss_conf.rss_key_len = 40;
424
425                 retval = rte_eth_dev_rss_hash_update(test_params.bond_port_id,
426                                 &bond_rss_conf);
427                 TEST_ASSERT_SUCCESS(retval, "Cannot set bonded port RSS keys");
428
429                 FOR_EACH_PORT(n, port) {
430                         port = &test_params.slave_ports[n];
431
432                         retval = rte_eth_dev_rss_hash_conf_get(port->port_id,
433                                         &(port->rss_conf));
434
435                         TEST_ASSERT_SUCCESS(retval,
436                                         "Cannot take slaves RSS configuration");
437
438                         /* compare keys */
439                         retval = memcmp(port->rss_conf.rss_key, bond_rss_key,
440                                         sizeof(bond_rss_key));
441                         TEST_ASSERT(retval == 0, "Key value not propagated for slave %d",
442                                         port->port_id);
443                 }
444         }
445
446         /*
447          *  Test RETA propagation
448          */
449         for (i = 0; i < RXTX_QUEUE_COUNT; i++) {
450
451                 /* Set all keys to zero */
452                 FOR_EACH_PORT(n, port) {
453                         port = &test_params.slave_ports[n];
454                         retval = reta_set(port->port_id, (i + 1) % RXTX_QUEUE_COUNT,
455                                         port->dev_info.reta_size);
456                         TEST_ASSERT_SUCCESS(retval, "Cannot set slaves RETA");
457                 }
458
459                 TEST_ASSERT_SUCCESS(reta_set(test_params.bond_port_id,
460                                 i % RXTX_QUEUE_COUNT, test_params.bond_dev_info.reta_size),
461                                 "Cannot set bonded port RETA");
462
463                 bond_reta_fetch();
464
465                 FOR_EACH_PORT(n, port) {
466                         port = &test_params.slave_ports[n];
467
468                         slave_reta_fetch(port);
469                         TEST_ASSERT(reta_check_synced(port) == 1, "RETAs inconsistent");
470                 }
471         }
472
473         return TEST_SUCCESS;
474 }
475
476 /**
477  * Test propagation logic, when RX_RSS mq_mode is turned on for bonding port
478  */
479 static int
480 test_rss(void)
481 {
482         /**
483          * Configure bonding port in RSS mq mode
484          */
485         TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id,
486                         &rss_pmd_conf, 0), "Failed to configure bonding device\n");
487
488         rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info);
489
490         TEST_ASSERT_SUCCESS(bond_slaves(), "Bonding slaves failed");
491
492         TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params.bond_port_id),
493                         "Failed to start bonding port (%d).", test_params.bond_port_id);
494
495         TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed");
496
497         TEST_ASSERT(slave_remove_and_add() == 1, "New slave should be synced");
498
499         remove_slaves_and_stop_bonded_device();
500
501         return TEST_SUCCESS;
502 }
503
504 /**
505  * Test propagation logic, when RX_RSS mq_mode is turned off for bonding port
506  */
507 static int
508 test_rss_lazy(void)
509 {
510         TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id,
511                         &default_pmd_conf, 0), "Failed to configure bonding device\n");
512
513         rte_eth_dev_info_get(test_params.bond_port_id, &test_params.bond_dev_info);
514
515         TEST_ASSERT_SUCCESS(bond_slaves(), "Bonding slaves failed");
516
517         TEST_ASSERT_SUCCESS(rte_eth_dev_start(test_params.bond_port_id),
518                         "Failed to start bonding port (%d).", test_params.bond_port_id);
519
520         TEST_ASSERT_SUCCESS(test_propagate(), "Propagation test failed");
521
522         TEST_ASSERT(slave_remove_and_add() == 0, "New slave shouldn't be synced");
523
524         remove_slaves_and_stop_bonded_device();
525
526         return TEST_SUCCESS;
527 }
528
529 static int
530 test_setup(void)
531 {
532         unsigned n;
533         int retval;
534         int port_id;
535         char name[256];
536         struct slave_conf *port;
537
538         if (test_params.mbuf_pool == NULL) {
539
540                 test_params.mbuf_pool = rte_pktmbuf_pool_create(
541                         "RSS_MBUF_POOL", NUM_MBUFS * SLAVE_COUNT,
542                         MBUF_CACHE_SIZE, 0, MBUF_SIZE, rte_socket_id());
543
544                 TEST_ASSERT(test_params.mbuf_pool != NULL,
545                                 "rte_pktmbuf_pool_create failed\n");
546         }
547
548         /* Create / initialize ring eth devs. */
549         FOR_EACH_PORT(n, port) {
550                 port = &test_params.slave_ports[n];
551
552                 port_id = rte_eth_dev_count();
553                 snprintf(name, sizeof(name), SLAVE_DEV_NAME_FMT, port_id);
554
555                 retval = rte_vdev_init(name, "size=64,copy=0");
556                 TEST_ASSERT_SUCCESS(retval, "Failed to create null device '%s'\n",
557                                 name);
558
559                 port->port_id = port_id;
560
561                 port->rss_conf.rss_key = port->rss_key;
562                 port->rss_conf.rss_key_len = 40;
563
564                 retval = configure_ethdev(port->port_id, &default_pmd_conf, 0);
565                 TEST_ASSERT_SUCCESS(retval, "Failed to configure virtual ethdev %s\n",
566                                 name);
567
568                 rte_eth_dev_info_get(port->port_id, &port->dev_info);
569         }
570
571         if (test_params.bond_port_id == INVALID_PORT_ID) {
572                 retval = rte_eth_bond_create(BONDED_DEV_NAME, 0, rte_socket_id());
573
574                 TEST_ASSERT(retval >= 0, "Failed to create bonded ethdev %s",
575                                 BONDED_DEV_NAME);
576
577                 test_params.bond_port_id = retval;
578
579                 TEST_ASSERT_SUCCESS(configure_ethdev(test_params.bond_port_id,
580                                 &default_pmd_conf, 0), "Failed to configure bonding device\n");
581
582                 rte_eth_dev_info_get(test_params.bond_port_id,
583                                 &test_params.bond_dev_info);
584         }
585
586         return TEST_SUCCESS;
587 }
588
589 static void
590 testsuite_teardown(void)
591 {
592         struct slave_conf *port;
593         uint8_t i;
594
595         /* Only stop ports.
596          * Any cleanup/reset state is done when particular test is
597          * started. */
598
599         rte_eth_dev_stop(test_params.bond_port_id);
600
601         FOR_EACH_PORT(i, port)
602                 rte_eth_dev_stop(port->port_id);
603 }
604
605 static int
606 check_environment(void)
607 {
608         return TEST_SUCCESS;
609 }
610
611 static int
612 test_rssconf_executor(int (*test_func)(void))
613 {
614         int test_result;
615
616         /* Check if environment is clean. Fail to launch a test if there was
617          * a critical error before that prevented to reset environment. */
618         TEST_ASSERT_SUCCESS(check_environment(),
619                 "Refusing to launch test in dirty environment.");
620
621         RTE_VERIFY(test_func != NULL);
622         test_result = (*test_func)();
623
624         /* If test succeed check if environment wast left in good condition. */
625         if (test_result == TEST_SUCCESS)
626                 test_result = check_environment();
627
628         /* Reset environment in case test failed to do that. */
629         if (test_result != TEST_SUCCESS) {
630                 TEST_ASSERT_SUCCESS(remove_slaves_and_stop_bonded_device(),
631                         "Failed to stop bonded device");
632         }
633
634         return test_result;
635 }
636
637 static int
638 test_setup_wrapper(void)
639 {
640         return test_rssconf_executor(&test_setup);
641 }
642
643 static int
644 test_rss_wrapper(void)
645 {
646         return test_rssconf_executor(&test_rss);
647 }
648
649 static int
650 test_rss_lazy_wrapper(void)
651 {
652         return test_rssconf_executor(&test_rss_lazy);
653 }
654
655 static struct unit_test_suite link_bonding_rssconf_test_suite  = {
656         .suite_name = "RSS Dynamic Configuration for Bonding Unit Test Suite",
657         .teardown = testsuite_teardown,
658         .unit_test_cases = {
659                 TEST_CASE_NAMED("test_setup", test_setup_wrapper),
660                 TEST_CASE_NAMED("test_rss", test_rss_wrapper),
661                 TEST_CASE_NAMED("test_rss_lazy", test_rss_lazy_wrapper),
662
663                 TEST_CASES_END()
664         }
665 };
666
667 static int
668 test_link_bonding_rssconf(void)
669 {
670         return unit_test_suite_runner(&link_bonding_rssconf_test_suite);
671 }
672
673 REGISTER_TEST_COMMAND(link_bonding_rssconf_autotest, test_link_bonding_rssconf);