struct rte_ether_hdr *ptr_mac_hdr;
ptr_mac_hdr = rte_pktmbuf_mtod(ptr_frame, struct rte_ether_hdr *);
- rte_ether_addr_copy(&ptr_mac_hdr->s_addr, &ptr_mac_hdr->d_addr);
- rte_ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->s_addr);
+ rte_ether_addr_copy(&ptr_mac_hdr->src_addr, &ptr_mac_hdr->dst_addr);
+ rte_ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->src_addr);
}
-static int slave_main(__rte_unused void *ptr_data)
+static int worker_main(__rte_unused void *ptr_data)
{
struct app_port *ptr_port;
struct rte_mbuf *ptr_frame;
app_cfg.cnt_ports = cnt_ports;
if (rte_lcore_count() < 2)
- rte_exit(EXIT_FAILURE, "No available slave core!\n");
- /* Assume there is an available slave.. */
+ rte_exit(EXIT_FAILURE, "No available worker core!\n");
+
+ /* Assume there is an available worker.. */
id_core = rte_lcore_id();
id_core = rte_get_next_lcore(id_core, 1, 1);
- rte_eal_remote_launch(slave_main, NULL, id_core);
+ rte_eal_remote_launch(worker_main, NULL, id_core);
ethapp_main();
app_cfg.exit_now = 1;
- RTE_LCORE_FOREACH_SLAVE(id_core) {
+ RTE_LCORE_FOREACH_WORKER(id_core) {
if (rte_eal_wait_lcore(id_core) < 0)
return -1;
}
+ /* clean up the EAL */
+ rte_eal_cleanup();
+
return 0;
}