[PACKET_IO] finish marsio mode
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -27,7 +27,7 @@ void packet_io_loop(struct packet_io_loop_arg *arg)
|
||||
struct session_event *event;
|
||||
while(1)
|
||||
{
|
||||
int fetch_num = packet_io_rx(arg->dev, arg->thread_id, &rx_pkt, 1);
|
||||
int fetch_num = packet_io_device_rx(arg->dev, arg->thread_id, &rx_pkt, 1);
|
||||
if(fetch_num > 0)
|
||||
{
|
||||
event = session_manager_commit(rx_pkt);
|
||||
@@ -38,7 +38,7 @@ void packet_io_loop(struct packet_io_loop_arg *arg)
|
||||
}
|
||||
|
||||
//clean session_manager event queue
|
||||
packet_io_tx(arg->dev, arg->thread_id, &rx_pkt, 1);
|
||||
packet_io_device_tx(arg->dev, arg->thread_id, &rx_pkt, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -52,15 +52,15 @@ void packet_io_loop(struct packet_io_loop_arg *arg)
|
||||
|
||||
|
||||
struct packet_io_device *
|
||||
packet_io_init(const char *instance_name, const enum packet_io_run_mode mode, const int worker_thread_num)
|
||||
packet_io_init(const char *instance_name, const enum packet_io_run_mode mode, const int wrk_thread_num)
|
||||
{
|
||||
struct packet_io_instance *ppio_inst = packet_io_instance_create(instance_name, mode, worker_thread_num);
|
||||
struct packet_io_instance *ppio_inst = packet_io_instance_create(instance_name, mode, wrk_thread_num);
|
||||
if (nullptr == ppio_inst) {
|
||||
log_error(ST_ERR_PIO_INSTANCE, "packet_io instance init failed.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
struct packet_io_device *ppio_dev = packet_io_open_device(ppio_inst, "eth1", worker_thread_num, worker_thread_num);
|
||||
struct packet_io_device *ppio_dev = packet_io_open_device(ppio_inst, "eth1", wrk_thread_num, wrk_thread_num);
|
||||
if (nullptr == ppio_dev) {
|
||||
log_error(ST_ERR_PIO_DEVICE, "packet_io device open failed.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user