summaryrefslogtreecommitdiff
path: root/drivers/rmnet/shs/rmnet_shs_wq_mem.h
diff options
context:
space:
mode:
authorWilson Sung <wilsonsung@google.com>2019-12-23 12:28:40 +0800
committerWilson Sung <wilsonsung@google.com>2019-12-23 12:28:54 +0800
commitdf7ee6ef20b0e01af170dc11a81fc85902b2f689 (patch)
tree66b7621633e7cefaf2914636bdded53a5d0a7885 /drivers/rmnet/shs/rmnet_shs_wq_mem.h
parente7210f09d00c91f87b295c7a952f040c73506cc0 (diff)
parent7fa0fbc4c4b5344b5c4b9ca7851502f475573fed (diff)
downloaddata-kernel-df7ee6ef20b0e01af170dc11a81fc85902b2f689.tar.gz
Merge branch 'LA.UM.8.1.C9.09.00.00.518.343' via branch 'qcom-msm-4.14' into android-msm-floral-4.14android-r-preview-3_r0.7android-r-preview-2_r0.7android-msm-coral-4.14-r-preview-3android-msm-coral-4.14-r-preview-2
Bug: 146759211 Change-Id: I594bc7e2ab1c248a53a1aa2f49604bc37bdab434 Signed-off-by: Wilson Sung <wilsonsung@google.com>
Diffstat (limited to 'drivers/rmnet/shs/rmnet_shs_wq_mem.h')
-rw-r--r--drivers/rmnet/shs/rmnet_shs_wq_mem.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/drivers/rmnet/shs/rmnet_shs_wq_mem.h b/drivers/rmnet/shs/rmnet_shs_wq_mem.h
new file mode 100644
index 0000000..2e5e889
--- /dev/null
+++ b/drivers/rmnet/shs/rmnet_shs_wq_mem.h
@@ -0,0 +1,89 @@
+/* Copyright (c) 2019 The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * RMNET Data Smart Hash stamping solution
+ *
+ */
+
+#ifndef _RMNET_SHS_WQ_MEM_H_
+#define _RMNET_SHS_WQ_MEM_H_
+
+#include "rmnet_shs.h"
+
+/* Shared memory files */
+#define RMNET_SHS_PROC_DIR "shs"
+#define RMNET_SHS_PROC_CAPS "rmnet_shs_caps"
+#define RMNET_SHS_PROC_G_FLOWS "rmnet_shs_flows"
+#define RMNET_SHS_PROC_SS_FLOWS "rmnet_shs_ss_flows"
+
+#define RMNET_SHS_MAX_USRFLOWS (128)
+
+struct __attribute__((__packed__)) rmnet_shs_wq_cpu_cap_usr_s {
+ u64 pps_capacity;
+ u64 avg_pps_capacity;
+ u64 bps_capacity;
+ u16 cpu_num;
+};
+
+struct __attribute__((__packed__)) rmnet_shs_wq_gflows_usr_s {
+ u64 rx_pps;
+ u64 avg_pps;
+ u64 rx_bps;
+ u32 hash;
+ u16 cpu_num;
+};
+
+struct __attribute__((__packed__)) rmnet_shs_wq_ssflows_usr_s {
+ u64 rx_pps;
+ u64 avg_pps;
+ u64 rx_bps;
+ u32 hash;
+ u16 cpu_num;
+};
+
+extern struct list_head gflows;
+extern struct list_head ssflows;
+extern struct list_head cpu_caps;
+
+/* Buffer size for read and write syscalls */
+enum {RMNET_SHS_BUFFER_SIZE = 4096};
+
+struct rmnet_shs_mmap_info {
+ char *data;
+};
+
+/* Function Definitions */
+
+void rmnet_shs_wq_ssflow_list_add(struct rmnet_shs_wq_hstat_s *hnode,
+ struct list_head *ss_flows);
+void rmnet_shs_wq_gflow_list_add(struct rmnet_shs_wq_hstat_s *hnode,
+ struct list_head *gold_flows);
+
+void rmnet_shs_wq_cleanup_gold_flow_list(struct list_head *gold_flows);
+void rmnet_shs_wq_cleanup_ss_flow_list(struct list_head *ss_flows);
+
+void rmnet_shs_wq_cpu_caps_list_add(
+ struct rmnet_shs_wq_rx_flow_s *rx_flow_tbl_p,
+ struct rmnet_shs_wq_cpu_rx_pkt_q_s *cpu_node,
+ struct list_head *cpu_caps);
+
+void rmnet_shs_wq_cleanup_cpu_caps_list(struct list_head *cpu_caps);
+
+void rmnet_shs_wq_mem_update_cached_cpu_caps(struct list_head *cpu_caps);
+
+void rmnet_shs_wq_mem_update_cached_sorted_gold_flows(struct list_head *gold_flows);
+void rmnet_shs_wq_mem_update_cached_sorted_ss_flows(struct list_head *ss_flows);
+
+void rmnet_shs_wq_mem_init(void);
+
+void rmnet_shs_wq_mem_deinit(void);
+
+#endif /*_RMNET_SHS_WQ_GENL_H_*/