summaryrefslogtreecommitdiff
path: root/app/include
diff options
context:
space:
mode:
authorQiuwen Lu <[email protected]>2017-07-12 09:58:57 +0800
committerQiuwen Lu <[email protected]>2017-07-12 09:58:57 +0800
commitd7eeb5574c2669479b562c43dcb36e6697775ae7 (patch)
tree567077829bb10f3af3ad00a1299eb1f36e61bda0 /app/include
parent2739172656216bca077605d29155181fa95628ef (diff)
(1)增加sendpath的Prebuild和Postbuild位置的用户回调函数功能,在sendpath的option中设置。(2)增加buffer的deep-deep克隆操作,克隆buffer全部区域和控制域。(3)修正service的monit信息刷写在获取网卡信息缓慢时没有示数的Bug。
Diffstat (limited to 'app/include')
-rw-r--r--app/include/sendpath.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/include/sendpath.h b/app/include/sendpath.h
index b38b1fe..03c17f6 100644
--- a/app/include/sendpath.h
+++ b/app/include/sendpath.h
@@ -4,6 +4,8 @@
#include <marsio.h>
typedef int(*fn_layer_construct_t)(struct mr_sendpath * sendpath, struct rte_mbuf * mbuf[], unsigned int nr_mbuf);
+typedef int(*fn_hook_t)(struct mr_sendpath * sendpath, struct rte_mbuf * mbuf[], unsigned int nr_mbuf, void * arg);
+
typedef int(*fn_requery_t)(struct mr_sendpath * sendpath);
typedef int(*fn_option_set_t)(struct mr_instance * instance, struct mr_sendpath * sendpath, int opt, va_list va_list);
typedef int(*fn_option_get_t)(struct mr_instance * instance, struct mr_sendpath * sendpath, int opt, va_list va_list);
@@ -29,7 +31,15 @@ struct mr_sendpath
fn_layer_construct_t fn_l3_construct;
/* 四层负载构建函数 */
fn_layer_construct_t fn_l4_construct;
-
+ /* Prebuild Hook回调函数 */
+ fn_hook_t fn_prebuild_hook;
+ /* Prebuild Hook回调函数参数 */
+ void * prebuild_hook_args;
+ /* Postbuild Hook 回调函数 */
+ fn_hook_t fn_postbuild_hook;
+ /* Postbuild Hook 回调函数参数 */
+ void * postbuild_hook_args;
+
/* 目标VDI */
struct vdev_instance * target_vdi;
/* Instance */
@@ -39,6 +49,8 @@ struct mr_sendpath
struct __mr_sendpath_vdev
{
struct mr_sendpath _father;
+ struct ether_addr src_eth_addr;
+ struct ether_addr dst_eth_addr;
};
struct __mr_sendpath_route