2 * Intel MIC Platform Software Stack (MPSS)
4 * Copyright(c) 2013 Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, version 2, as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * The full GNU General Public License is included in this distribution in
16 * the file called "COPYING".
18 * Intel MIC User Space Tools.
35 #include <sys/ioctl.h>
37 #include <sys/types.h>
38 #include <sys/socket.h>
40 #include <sys/types.h>
42 #include <sys/utsname.h>
44 #include <netinet/in.h>
45 #include <arpa/inet.h>
53 #include <linux/if_tun.h>
54 #include <linux/if_tun.h>
55 #include <linux/virtio_ids.h>
57 #define MICSYSFSDIR "/sys/class/mic"
58 #define LOGFILE_NAME "/var/log/mpssd"
59 #define PAGE_SIZE 4096
61 struct mic_console_info
{
62 pthread_t console_thread
;
63 int virtio_console_fd
;
74 struct mic_virtblk_info
{
75 pthread_t block_thread
;
78 volatile sig_atomic_t signaled
;
88 pthread_t config_thread
;
89 pthread_t init_thread
;
91 struct mic_console_info mic_console
;
92 struct mic_net_info mic_net
;
93 struct mic_virtblk_info mic_virtblk
;
96 struct mic_info
*next
;
99 __attribute__((format(printf
, 1, 2)))
100 void mpsslog(char *format
, ...);
101 char *readsysfs(char *dir
, char *entry
);
102 int setsysfs(char *dir
, char *entry
, char *value
);