4 * Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License 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 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18 * The full GNU General Public License is included in this distribution
19 * in the file called LICENSE.GPL.
21 * Contact Information:
30 #include <linux/wait.h>
31 #include <linux/sched.h>
32 #include <linux/netdevice.h>
33 #include <linux/spinlock.h>
34 #include <linux/list.h>
36 #define KNI_KTHREAD_RESCHEDULE_INTERVAL 10 /* us */
39 * A structure describing the private information for a kni device.
43 struct list_head list;
45 struct net_device_stats stats;
49 /* wait queue for req/resp */
51 struct mutex sync_lock;
57 struct net_device *net_dev;
58 struct net_device *lad_dev;
59 struct pci_dev *pci_dev;
61 /* queue for packets to be sent out */
64 /* queue for the packets received */
67 /* queue for the allocated mbufs those can be used to save sk buffs */
70 /* free queue for the mbufs to be freed */
88 /* synchro for request processing */
89 unsigned long synchro;
94 #define KNI_ERR(args...) printk(KERN_DEBUG "KNI: Error: " args)
95 #define KNI_PRINT(args...) printk(KERN_DEBUG "KNI: " args)
97 #define KNI_DBG(args...) printk(KERN_DEBUG "KNI: " args)
99 #define KNI_DBG(args...)