summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiuwen Lu <[email protected]>2016-05-12 15:42:14 +0800
committerQiuwen Lu <[email protected]>2016-05-12 15:42:14 +0800
commit33cb011ab267657fa7baec62f5d1072a8963bc77 (patch)
tree2abdc5d69d5748bb10c88dd77f5321bbc9bd6ffc
parentbff8d6c2ddaae569842902e74e62dfb81660bf11 (diff)
解决调用上层应用时lcore_id和sid顺序错误的bug,修正了计算runtime时间调用参数错误的问题。
-rw-r--r--worker/callbiz.c4
-rw-r--r--worker/callbiz.h26
2 files changed, 15 insertions, 15 deletions
diff --git a/worker/callbiz.c b/worker/callbiz.c
index 24ad7ce..0bb1bc4 100644
--- a/worker/callbiz.c
+++ b/worker/callbiz.c
@@ -52,7 +52,7 @@ int callbiz_entry(struct rte_mbuf * mbuf)
for (int i = 0; i < biz_ether_nb_entries; i++)
{
- ret = biz_ether_entries[i](mbuf, sid, lcore_id);
+ ret = biz_ether_entries[i](mbuf, lcore_id, sid);
if (ret == RET_CHAIN_CONTINUE) continue;
goto out;
}
@@ -60,6 +60,6 @@ int callbiz_entry(struct rte_mbuf * mbuf)
ret = RET_CHAIN_DROP;
out:
tsc_end = rte_rdtsc();
- nstat_client_count_wk_runtime(sid, tsc_end - tsc_start);
+ nstat_client_count_wk_runtime(lcore_id, tsc_end - tsc_start);
return ret;
} \ No newline at end of file
diff --git a/worker/callbiz.h b/worker/callbiz.h
index 06a4b9b..1cbf437 100644
--- a/worker/callbiz.h
+++ b/worker/callbiz.h
@@ -1,21 +1,21 @@
-#pragma once
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum e_callbiz_type
{
CALLBIZ_ENTRY_ETHER = 0,
};
-/* ���������������� */
-#define RET_CHAIN_CONTINUE -1
-/* ת�� */
-#define RET_CHAIN_FORWARD 1
-/* ���� */
-#define RET_CHAIN_DROP 0
-/* ���� */
+/* ���������������� */
+#define RET_CHAIN_CONTINUE -1
+/* ת�� */
+#define RET_CHAIN_FORWARD 1
+/* ���� */
+#define RET_CHAIN_DROP 0
+/* ���� */
#define RET_CHAIN_KEEP 2
typedef int(*biz_ether_entry_t)(struct rte_mbuf * mbuf, int lcore_id, int sid);