diff options
| author | Qiuwen Lu <[email protected]> | 2017-03-22 10:04:10 +0800 |
|---|---|---|
| committer | Qiuwen Lu <[email protected]> | 2017-03-22 10:04:10 +0800 |
| commit | 6e1fe7e6803a50f9a432c489f4d1c3356fce8e9e (patch) | |
| tree | c76a0f4d00ecafcd8d674e3a74f40c6a95b5a6ab /app/include/sendpath.h | |
| parent | aba772b7fea12e111ffa8750ab52b22ed3872560 (diff) | |
增加针对于T1/T2UDP回传的SENDPATH场景实现。
Diffstat (limited to 'app/include/sendpath.h')
| -rw-r--r-- | app/include/sendpath.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/app/include/sendpath.h b/app/include/sendpath.h new file mode 100644 index 0000000..a9b3bac --- /dev/null +++ b/app/include/sendpath.h @@ -0,0 +1,39 @@ +#pragma once + +#include <mrapp.h> +#include <marsio.h> + +typedef int(*fn_layer_construct_t)(struct mr_sendpath * sendpath, struct rte_mbuf * mbuf[], unsigned int nr_mbuf); +typedef int(*fn_requery_t)(struct mr_sendpath * sendpath); + +struct mr_sendpath +{ + unsigned int sendpath_type; + unsigned int create_time; + unsigned int can_use; + + /* 重查询回调函数 */ + fn_requery_t fn_requery; + /* 二层负载构建函数 */ + fn_layer_construct_t fn_l2_construct; + /* 三层负载构建函数 */ + fn_layer_construct_t fn_l3_construct; + /* 四层负载构建函数 */ + fn_layer_construct_t fn_l4_construct; + + /* 目标VDI */ + struct vdev_instance * target_vdi; + /* Instance */ + struct mr_instance * instance; + + /* 二层构建参数 */ + struct ether_addr src_eth_addr; + struct ether_addr dst_eth_addr; + + /* 三层构建参数 */ + struct in_addr src_addr; + struct in_addr dst_addr; + + /* 重查询参数 */ + struct in_addr target_addr; +};
\ No newline at end of file |
