aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/misc
diff options
context:
space:
mode:
authorOfir Bitton <obitton@habana.ai>2020-06-18 09:51:16 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2020-07-24 20:31:36 +0300
commitdb491e4f08a9fd84ebb1ebd22a6b0b988a81a0d8 (patch)
treec1581ca6328266d01a986c62e9af2bc6c6838517 /include/uapi/misc
parenthabanalabs: extract cpu boot status lookup (diff)
downloadwireguard-linux-db491e4f08a9fd84ebb1ebd22a6b0b988a81a0d8.tar.xz
wireguard-linux-db491e4f08a9fd84ebb1ebd22a6b0b988a81a0d8.zip
habanalabs: Add dropped cs statistics info struct
Add command submission statistics structure which can be obtained through the info ioctl. Each drop counter describes the reason for which the command submission was dropped. This information is needed for the user to be aware of the specific reason for which the submitted work was dropped. The user can then utilize the driver more efficiently. Signed-off-by: Ofir Bitton <obitton@habana.ai> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'include/uapi/misc')
-rw-r--r--include/uapi/misc/habanalabs.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h
index f218d1c62c62..d5c4f983b7a8 100644
--- a/include/uapi/misc/habanalabs.h
+++ b/include/uapi/misc/habanalabs.h
@@ -263,6 +263,7 @@ enum hl_device_status {
* time the driver was loaded.
* HL_INFO_TIME_SYNC - Retrieve the device's time alongside the host's time
* for synchronization.
+ * HL_INFO_CS_COUNTERS - Retrieve command submission counters
*/
#define HL_INFO_HW_IP_INFO 0
#define HL_INFO_HW_EVENTS 1
@@ -274,6 +275,7 @@ enum hl_device_status {
#define HL_INFO_CLK_RATE 8
#define HL_INFO_RESET_COUNT 9
#define HL_INFO_TIME_SYNC 10
+#define HL_INFO_CS_COUNTERS 11
#define HL_INFO_VERSION_MAX_LEN 128
#define HL_INFO_CARD_NAME_MAX_LEN 16
@@ -338,6 +340,25 @@ struct hl_info_time_sync {
__u64 host_time;
};
+/**
+ * struct hl_info_cs_counters - command submission counters
+ * @out_of_mem_drop_cnt: dropped due to memory allocation issue
+ * @parsing_drop_cnt: dropped due to error in packet parsing
+ * @queue_full_drop_cnt: dropped due to queue full
+ * @device_in_reset_drop_cnt: dropped due to device in reset
+ */
+struct hl_cs_counters {
+ __u64 out_of_mem_drop_cnt;
+ __u64 parsing_drop_cnt;
+ __u64 queue_full_drop_cnt;
+ __u64 device_in_reset_drop_cnt;
+};
+
+struct hl_info_cs_counters {
+ struct hl_cs_counters cs_counters;
+ struct hl_cs_counters ctx_cs_counters;
+};
+
struct hl_info_args {
/* Location of relevant struct in userspace */
__u64 return_pointer;