X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fip_pipeline%2Fthread.c;h=b2e97327052f61478a9d358828bf7843de5dc67c;hb=0f2ffb49ce29351fad043377a6d2f144f3c52afb;hp=272fbbeed1bcbab9f89d6def2dda0d79a8336116;hpb=c4160d303026ed11707e4a3a7a2e12b9be863d5a;p=dpdk.git diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c index 272fbbeed1..b2e9732705 100644 --- a/examples/ip_pipeline/thread.c +++ b/examples/ip_pipeline/thread.c @@ -32,7 +32,7 @@ #endif /** - * Master thead: data plane thread context + * Main thread: data plane thread context */ struct thread { struct rte_ring *msgq_req; @@ -78,7 +78,7 @@ struct thread_data { static struct thread_data thread_data[RTE_MAX_LCORE]; /** - * Master thread: data plane thread init + * Main thread: data plane thread init */ static void thread_free(void) @@ -105,7 +105,7 @@ thread_init(void) { uint32_t i; - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { char name[NAME_MAX]; struct rte_ring *msgq_req, *msgq_rsp; struct thread *t = &thread[i]; @@ -137,7 +137,7 @@ thread_init(void) return -1; } - /* Master thread records */ + /* Main thread records */ t->msgq_req = msgq_req; t->msgq_rsp = msgq_rsp; t->enabled = 1; @@ -179,7 +179,7 @@ pipeline_is_running(struct pipeline *p) } /** - * Master thread & data plane threads: message passing + * Main thread & data plane threads: message passing */ enum thread_req_type { THREAD_REQ_PIPELINE_ENABLE = 0, @@ -213,7 +213,7 @@ struct thread_msg_rsp { }; /** - * Master thread + * Main thread */ static struct thread_msg_req * thread_msg_alloc(void) @@ -325,8 +325,6 @@ thread_pipeline_enable(uint32_t thread_id, /* Send request and wait for response */ rsp = thread_msg_send_recv(thread_id, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -412,8 +410,6 @@ thread_pipeline_disable(uint32_t thread_id, /* Send request and wait for response */ rsp = thread_msg_send_recv(thread_id, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -560,7 +556,7 @@ thread_msg_handle(struct thread_data *t) } /** - * Master thread & data plane threads: message passing + * Main thread & data plane threads: message passing */ enum pipeline_req_type { /* Port IN */ @@ -734,7 +730,7 @@ struct pipeline_msg_rsp { }; /** - * Master thread + * Main thread */ static struct pipeline_msg_req * pipeline_msg_alloc(void) @@ -815,8 +811,6 @@ pipeline_port_in_stats_read(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -863,8 +857,6 @@ pipeline_port_in_enable(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -909,8 +901,6 @@ pipeline_port_in_disable(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -963,8 +953,6 @@ pipeline_port_out_stats_read(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1019,8 +1007,6 @@ pipeline_table_stats_read(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1436,10 +1422,6 @@ pipeline_table_rule_add(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) { - free(rule); - return -1; - } /* Read response */ status = rsp->status; @@ -1538,10 +1520,6 @@ pipeline_table_rule_add_default(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) { - free(rule); - return -1; - } /* Read response */ status = rsp->status; @@ -1655,10 +1633,6 @@ pipeline_table_rule_add_bulk(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) { - table_rule_list_free(list); - return -ENOMEM; - } /* Read response */ status = rsp->status; @@ -1733,8 +1707,6 @@ pipeline_table_rule_delete(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1790,8 +1762,6 @@ pipeline_table_rule_delete_default(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1857,8 +1827,6 @@ pipeline_table_rule_stats_read(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1915,8 +1883,6 @@ pipeline_table_mtr_profile_add(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1967,8 +1933,6 @@ pipeline_table_mtr_profile_delete(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -2037,8 +2001,6 @@ pipeline_table_rule_mtr_read(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -2096,8 +2058,6 @@ pipeline_table_dscp_table_update(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -2164,8 +2124,6 @@ pipeline_table_rule_ttl_read(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -2229,8 +2187,6 @@ pipeline_table_rule_time_read(const char *pipeline_name, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status;