33 #ifndef _VIRGO_MEMPOOL_H_
34 #define _VIRGO_MEMPOOL_H_
36 #include <linux/ioport.h>
37 #include <linux/kobject.h>
38 #include <linux/klist.h>
39 #include <linux/list.h>
40 #include <linux/lockdep.h>
41 #include <linux/compiler.h>
42 #include <linux/types.h>
43 #include <linux/mutex.h>
45 #include <linux/atomic.h>
46 #include <linux/ratelimit.h>
47 #include <asm/device.h>
48 #include <linux/time.h>
50 #include <linux/kernel.h>
51 #include <linux/kthread.h>
52 #include <linux/sched.h>
53 #include <linux/module.h>
54 #include <linux/errno.h>
55 #include <linux/fcntl.h>
56 #include <linux/net.h>
58 #include <linux/inet.h>
59 #include <linux/udp.h>
60 #include <linux/tcp.h>
61 #include <linux/string.h>
62 #include <linux/unistd.h>
63 #include <linux/slab.h>
64 #include <linux/netdevice.h>
65 #include <linux/skbuff.h>
66 #include <linux/file.h>
67 #include <linux/freezer.h>
69 #include <net/checksum.h>
73 #include <net/tcp_states.h>
74 #include <asm/uaccess.h>
75 #include <asm/ioctls.h>
76 #include <trace/events/skb.h>
78 #include <linux/module.h>
79 #include <linux/types.h>
80 #include <linux/uio.h>
81 #include <linux/unistd.h>
84 #include <linux/sunrpc/types.h>
85 #include <linux/sunrpc/clnt.h>
86 #include <linux/sunrpc/xdr.h>
87 #include <linux/sunrpc/msg_prot.h>
88 #include <linux/sunrpc/svcsock.h>
89 #include <linux/sunrpc/stats.h>
90 #include <linux/sunrpc/xprt.h>
92 #include <linux/sunrpc/xprt.h>
137 int fragment_is_disk_persisted;
142 struct mutex vtable_fragment_mutex;
148 char* mempool_args[3];
149 char* mempoolFunction;
155 struct hostport* get_least_loaded_hostport_from_cloud_mempool();
156 char* get_host_from_cloud_Loadtrack_mempool();
157 char* get_host_from_cloud_PRG_mempool();
158 char* int_to_str(
int);
159 char* addr_to_str(
char*);
160 char* str_to_addr(
char*);
161 char* str_to_addr2(
char* straddr);
163 unsigned long addr_to_virgo_unique_id(
struct virgo_address* vaddr);
164 struct virgo_address* virgo_unique_id_to_addr(
unsigned long virgo_unique_id);
168 void var_sscanf(
char *str,
const char* fmt, ...);
170 struct mutex virgo_mempool_mutex;
172 FPTR toFuncPtr(
char*);
176 int virgocloudexec_mempool_create(
void);
177 void* virgocloudexec_mempool_recvfrom(
struct socket*);
178 int virgocloudexec_mempool_sendto(
struct socket*,
void* virgo_mempool_ret);
180 int virgo_cloudexec_mempool_service(
void* args);
181 void do_virgocloudexec_init(
void);
187 extern char* toKernelAddress(
const char* str);
190 int (*virgo_mempool_create)(void);
191 void* (*virgo_mempool_recvfrom)(
struct socket*);
192 int (*virgo_mempool_sendto)(
struct socket*,
void* virgo_mempool_ret);
196 .virgo_mempool_create = virgocloudexec_mempool_create,
197 .virgo_mempool_recvfrom = virgocloudexec_mempool_recvfrom,
198 .virgo_mempool_sendto = virgocloudexec_mempool_sendto
202 const char* m_virgo_name;
203 struct module* m_virgo_owner;
208 .m_virgo_name =
"virgo_mempool",
209 .m_virgo_owner = THIS_MODULE,
210 .m_virgo_ops = &virgo_mempool_ops
220 static struct socket *sock;
238 int parameterIsExecutable=2;
239 struct file* file_stdout;
241 void print_buffer(
char*);
242 int tokenize_list_of_ip_addrs(
char* buf);
243 void read_virgo_config();
244 int kernel_space_func(
void* args);
245 char* strip_control_M(
char*);
247 int virgo_mempool_client_thread(
void* args);
248 char* toAddressString(
char* ptr);
250 char* generate_logical_timestamp(
void);
254 int next_vtable_entry=0;
256 extern int virgo_cloud_test_kernelspace(
void* args);
266 int use_as_kingcobra_service=1;
277 int EventNet_timestamp=0;
278 int machine_timestamp=1;
279 int other_timestamp_cloudservice=0;