| 612 | } |
| 613 | |
| 614 | static int |
| 615 | test_stop_bonding_device(void) |
| 616 | { |
| 617 | int current_member_count; |
| 618 | uint16_t members[RTE_MAX_ETHPORTS]; |
| 619 | |
| 620 | struct rte_eth_link link_status; |
| 621 | int retval; |
| 622 | |
| 623 | TEST_ASSERT_SUCCESS(rte_eth_dev_stop(test_params->bonding_port_id), |
| 624 | "Failed to stop bonding port %u", |
| 625 | test_params->bonding_port_id); |
| 626 | |
| 627 | retval = rte_eth_link_get(test_params->bonding_port_id, &link_status); |
| 628 | TEST_ASSERT(retval >= 0, |
| 629 | "Bonding port (%d) link get failed: %s\n", |
| 630 | test_params->bonding_port_id, rte_strerror(-retval)); |
| 631 | TEST_ASSERT_EQUAL(link_status.link_status, 0, |
| 632 | "Bonding port (%d) status (%d) is not expected value (%d).", |
| 633 | test_params->bonding_port_id, link_status.link_status, 0); |
| 634 | |
| 635 | current_member_count = rte_eth_bond_members_get(test_params->bonding_port_id, |
| 636 | members, RTE_MAX_ETHPORTS); |
| 637 | TEST_ASSERT_EQUAL(current_member_count, test_params->bonding_member_count, |
| 638 | "Number of members (%d) is not expected value (%d).", |
| 639 | current_member_count, test_params->bonding_member_count); |
| 640 | |
| 641 | current_member_count = rte_eth_bond_active_members_get( |
| 642 | test_params->bonding_port_id, members, RTE_MAX_ETHPORTS); |
| 643 | TEST_ASSERT_EQUAL(current_member_count, 0, |
| 644 | "Number of active members (%d) is not expected value (%d).", |
| 645 | current_member_count, 0); |
| 646 | |
| 647 | return 0; |
| 648 | } |
| 649 | |
| 650 | static int |
| 651 | remove_members_and_stop_bonding_device(void) |
nothing calls this directly
no test coverage detected