Commit f194a1ee authored by David S. Miller's avatar David S. Miller

Merge davem@nuts.ninka.net:/disk1/davem/BK/net-2.5

into hera.kernel.org:/home/davem/BK/net-2.5
parents 0db87bc9 4a32b9e7
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/cpumask.h>
#include <net/flow.h> #include <net/flow.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
...@@ -65,7 +66,7 @@ static struct timer_list flow_hash_rnd_timer; ...@@ -65,7 +66,7 @@ static struct timer_list flow_hash_rnd_timer;
struct flow_flush_info { struct flow_flush_info {
atomic_t cpuleft; atomic_t cpuleft;
unsigned long cpumap; cpumask_t cpumap;
struct completion completion; struct completion completion;
}; };
static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL }; static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL };
...@@ -73,7 +74,7 @@ static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL }; ...@@ -73,7 +74,7 @@ static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL };
#define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu)) #define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu))
static DECLARE_MUTEX(flow_cache_cpu_sem); static DECLARE_MUTEX(flow_cache_cpu_sem);
static unsigned long flow_cache_cpu_map; static cpumask_t flow_cache_cpu_map;
static unsigned int flow_cache_cpu_count; static unsigned int flow_cache_cpu_count;
static void flow_cache_new_hashrnd(unsigned long arg) static void flow_cache_new_hashrnd(unsigned long arg)
...@@ -81,7 +82,7 @@ static void flow_cache_new_hashrnd(unsigned long arg) ...@@ -81,7 +82,7 @@ static void flow_cache_new_hashrnd(unsigned long arg)
int i; int i;
for (i = 0; i < NR_CPUS; i++) for (i = 0; i < NR_CPUS; i++)
if (test_bit(i, &flow_cache_cpu_map)) if (cpu_isset(i, flow_cache_cpu_map))
flow_hash_rnd_recalc(i) = 1; flow_hash_rnd_recalc(i) = 1;
flow_hash_rnd_timer.expires = jiffies + FLOW_HASH_RND_PERIOD; flow_hash_rnd_timer.expires = jiffies + FLOW_HASH_RND_PERIOD;
...@@ -178,7 +179,7 @@ void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir, ...@@ -178,7 +179,7 @@ void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir,
cpu = smp_processor_id(); cpu = smp_processor_id();
fle = NULL; fle = NULL;
if (!test_bit(cpu, &flow_cache_cpu_map)) if (!cpu_isset(cpu, flow_cache_cpu_map))
goto nocache; goto nocache;
if (flow_hash_rnd_recalc(cpu)) if (flow_hash_rnd_recalc(cpu))
...@@ -277,7 +278,7 @@ static void flow_cache_flush_per_cpu(void *data) ...@@ -277,7 +278,7 @@ static void flow_cache_flush_per_cpu(void *data)
struct tasklet_struct *tasklet; struct tasklet_struct *tasklet;
cpu = smp_processor_id(); cpu = smp_processor_id();
if (!test_bit(cpu, &info->cpumap)) if (!cpu_isset(cpu, info->cpumap))
return; return;
tasklet = flow_flush_tasklet(cpu); tasklet = flow_flush_tasklet(cpu);
...@@ -301,7 +302,7 @@ void flow_cache_flush(void) ...@@ -301,7 +302,7 @@ void flow_cache_flush(void)
local_bh_disable(); local_bh_disable();
smp_call_function(flow_cache_flush_per_cpu, &info, 1, 0); smp_call_function(flow_cache_flush_per_cpu, &info, 1, 0);
if (test_bit(smp_processor_id(), &info.cpumap)) if (cpu_isset(smp_processor_id(), info.cpumap))
flow_cache_flush_tasklet((unsigned long)&info); flow_cache_flush_tasklet((unsigned long)&info);
local_bh_enable(); local_bh_enable();
...@@ -341,7 +342,7 @@ static int __devinit flow_cache_cpu_prepare(int cpu) ...@@ -341,7 +342,7 @@ static int __devinit flow_cache_cpu_prepare(int cpu)
static int __devinit flow_cache_cpu_online(int cpu) static int __devinit flow_cache_cpu_online(int cpu)
{ {
down(&flow_cache_cpu_sem); down(&flow_cache_cpu_sem);
set_bit(cpu, &flow_cache_cpu_map); cpu_set(cpu, flow_cache_cpu_map);
flow_cache_cpu_count++; flow_cache_cpu_count++;
up(&flow_cache_cpu_sem); up(&flow_cache_cpu_sem);
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/jhash.h> #include <linux/jhash.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/times.h>
#include <net/icmp.h> #include <net/icmp.h>
#include <net/tcp.h> #include <net/tcp.h>
...@@ -2490,7 +2491,7 @@ static void get_openreq4(struct sock *sk, struct open_request *req, ...@@ -2490,7 +2491,7 @@ static void get_openreq4(struct sock *sk, struct open_request *req,
TCP_SYN_RECV, TCP_SYN_RECV,
0, 0, /* could print option size, but that is af dependent. */ 0, 0, /* could print option size, but that is af dependent. */
1, /* timers active (only the expire timer) */ 1, /* timers active (only the expire timer) */
ttd, jiffies_to_clock_t(ttd),
req->retrans, req->retrans,
uid, uid,
0, /* non standard timer */ 0, /* non standard timer */
...@@ -2528,7 +2529,8 @@ static void get_tcp4_sock(struct sock *sp, char *tmpbuf, int i) ...@@ -2528,7 +2529,8 @@ static void get_tcp4_sock(struct sock *sp, char *tmpbuf, int i)
"%08X %5d %8d %lu %d %p %u %u %u %u %d", "%08X %5d %8d %lu %d %p %u %u %u %u %d",
i, src, srcp, dest, destp, sp->sk_state, i, src, srcp, dest, destp, sp->sk_state,
tp->write_seq - tp->snd_una, tp->rcv_nxt - tp->copied_seq, tp->write_seq - tp->snd_una, tp->rcv_nxt - tp->copied_seq,
timer_active, timer_expires - jiffies, timer_active,
jiffies_to_clock_t(timer_expires - jiffies),
tp->retransmits, tp->retransmits,
sock_i_uid(sp), sock_i_uid(sp),
tp->probes_out, tp->probes_out,
...@@ -2556,7 +2558,7 @@ static void get_timewait4_sock(struct tcp_tw_bucket *tw, char *tmpbuf, int i) ...@@ -2556,7 +2558,7 @@ static void get_timewait4_sock(struct tcp_tw_bucket *tw, char *tmpbuf, int i)
sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X" sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08X %08X %5d %8d %d %d %p", " %02X %08X:%08X %02X:%08X %08X %5d %8d %d %d %p",
i, src, srcp, dest, destp, tw->tw_substate, 0, 0, i, src, srcp, dest, destp, tw->tw_substate, 0, 0,
3, ttd, 0, 0, 0, 0, 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
atomic_read(&tw->tw_refcnt), tw); atomic_read(&tw->tw_refcnt), tw);
} }
......
...@@ -571,15 +571,6 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) ...@@ -571,15 +571,6 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
ifp->dead = 1; ifp->dead = 1;
#ifdef CONFIG_IPV6_PRIVACY
spin_lock_bh(&ifp->lock);
if (ifp->ifpub) {
__in6_ifa_put(ifp->ifpub);
ifp->ifpub = NULL;
}
spin_unlock_bh(&ifp->lock);
#endif
write_lock_bh(&addrconf_hash_lock); write_lock_bh(&addrconf_hash_lock);
for (ifap = &inet6_addr_lst[hash]; (ifa=*ifap) != NULL; for (ifap = &inet6_addr_lst[hash]; (ifa=*ifap) != NULL;
ifap = &ifa->lst_next) { ifap = &ifa->lst_next) {
...@@ -600,7 +591,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) ...@@ -600,7 +591,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
if (ifa == ifp) { if (ifa == ifp) {
*ifap = ifa->tmp_next; *ifap = ifa->tmp_next;
if (ifp->ifpub) { if (ifp->ifpub) {
__in6_ifa_put(ifp->ifpub); in6_ifa_put(ifp->ifpub);
ifp->ifpub = NULL; ifp->ifpub = NULL;
} }
__in6_ifa_put(ifp); __in6_ifa_put(ifp);
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/jhash.h> #include <linux/jhash.h>
#include <linux/ipsec.h> #include <linux/ipsec.h>
#include <linux/times.h>
#include <linux/ipv6.h> #include <linux/ipv6.h>
#include <linux/icmpv6.h> #include <linux/icmpv6.h>
...@@ -1941,7 +1942,7 @@ static void get_openreq6(struct seq_file *seq, ...@@ -1941,7 +1942,7 @@ static void get_openreq6(struct seq_file *seq,
TCP_SYN_RECV, TCP_SYN_RECV,
0,0, /* could print option size, but that is af dependent. */ 0,0, /* could print option size, but that is af dependent. */
1, /* timers active (only the expire timer) */ 1, /* timers active (only the expire timer) */
ttd, jiffies_to_clock_t(ttd),
req->retrans, req->retrans,
uid, uid,
0, /* non standard timer */ 0, /* non standard timer */
...@@ -1987,7 +1988,8 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) ...@@ -1987,7 +1988,8 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
dest->s6_addr32[2], dest->s6_addr32[3], destp, dest->s6_addr32[2], dest->s6_addr32[3], destp,
sp->sk_state, sp->sk_state,
tp->write_seq-tp->snd_una, tp->rcv_nxt-tp->copied_seq, tp->write_seq-tp->snd_una, tp->rcv_nxt-tp->copied_seq,
timer_active, timer_expires-jiffies, timer_active,
jiffies_to_clock_t(timer_expires - jiffies),
tp->retransmits, tp->retransmits,
sock_i_uid(sp), sock_i_uid(sp),
tp->probes_out, tp->probes_out,
...@@ -2022,7 +2024,7 @@ static void get_timewait6_sock(struct seq_file *seq, ...@@ -2022,7 +2024,7 @@ static void get_timewait6_sock(struct seq_file *seq,
dest->s6_addr32[0], dest->s6_addr32[1], dest->s6_addr32[0], dest->s6_addr32[1],
dest->s6_addr32[2], dest->s6_addr32[3], destp, dest->s6_addr32[2], dest->s6_addr32[3], destp,
tw->tw_substate, 0, 0, tw->tw_substate, 0, 0,
3, ttd, 0, 0, 0, 0, 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
atomic_read(&tw->tw_refcnt), tw); atomic_read(&tw->tw_refcnt), tw);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment