#include <rte_tcp.h>
#include <rte_arp.h>
#include <rte_spinlock.h>
+#include <rte_devargs.h>
+#include <rte_byteorder.h>
+#include <rte_cpuflags.h>
+#include <rte_eth_bond.h>
#include <cmdline_rdline.h>
#include <cmdline_parse.h>
#include "main.h"
-#include <rte_devargs.h>
-
-
-#include "rte_byteorder.h"
-#include "rte_cpuflags.h"
-#include "rte_eth_bond.h"
-
#define RTE_LOGTYPE_DCB RTE_LOGTYPE_USER1
#define NB_MBUF (1024*8)
struct cmdline *cl,
__rte_unused void *data)
{
- int slave_core_id = rte_lcore_id();
+ int worker_core_id = rte_lcore_id();
rte_spinlock_trylock(&global_flag_stru_p->lock);
if (global_flag_stru_p->LcoreMainIsRunning == 0) {
return;
}
- /* start lcore main on core != master_core - ARP response thread */
- slave_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0);
- if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0))
+ /* start lcore main on core != main_core - ARP response thread */
+ worker_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0);
+ if ((worker_core_id >= RTE_MAX_LCORE) || (worker_core_id == 0))
return;
rte_spinlock_trylock(&global_flag_stru_p->lock);
cmdline_printf(cl,
"Starting lcore_main on core %d:%d "
"Our IP:%d.%d.%d.%d\n",
- slave_core_id,
- rte_eal_remote_launch(lcore_main, NULL, slave_core_id),
+ worker_core_id,
+ rte_eal_remote_launch(lcore_main, NULL, worker_core_id),
BOND_IP_1,
BOND_IP_2,
BOND_IP_3,
NULL,
};
-/* prompt function, called from main on MASTER lcore */
+/* prompt function, called from main on MAIN lcore */
static void prompt(__rte_unused void *arg1)
{
struct cmdline *cl;
int
main(int argc, char *argv[])
{
- int ret, slave_core_id;
+ int ret, worker_core_id;
uint16_t nb_ports, i;
/* init EAL */
rte_spinlock_init(&global_flag_stru_p->lock);
/* check state of lcores */
- RTE_LCORE_FOREACH_SLAVE(slave_core_id) {
- if (rte_eal_get_lcore_state(slave_core_id) != WAIT)
+ RTE_LCORE_FOREACH_WORKER(worker_core_id) {
+ if (rte_eal_get_lcore_state(worker_core_id) != WAIT)
return -EBUSY;
}
- /* start lcore main on core != master_core - ARP response thread */
- slave_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0);
- if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0))
+ /* start lcore main on core != main_core - ARP response thread */
+ worker_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0);
+ if ((worker_core_id >= RTE_MAX_LCORE) || (worker_core_id == 0))
return -EPERM;
global_flag_stru_p->LcoreMainIsRunning = 1;
- global_flag_stru_p->LcoreMainCore = slave_core_id;
+ global_flag_stru_p->LcoreMainCore = worker_core_id;
printf("Starting lcore_main on core %d:%d Our IP:%d.%d.%d.%d\n",
- slave_core_id,
+ worker_core_id,
rte_eal_remote_launch((lcore_function_t *)lcore_main,
NULL,
- slave_core_id),
+ worker_core_id),
BOND_IP_1,
BOND_IP_2,
BOND_IP_3,