【发布时间】:2012-04-23 11:59:09
【问题描述】:
我在 tcp_cubic.c 中包含了以下 printk 语句
static u32 bictcp_recalc_ssthresh(struct sock *sk)
{
..
if (tp->snd_cwnd < ca->last_max_cwnd && fast_convergence)
ca->last_max_cwnd = (tp->snd_cwnd * (BICTCP_BETA_SCALE + beta))
/ (2 * BICTCP_BETA_SCALE);
else
ca->last_max_cwnd = tp->snd_cwnd;
ca->loss_cwnd = tp->snd_cwnd;
printk(KERN_INFO "ssthresh is %s", snd_cwnd); // <<<--- here
return max((tp->snd_cwnd * beta) / BICTCP_BETA_SCALE, 2U);
}
但它没有打印 dmesg 或 syslog 中的值。这是为什么呢?
【问题讨论】:
-
你怎么确定这个函数被调用了?在这个函数中插入一个
dumpstack()函数调用,并确保这个函数被调用
标签: c linux-kernel kernel printk