uint32_t lcore_id;
/* Stop transmission first. */
- RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+ RTE_LCORE_FOREACH_WORKER(lcore_id) {
conf = &fwd_lcore_conf[lcore_id];
if (!conf->nb_stream)
uint8_t lcore_num, nb_extra;
lcore_num = rte_lcore_count();
- /* Exclude master core */
+ /* Exclude main core */
lcore_num--;
nb_streams = (fwd_mode == IOFWD) ? num_queues * 2 : num_queues;
sm_id = 0;
i = 0;
- RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+ RTE_LCORE_FOREACH_WORKER(lcore_id) {
conf = &fwd_lcore_conf[lcore_id];
if (i < nb_extra) {
}
/* Print packet forwading config. */
- RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+ RTE_LCORE_FOREACH_WORKER(lcore_id) {
conf = &fwd_lcore_conf[lcore_id];
if (!conf->nb_stream)
struct rte_eth_link eth_link;
uint32_t lcore_id;
int ret, i;
+ char link_status_text[RTE_ETH_LINK_MAX_STR_LEN];
ret = ntb_fwd_config_setup();
if (ret < 0) {
return;
}
if (eth_link.link_status) {
- printf("Eth%u Link Up. Speed %u Mbps - %s\n",
- eth_port_id, eth_link.link_speed,
- (eth_link.link_duplex ==
- ETH_LINK_FULL_DUPLEX) ?
- ("full-duplex") : ("half-duplex"));
+ rte_eth_link_to_str(link_status_text,
+ sizeof(link_status_text),
+ ð_link);
+ printf("Eth%u %s\n", eth_port_id,
+ link_status_text);
break;
}
}
assign_stream_to_lcores();
in_test = 1;
- RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+ RTE_LCORE_FOREACH_WORKER(lcore_id) {
conf = &fwd_lcore_conf[lcore_id];
if (!conf->nb_stream)
struct ntb_fwd_lcore_conf *conf;
uint32_t lcore_id;
- RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+ RTE_LCORE_FOREACH_WORKER(lcore_id) {
conf = &fwd_lcore_conf[lcore_id];
if (!conf->nb_stream)
NULL,
};
-/* prompt function, called from main on MASTER lcore */
+/* prompt function, called from main on MAIN lcore */
static void
prompt(void)
{
start_pkt_fwd();
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}