/* * Intel MIC Platform Software Stack (MPSS) * * Copyright(c) 2013 Intel Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, 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. * * The full GNU General Public License is included in this distribution in * the file called "COPYING". * * Intel MIC User Space Tools. */ #ifndef _MPSSD_H_ #define _MPSSD_H_ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <dirent.h> #include <libgen.h> #include <pthread.h> #include <stdarg.h> #include <time.h> #include <errno.h> #include <sys/dir.h> #include <sys/ioctl.h> #include <sys/poll.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/mman.h> #include <sys/utsname.h> #include <sys/wait.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <pthread.h> #include <signal.h> #include <limits.h> #include <syslog.h> #include <getopt.h> #include <net/if.h> #include <linux/if_tun.h> #include <linux/if_tun.h> #include <linux/virtio_ids.h> #define MICSYSFSDIR "/sys/class/mic" #define LOGFILE_NAME "/var/log/mpssd" #define PAGE_SIZE 4096 struct mic_console_info { pthread_t console_thread; int virtio_console_fd; void *console_dp; }; struct mic_net_info { pthread_t net_thread; int virtio_net_fd; int tap_fd; void *net_dp; }; struct mic_virtblk_info { pthread_t block_thread; int virtio_block_fd; void *block_dp; volatile sig_atomic_t signaled; char *backend_file; int backend; void *backend_addr; long backend_size; }; struct mic_info { int id; char *name; pthread_t config_thread; pthread_t init_thread; pid_t pid; struct mic_console_info mic_console; struct mic_net_info mic_net; struct mic_virtblk_info mic_virtblk; int restart; int boot_on_resume; struct mic_info *next; }; __attribute__((format(printf, 1, 2))) void mpsslog(char *format, ...); char *readsysfs(char *dir, char *entry); int setsysfs(char *dir, char *entry, char *value); #endif ption value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/commit/?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>root</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>drivers</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>usb</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/dwc3?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>dwc3</a>/<a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/dwc3/dwc3-pci.c?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>dwc3-pci.c</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='id' value='d9f1f61c0801a73ff36d416a7ede54229b231e1d'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'> <tr><th>author</th><td>Sainath Grandhi <sainath.grandhi@intel.com></td><td class='right'>2017-02-10 16:03:50 -0800</td></tr> <tr><th>committer</th><td>David S. Miller <davem@davemloft.net></td><td class='right'>2017-02-11 20:59:41 -0500</td></tr> <tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/dwc3/dwc3-pci.c?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>d9f1f61c0801a73ff36d416a7ede54229b231e1d</a> (<a href='/cgit.cgi/linux/net-next.git/patch/drivers/usb/dwc3/dwc3-pci.c?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>patch</a>)</td></tr> <tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>2f9970b37ac99da534f7ca58b6b67ee880ead3cd</a> /<a href='/cgit.cgi/linux/net-next.git/tree/drivers/usb/dwc3/dwc3-pci.c?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>drivers/usb/dwc3/dwc3-pci.c</a></td></tr> <tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/drivers/usb/dwc3/dwc3-pci.c?id=6fe3faf86757eb7f078ff06b23b206f17dc4fb36'>6fe3faf86757eb7f078ff06b23b206f17dc4fb36</a> (<a href='/cgit.cgi/linux/net-next.git/diff/drivers/usb/dwc3/dwc3-pci.c?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d&id2=6fe3faf86757eb7f078ff06b23b206f17dc4fb36'>diff</a>)</td></tr></table> <div class='commit-subject'>tap: Extending tap device create/destroy APIs</div><div class='commit-msg'>Extending tap APIs get/free_minor and create/destroy_cdev to handle more than one type of virtual interface. Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> </div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=d9f1f61c0801a73ff36d416a7ede54229b231e1d'>Diffstat</a> (limited to 'drivers/usb/dwc3/dwc3-pci.c')</div><table summary='diffstat' class='diffstat'>