summaryrefslogtreecommitdiff
path: root/service/include
diff options
context:
space:
mode:
author陆秋文 <[email protected]>2024-04-01 07:59:57 +0000
committer宋延超 <[email protected]>2024-04-01 07:59:57 +0000
commit3a51336967fd8027e9ae4000bd81ce2443e9ba87 (patch)
treeab32109085ee4ad68597f9f0ebb7bf7074c385da /service/include
parentfdb63a8888c061cf6fd9887d715c487938b92703 (diff)
Feature retrieve object of backpressure
Diffstat (limited to 'service/include')
-rw-r--r--service/include/sc_vdev.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/service/include/sc_vdev.h b/service/include/sc_vdev.h
index 6314ffd..b6fad5e 100644
--- a/service/include/sc_vdev.h
+++ b/service/include/sc_vdev.h
@@ -65,26 +65,6 @@ struct _vdev
* flush : flush packet buffer
*/
-#if 0
- int (*dispatch)(struct _vdev * _vdev, queue_id_t qid, struct rte_mbuf * pkts[], unsigned int nr_pkts,
- struct rte_mbuf * overload_pkts[], unsigned int * nr_overload_pkts, int flags);
-#endif
-
- int (*dispatch)(struct _vdev * _vdev, queue_id_t qid, struct rte_mbuf * pkts[], unsigned int nr_pkts, int flags);
- int (*collect)(struct _vdev * _vdev, queue_id_t qid, struct rte_mbuf * pkts[], unsigned int nr_pkts, int flags);
- int (*idle_pool)(struct _vdev * _vdev, queue_id_t qid);
- int (*stats_get)(struct _vdev * _vdev, struct vdev_stat_info * stat_info);
-
- /* 销毁函数 */
- int (*destory)(struct _vdev * _vdev);
-
- /* VDI创建 */
- struct vdev_instance * (
- *vdi_create)(struct _vdev * _vdev, const char * appsym, unsigned int nr_rxstream, unsigned int nr_txstream);
-
- /* VDI销毁 */
- int (*vdi_destory)(struct vdev_instance * vdi);
-
/* 统计信息暂存,通过外部接口设置,用于计算速度 */
struct vdev_stat_info stat_info_last;
};
@@ -122,6 +102,8 @@ int vdev_dispatch(struct vdev * vdev, queue_id_t qid, struct rte_mbuf * pkts[],
// 收集数据
int vdev_collect(struct vdev * vdev, queue_id_t qid, struct rte_mbuf * pkts[], unsigned int nr_pkts, int flags);
+int vdev_rt_pkts_retrieve(struct vdev * vdev, queue_id_t qid, struct rte_mbuf * pkts[], unsigned int nr_pkts);
+
// 空闲轮询
int vdev_idle_poll(struct vdev * vdev, queue_id_t qid);
@@ -136,8 +118,22 @@ int vdev_data_create(struct vdev_main * v_main, const char * symbol, unsigned in
unsigned int sz_buffer, unsigned int batch_interval_in_us, unsigned int en_q_len_monitor,
struct rte_mempool * direct_pool);
-int vdev_loop_create(struct vdev_main * v_main, const char * symbol, unsigned int sz_tunnel, unsigned int sz_buffer,
- struct rte_mempool * direct_pool, struct rte_mempool * indirect_pool);
+int vdev_data_dispatch(struct _vdev * _vdev, queue_id_t qid, struct rte_mbuf * pkts[], unsigned int nr_pkts,
+ int flags);
+
+int vdev_data_collect(struct _vdev * _vdev, queue_id_t qid, struct rte_mbuf * pkts[], unsigned int nr_pkts,
+ int flags);
+
+int vdev_data_idle_poll(struct _vdev * _vdev, queue_id_t qid);
+
+int vdev_data_stats_get(struct _vdev * _vdev, struct vdev_stat_info * stat_info);
+
+struct vdev_instance * vdev_data_instance_create(struct _vdev * _vdev, const char * appsym,
+ unsigned int nr_rxstream, unsigned int nr_txstream);
+
+int vdev_data_rt_pkts_retrieve(struct _vdev * _vdev, queue_id_t qid, struct rte_mbuf * pkts[], unsigned int nr_pkts);
+
+int vdev_data_instance_destory(struct vdev_instance * vdi);
int vdev_main_init(struct sc_main * sc);