1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Intel MIC Platform Software Stack (MPSS)
5 * Copyright(c) 2013 Intel Corporation.
7 * Intel MIC User Space Tools.
24 #include <sys/ioctl.h>
26 #include <sys/types.h>
27 #include <sys/socket.h>
30 #include <sys/utsname.h>
32 #include <netinet/in.h>
33 #include <arpa/inet.h>
40 #include <linux/if_tun.h>
41 #include <linux/virtio_ids.h>
43 #define MICSYSFSDIR "/sys/class/mic"
44 #define LOGFILE_NAME "/var/log/mpssd"
45 #define PAGE_SIZE 4096
47 struct mic_console_info
{
48 pthread_t console_thread
;
49 int virtio_console_fd
;
60 struct mic_virtblk_info
{
61 pthread_t block_thread
;
64 volatile sig_atomic_t signaled
;
74 pthread_t config_thread
;
75 pthread_t init_thread
;
77 struct mic_console_info mic_console
;
78 struct mic_net_info mic_net
;
79 struct mic_virtblk_info mic_virtblk
;
82 struct mic_info
*next
;
85 __attribute__((format(printf
, 1, 2)))
86 void mpsslog(char *format
, ...);
87 char *readsysfs(char *dir
, char *entry
);
88 int setsysfs(char *dir
, char *entry
, char *value
);