summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 18e7fde28..5fbcbad86 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -152,6 +152,7 @@ struct hh_cache
struct hh_cache *hh_next; /* Next entry */
atomic_t hh_refcnt; /* number of users */
unsigned short hh_type; /* protocol identifier, f.e ETH_P_IP */
+ int hh_len; /* length of header */
int (*hh_output)(struct sk_buff *skb);
rwlock_t hh_lock;
/* cached hardware header; allow for machine alignment needs. */
@@ -260,12 +261,23 @@ struct device
void *atalk_ptr; /* AppleTalk link */
void *ip_ptr; /* IPv4 specific data */
void *dn_ptr; /* DECnet specific data */
+ void *ip6_ptr; /* IPv6 specific data */
struct Qdisc *qdisc;
struct Qdisc *qdisc_sleeping;
struct Qdisc *qdisc_list;
unsigned long tx_queue_len; /* Max frames per queue allowed */
+ /* hard_start_xmit synchronizer */
+ spinlock_t xmit_lock;
+ /* cpu id of processor entered to hard_start_xmit or -1,
+ if nobody entered there.
+ */
+ int xmit_lock_owner;
+ /* device queue lock */
+ spinlock_t queue_lock;
+ atomic_t refcnt;
+
/* Pointers to interface service routines. */
int (*open)(struct device *dev);
int (*stop)(struct device *dev);
@@ -331,7 +343,7 @@ struct packet_type
extern struct device loopback_dev; /* The loopback */
extern struct device *dev_base; /* All devices */
-extern struct packet_type *ptype_base[16]; /* Hashed types */
+extern rwlock_t dev_base_lock; /* Device list lock */
extern int netdev_dropping;
extern int net_cpu_congestion;
@@ -405,7 +417,7 @@ extern __inline__ void dev_unlock_list(void)
extern __inline__ void dev_lock_wait(void)
{
while (atomic_read(&dev_lockct)) {
- current->counter = 0;
+ current->policy |= SCHED_YIELD;
schedule();
}
}