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

Function configure_ethdev

dpdk/app/test/test_link_bonding_rssconf.c:119–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 RTE_DIM(test_params.member_ports))
118
119static int
120configure_ethdev(uint16_t port_id, struct rte_eth_conf *eth_conf,
121 uint8_t start)
122{
123 int rxq, txq;
124
125 TEST_ASSERT(rte_eth_dev_configure(port_id, RXTX_QUEUE_COUNT,
126 RXTX_QUEUE_COUNT, eth_conf) == 0, "Failed to configure device %u",
127 port_id);
128
129 int ret = rte_eth_dev_set_mtu(port_id, 1550);
130 RTE_TEST_ASSERT(ret == 0 || ret == -ENOTSUP,
131 "rte_eth_dev_set_mtu for port %d failed", port_id);
132
133 for (rxq = 0; rxq < RXTX_QUEUE_COUNT; rxq++) {
134 TEST_ASSERT(rte_eth_rx_queue_setup(port_id, rxq, RXTX_RING_SIZE,
135 rte_eth_dev_socket_id(port_id), NULL,
136 test_params.mbuf_pool) == 0, "Failed to setup rx queue.");
137 }
138
139 for (txq = 0; txq < RXTX_QUEUE_COUNT; txq++) {
140 TEST_ASSERT(rte_eth_tx_queue_setup(port_id, txq, RXTX_RING_SIZE,
141 rte_eth_dev_socket_id(port_id), NULL) == 0,
142 "Failed to setup tx queue.");
143 }
144
145 if (start) {
146 TEST_ASSERT(rte_eth_dev_start(port_id) == 0,
147 "Failed to start device (%d).", port_id);
148 }
149
150 return 0;
151}
152
153/**
154 * Remove all members from bonding

Callers 3

test_rssFunction · 0.70
test_rss_lazyFunction · 0.70
test_setupFunction · 0.70

Calls 6

rte_eth_dev_configureFunction · 0.85
rte_eth_dev_set_mtuFunction · 0.85
rte_eth_rx_queue_setupFunction · 0.85
rte_eth_dev_socket_idFunction · 0.85
rte_eth_tx_queue_setupFunction · 0.85
rte_eth_dev_startFunction · 0.85

Tested by

no test coverage detected