diff options
| author | Qiuwen Lu <[email protected]> | 2017-03-17 15:21:45 +0800 |
|---|---|---|
| committer | Qiuwen Lu <[email protected]> | 2017-03-17 15:21:45 +0800 |
| commit | 92ab2b7322c8e024c982a8e99e7a760d4cd43684 (patch) | |
| tree | f2bb24a4730b518e4868e9dcce63f5684a2bef87 /app/include/mrapp.h | |
| parent | 3ea3f36b44ceb263a0f8d7b3d910d32fa91b4b75 (diff) | |
增加邻居子系统、ARP协议处理模块
Diffstat (limited to 'app/include/mrapp.h')
| -rw-r--r-- | app/include/mrapp.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/app/include/mrapp.h b/app/include/mrapp.h index b466a3d..b6859c0 100644 --- a/app/include/mrapp.h +++ b/app/include/mrapp.h @@ -3,6 +3,8 @@ #include <common.h> #include <ctrlmsg.h> #include <vdev_define.h> +#include <neigh.h> +#include <marsio.h> struct mrapp_vdev { @@ -10,6 +12,18 @@ struct mrapp_vdev unsigned int nr_rxstream; unsigned int nr_txstream; struct vdev_instance * vdi; + unsigned int en_arp; + unsigned int en_icmp; +}; + +struct mrapp_stat +{ + uint64_t t_arp_request_on_line; + uint64_t t_arp_request_accept; + uint64_t t_arp_request_ignore; + uint64_t t_arp_answer_on_line; + uint64_t t_arp_answer_send; + uint64_t t_arp_answer_drop; }; struct mrapp_instance @@ -30,11 +44,20 @@ struct mrapp_instance pthread_cond_t cond_ctrlmsg_wait; /* 等待控制回复锁 */ pthread_mutex_t lock_ctrlmsg_wait; + /* 邻居管理器 */ + struct neighbour_manager * neigh; + /* 统计 */ + struct mrapp_stat stat[MR_SID_MAX]; }; /* 标志位,是否已经进行了初始化*/ extern int mrapp_inited; /* 标志位,本线程是否已经进行了初始化 */ extern int __thread mrapp_thread_inited; +extern struct mrapp_instance * instance; /* 状态监测入口 */ -int mrapp_monit_loop(struct mrapp_instance * instance);
\ No newline at end of file +int mrapp_monit_loop(struct mrapp_instance * instance); + +int mrapp_packet_send_burst(struct vdev_instance * vdi, queue_id_t qid, struct rte_mbuf * mbufs[], int nr_mbufs); + +int mrapp_packet_fast_send_burst(struct vdev_instance * vdi, queue_id_t qid, struct rte_mbuf * mbufs[], int nr_mbufs);
\ No newline at end of file |
