Commit bf4d8485 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/home/davem/BK/net-2.5

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents 16ab3306 d2c4a075
......@@ -1211,7 +1211,7 @@ static int tg3_fiber_aneg_smachine(struct tg3 *tp,
if (ap->rxconfig & ANEG_CFG_FD)
ap->flags |= MR_LP_ADV_FULL_DUPLEX;
if (ap->rxconfig & ANEG_CFG_HD)
ap->flags |= MR_LP_ADV_FULL_DUPLEX;
ap->flags |= MR_LP_ADV_HALF_DUPLEX;
if (ap->rxconfig & ANEG_CFG_PS1)
ap->flags |= MR_LP_ADV_SYM_PAUSE;
if (ap->rxconfig & ANEG_CFG_PS2)
......
......@@ -110,6 +110,10 @@ struct rt_cache_stat
unsigned int out_hit;
unsigned int out_slow_tot;
unsigned int out_slow_mc;
unsigned int gc_total;
unsigned int gc_ignored;
unsigned int gc_goal_miss;
unsigned int gc_dst_overflow;
} ____cacheline_aligned_in_smp;
extern struct ip_rt_acct *ip_rt_acct;
......
......@@ -29,7 +29,7 @@
* Specify, after how many clock ticks (intel: 100 per second) the queue
* should be flushed even if it is not full yet.
*
* ipt_ULOG.c,v 1.15 2002/01/18 21:33:19 laforge Exp
* ipt_ULOG.c,v 1.18 2002/04/16 07:33:00 laforge Exp
*/
#include <linux/module.h>
......@@ -339,10 +339,28 @@ static int __init init(void)
static void __exit fini(void)
{
ulog_buff_t *ub;
int i;
DEBUGP("ipt_ULOG: cleanup_module\n");
ipt_unregister_target(&ipt_ulog_reg);
sock_release(nflognl->socket);
/* remove pending timers and free allocated skb's */
for (i = 0; i < ULOG_MAXNLGROUPS; i++) {
ub = &ulog_buffers[i];
if (timer_pending(&ub->timer)) {
DEBUGP("timer was pending, deleting\n");
del_timer(&ub->timer);
}
if (ub->skb) {
kfree_skb(ub->skb);
ub->skb = NULL;
}
}
}
module_init(init);
......
......@@ -286,7 +286,7 @@ static int rt_cache_stat_get_info(char *buffer, char **start, off_t offset, int
for (lcpu = 0; lcpu < smp_num_cpus; lcpu++) {
i = cpu_logical_map(lcpu);
len += sprintf(buffer+len, "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n",
len += sprintf(buffer+len, "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x \n",
dst_entries,
rt_cache_stat[i].in_hit,
rt_cache_stat[i].in_slow_tot,
......@@ -298,7 +298,13 @@ static int rt_cache_stat_get_info(char *buffer, char **start, off_t offset, int
rt_cache_stat[i].out_hit,
rt_cache_stat[i].out_slow_tot,
rt_cache_stat[i].out_slow_mc
rt_cache_stat[i].out_slow_mc,
rt_cache_stat[i].gc_total,
rt_cache_stat[i].gc_ignored,
rt_cache_stat[i].gc_goal_miss,
rt_cache_stat[i].gc_dst_overflow
);
}
len -= offset;
......@@ -499,9 +505,14 @@ static int rt_garbage_collect(void)
* Garbage collection is pretty expensive,
* do not make it too frequently.
*/
rt_cache_stat[smp_processor_id()].gc_total++;
if (now - last_gc < ip_rt_gc_min_interval &&
atomic_read(&ipv4_dst_ops.entries) < ip_rt_max_size)
atomic_read(&ipv4_dst_ops.entries) < ip_rt_max_size) {
rt_cache_stat[smp_processor_id()].gc_ignored++;
goto out;
}
/* Calculate number of entries, which we want to expire now. */
goal = atomic_read(&ipv4_dst_ops.entries) -
......@@ -567,6 +578,8 @@ static int rt_garbage_collect(void)
We will not spin here for long time in any case.
*/
rt_cache_stat[smp_processor_id()].gc_goal_miss++;
if (expire == 0)
break;
......@@ -584,6 +597,7 @@ static int rt_garbage_collect(void)
goto out;
if (net_ratelimit())
printk(KERN_WARNING "dst cache overflow\n");
rt_cache_stat[smp_processor_id()].gc_dst_overflow++;
return 1;
work_done:
......
This diff is collapsed.
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