summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2003-07-16 19:16:01 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-16 19:16:01 -0700
commitfaa3c7787357bab31158988fd5405869a3740717 (patch)
treed8db5e983fde03d824fe7085211a87f2f5213867 /include/linux
parent0b0212607c896dddb79f4866f1c42de84e3d6106 (diff)
parentfb582038943f629fea504cd5807779021f49dedd (diff)
Merge bk://kernel.bkbits.net/davem/net-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/atmdev.h4
-rw-r--r--include/linux/netdevice.h30
2 files changed, 14 insertions, 20 deletions
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index 755cf1a9c0f8..0fcfe8f1abae 100644
--- a/include/linux/atmdev.h
+++ b/include/linux/atmdev.h
@@ -252,6 +252,7 @@ enum {
ATM_VF_SESSION, /* VCC is p2mp session control descriptor */
ATM_VF_HASSAP, /* SAP has been set */
ATM_VF_CLOSE, /* asynchronous close - treat like VF_RELEASED*/
+ ATM_VF_WAITING, /* waiting for reply from sigd */
};
@@ -291,14 +292,11 @@ struct atm_vcc {
void *dev_data; /* per-device data */
void *proto_data; /* per-protocol data */
struct k_atm_aal_stats *stats; /* pointer to AAL stats group */
- wait_queue_head_t sleep; /* if socket is busy */
struct sock *sk; /* socket backpointer */
/* SVC part --- may move later ------------------------------------- */
short itf; /* interface number */
struct sockaddr_atmsvc local;
struct sockaddr_atmsvc remote;
- void (*callback)(struct atm_vcc *vcc);
- int reply; /* also used by ATMTCP */
/* Multipoint part ------------------------------------------------- */
struct atm_vcc *session; /* session VCC descriptor */
/* Other stuff ----------------------------------------------------- */
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3aef822b4493..c28c63ea442d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -29,6 +29,7 @@
#include <linux/if_ether.h>
#include <linux/if_packet.h>
#include <linux/device.h>
+#include <linux/percpu.h>
#include <asm/atomic.h>
#include <asm/cache.h>
@@ -544,10 +545,9 @@ struct softnet_data
struct sk_buff *completion_queue;
struct net_device backlog_dev; /* Sorry. 8) */
-} ____cacheline_aligned;
-
+};
-extern struct softnet_data softnet_data[NR_CPUS];
+DECLARE_PER_CPU(struct softnet_data,softnet_data);
#define HAVE_NETIF_QUEUE
@@ -555,12 +555,12 @@ static inline void __netif_schedule(struct net_device *dev)
{
if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) {
unsigned long flags;
- int cpu;
+ struct softnet_data *sd;
local_irq_save(flags);
- cpu = smp_processor_id();
- dev->next_sched = softnet_data[cpu].output_queue;
- softnet_data[cpu].output_queue = dev;
+ sd = &__get_cpu_var(softnet_data);
+ dev->next_sched = sd->output_queue;
+ sd->output_queue = dev;
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(flags);
}
@@ -605,13 +605,13 @@ static inline int netif_running(const struct net_device *dev)
static inline void dev_kfree_skb_irq(struct sk_buff *skb)
{
if (atomic_dec_and_test(&skb->users)) {
- int cpu;
+ struct softnet_data *sd;
unsigned long flags;
local_irq_save(flags);
- cpu = smp_processor_id();
- skb->next = softnet_data[cpu].completion_queue;
- softnet_data[cpu].completion_queue = skb;
+ sd = &__get_cpu_var(softnet_data);
+ skb->next = sd->completion_queue;
+ sd->completion_queue = skb;
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(flags);
}
@@ -769,12 +769,10 @@ static inline int netif_rx_schedule_prep(struct net_device *dev)
static inline void __netif_rx_schedule(struct net_device *dev)
{
unsigned long flags;
- int cpu;
local_irq_save(flags);
- cpu = smp_processor_id();
dev_hold(dev);
- list_add_tail(&dev->poll_list, &softnet_data[cpu].poll_list);
+ list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
if (dev->quota < 0)
dev->quota += dev->weight;
else
@@ -798,13 +796,11 @@ static inline int netif_rx_reschedule(struct net_device *dev, int undo)
{
if (netif_rx_schedule_prep(dev)) {
unsigned long flags;
- int cpu;
dev->quota += undo;
local_irq_save(flags);
- cpu = smp_processor_id();
- list_add_tail(&dev->poll_list, &softnet_data[cpu].poll_list);
+ list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
local_irq_restore(flags);
return 1;