- 论坛徽章:
- 0
|
- struct inet_timewait_sock *tw = NULL;
- const struct inet_connection_sock *icsk = inet_csk(sk);
- const struct tcp_sock *tp = tcp_sk(sk);
- int recycle_ok = 0;
- if (tcp_death_row.sysctl_tw_recycle && tp->rx_opt.ts_recent_stamp)
- recycle_ok = icsk->icsk_af_ops->remember_stamp(sk);
- if (tcp_death_row.tw_count < tcp_death_row.sysctl_max_tw_buckets)
- tw = inet_twsk_alloc(sk, state);
- if (tw != NULL) {
- ......
- ......
- ......
- } else {
- /* Sorry, if we're out of memory, just CLOSE this
- * socket up. We've got bigger problems than
- * non-graceful socket closings.
- */
- LIMIT_NETDEBUG(KERN_INFO "TCP: time wait bucket table overflow\n");
- }
复制代码
- struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int state)
- {
- struct inet_timewait_sock *tw =
- kmem_cache_alloc(sk->sk_prot_creator->twsk_prot->twsk_slab,
- GFP_ATOMIC);
- if (tw != NULL) {
- ......
- ......
- ......
- }
- return tw;
- }
复制代码 综上分析,几种可能导致提示这句话:
1、在 tcp_death_row.tw_count >= tcp_death_row.sysctl_max_tw_buckets 的情况下
2、在调用 kmem_cache_alloc 分配 tw 错误的情况下
估计你的情况是由于 “1” 导致的
尝试用 sysctl 增大 net.ipv4.tcp_max_tw_buckets 试试 |
|