diff options
| author | Qiuwen Lu <[email protected]> | 2017-12-05 10:43:03 +0800 |
|---|---|---|
| committer | Qiuwen Lu <[email protected]> | 2017-12-05 10:43:03 +0800 |
| commit | 807ec9b870a9e1b28f4176d92fcdd8dfe052148f (patch) | |
| tree | bb96dd5903d27ae61a66f1abdae11c50501c42e1 /include/external | |
| parent | 8817d1203b309a8ca9ffcd8e3223b207c16a2f6c (diff) | |
增加申请/释放共享内存的接口,增加新的时间戳接口。v4.2.35-20171205
- 增加申请/释放共享内存的接口,该共享内存基于DPDK的大页内存,可以跨进程共享通信。
- 增加新的时间戳接口,获取128位时间戳,报文复制时该时间戳也随之复制。
Diffstat (limited to 'include/external')
| -rw-r--r-- | include/external/marsio.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/external/marsio.h b/include/external/marsio.h index 457903e..f18e416 100644 --- a/include/external/marsio.h +++ b/include/external/marsio.h @@ -89,6 +89,12 @@ enum mr_thread_affinity_mode MR_THREAD_AFFINITY_USER = 255 }; +enum mr_timestamp_type +{ + /* 从网卡收取时或报文缓冲区申请时的时间戳 */ + MR_TIMESTAMP_RX_OR_ALLOC = 0, +}; + #ifdef __cplusplus extern "C" { #endif @@ -239,6 +245,10 @@ void marsio_buff_set_ctrlbuf(marsio_buff_t *m); uint64_t marsio_buff_get_timestamp(marsio_buff_t *m); void marsio_buff_set_timestamp(marsio_buff_t *m, uint64_t timestamp); +int marsio_buff_get_timestamp_ex(marsio_buff_t * m, enum mr_timestamp_type ts_type, struct timespec * ts); + +void * marsio_shared_mem_alloc(struct mr_instance * instance, size_t len); +void marsio_shared_mem_free(struct mr_instance * instance, void * mem); #ifdef __cplusplus } |
