summaryrefslogtreecommitdiff
path: root/app/include
diff options
context:
space:
mode:
authorLu Qiuwen <[email protected]>2023-04-27 17:26:57 +0800
committerLu Qiuwen <[email protected]>2023-05-05 14:00:54 +0800
commite5ac798f7c3e8bb0aab4e5552df2e3f5b93db0eb (patch)
tree8bbb91f429e9459a2128b085f6ceac7b80054f84 /app/include
parent64fcf8c75c433eca07315d3e56512075b529d5ba (diff)
增加poll时注册外部事件fd的功能并改进poll相关的实现。
Diffstat (limited to 'app/include')
-rw-r--r--app/include/mrapp.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/app/include/mrapp.h b/app/include/mrapp.h
index cc0ee7b..afe019e 100644
--- a/app/include/mrapp.h
+++ b/app/include/mrapp.h
@@ -24,8 +24,17 @@ struct mrapp_stat
uint64_t packet_recv_drop;
uint64_t packet_send_drop;
+
+ uint64_t poll_wake_up_by_ev;
+ uint64_t poll_wake_up_timeout;
};
+struct mr_vdev_counters
+{
+ unsigned int rx_burst_call_counters;
+ unsigned int rx_burst_zero_counters;
+} __rte_cache_aligned;
+
/* 用户设备描述符 */
struct mr_vdev
{
@@ -40,6 +49,8 @@ struct mr_vdev
int rx_notify_fds[MR_SID_MAX];
struct rte_epoll_event rx_notify_epoll_events[MR_SID_MAX];
unsigned int nr_rx_notify_fds;
+
+ struct mr_vdev_counters counters[MR_SID_MAX];
};
struct mr_thread_info
@@ -133,7 +144,12 @@ struct mr_instance
/* rx epoll fd */
int rx_notify_epfd[MR_SID_MAX];
- unsigned int stat_notify_wake_up[MR_SID_MAX];
+ unsigned int stat_notify_wake_up_from_ev[MR_SID_MAX];
+ unsigned int stat_notify_wake_up_from_timeout[MR_SID_MAX];
+ unsigned int busy_loop_counter[MR_SID_MAX];
+
+ /* threshold */
+ unsigned int rx_notify_defer_threshold;
/* mempool cache map */
struct mp_cache_map * mp_cache_map[MR_MEMPOOL_COUNT_MAX];