summaryrefslogtreecommitdiff
path: root/include/internal
diff options
context:
space:
mode:
authorsongyanchao <[email protected]>2023-10-31 07:54:33 +0000
committersongyanchao <[email protected]>2023-10-31 07:54:33 +0000
commit740c7bba2d6d8dfcdd57b0c5fba6f1d6ba43cc8c (patch)
tree434c67e80abeef89880c4616ddfa8328bf91fc0b /include/internal
parentc49cdd6dcab6572287efbdb1f97e4d33b2012ca6 (diff)
🎈 perf(DPISDN-22): Prevent different upper-level applications from using the same virtual device.
Prevent different upper-level applications from using the same virtual device.
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/vdev_define.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/internal/vdev_define.h b/include/internal/vdev_define.h
index 276efaa..4112a88 100644
--- a/include/internal/vdev_define.h
+++ b/include/internal/vdev_define.h
@@ -1,8 +1,8 @@
#pragma once
#include <common.h>
-#include <rte_ether.h>
#include <netinet/in.h>
+#include <rte_ether.h>
#include <vnode.h>
struct vdev_main;
@@ -17,12 +17,18 @@ enum vd_type
VD_TYPE_MAX
};
-enum
+enum link_status
{
LINK_DOWN = 0,
LINK_UP
};
+enum vdev_in_use
+{
+ VDEV_NOT_IN_USE = 0,
+ VDEV_IN_USE
+};
+
struct vdev_stat_info
{
unsigned int nr_rxstream;
@@ -88,6 +94,8 @@ struct vdev
unsigned int enable;
/* 网卡状态 */
uint8_t link_status;
+ /* Device usage status */
+ uint8_t in_use;
/* representor config */
struct
@@ -127,4 +135,4 @@ struct vdev_instance
/* 统计信息暂存,用于统计速度 */
struct vdev_stat_info stat_info_last;
TAILQ_ENTRY(vdev_instance) next;
-}; \ No newline at end of file
+};