MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_stop_bonding_device

Function test_stop_bonding_device

dpdk/app/test/test_link_bonding.c:614–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614static int
615test_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
650static int
651remove_members_and_stop_bonding_device(void)

Callers

nothing calls this directly

Calls 5

rte_eth_dev_stopFunction · 0.85
rte_eth_link_getFunction · 0.85
rte_strerrorFunction · 0.85
rte_eth_bond_members_getFunction · 0.85

Tested by

no test coverage detected