blob: 11971672a366344c08709b536b03f5bfe54e3fa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* 简单数据通信用户态协议栈管理器
*
* \author Lu Qiuwen<[email protected]>
* \date 2016-10-18
*/
#include <sk_stack.h>
#include <rte_ip_frag.h>
struct mr_stack_instance * mr_stack_instance_create(struct mr_stack_param * param)
{
struct mr_stack_instance * instance;
// 分配空间
instance = rte_zmalloc(NULL, sizeof(struct mr_stack_instance), 0);
if(unlikely(instance == NULL))
{
MR_LOG(INFO, STACK, "StackInstanceCreate, "
"Cannot alloc memory for stack instance. \n");
return NULL;
}
// 初始化参数
instance->param = *param;
TAILQ_INIT(&instance->dev_info_list);
TAILQ_INIT(&instance->dev_desc_list);
return instance;
}
struct mr_stack_slave_instance * mr_stack_slave_create()
{
return NULL;
}
|