4 * Copyright(c) 2010-2012 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>
35 #define KNI_KTHREAD_RESCHEDULE_INTERVAL 10 /* us */
38 * A structure describing the private information for a kni device.
41 struct net_device_stats stats;
45 /* wait queue for req/resp */
47 struct mutex sync_lock;
53 struct net_device *net_dev;
54 struct net_device *lad_dev;
55 struct pci_dev *pci_dev;
57 /* queue for packets to be sent out */
60 /* queue for the packets received */
63 /* queue for the allocated mbufs those can be used to save sk buffs */
66 /* free queue for the mbufs to be freed */
84 /* synchro for request processing */
85 unsigned long synchro;
90 #define KNI_ERR(args...) printk(KERN_DEBUG "KNI: Error: " args)
91 #define KNI_PRINT(args...) printk(KERN_DEBUG "KNI: " args)
93 #define KNI_DBG(args...) printk(KERN_DEBUG "KNI: " args)
95 #define KNI_DBG(args...)