• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/ipv4/

Lines Matching defs:twdr

213 static int inet_twdr_do_twkill_work(struct inet_timewait_death_row *twdr,
230 inet_twsk_for_each_inmate(tw, node, &twdr->cells[slot]) {
232 spin_unlock(&twdr->death_lock);
233 __inet_twsk_kill(tw, twdr->hashinfo);
239 spin_lock(&twdr->death_lock);
245 /* While we dropped twdr->death_lock, another cpu may have
254 twdr->tw_count -= killed;
263 struct inet_timewait_death_row *twdr;
266 twdr = (struct inet_timewait_death_row *)data;
267 spin_lock(&twdr->death_lock);
269 if (twdr->tw_count == 0)
273 if (inet_twdr_do_twkill_work(twdr, twdr->slot)) {
274 twdr->thread_slots |= (1 << twdr->slot);
275 schedule_work(&twdr->twkill_work);
279 if (twdr->tw_count)
281 twdr->slot = ((twdr->slot + 1) & (INET_TWDR_TWKILL_SLOTS - 1));
284 mod_timer(&twdr->tw_timer, jiffies + twdr->period);
286 spin_unlock(&twdr->death_lock);
292 struct inet_timewait_death_row *twdr =
297 (sizeof(twdr->thread_slots) * 8));
299 while (twdr->thread_slots) {
300 spin_lock_bh(&twdr->death_lock);
302 if (!(twdr->thread_slots & (1 << i)))
305 while (inet_twdr_do_twkill_work(twdr, i) != 0) {
307 spin_unlock_bh(&twdr->death_lock);
309 spin_lock_bh(&twdr->death_lock);
313 twdr->thread_slots &= ~(1 << i);
315 spin_unlock_bh(&twdr->death_lock);
326 struct inet_timewait_death_row *twdr)
328 spin_lock(&twdr->death_lock);
331 if (--twdr->tw_count == 0)
332 del_timer(&twdr->tw_timer);
334 spin_unlock(&twdr->death_lock);
335 __inet_twsk_kill(tw, twdr->hashinfo);
340 struct inet_timewait_death_row *twdr,
372 spin_lock(&twdr->death_lock);
376 twdr->tw_count--;
385 slot = DIV_ROUND_UP(timeo, twdr->period);
390 slot = (twdr->slot + slot) & (INET_TWDR_TWKILL_SLOTS - 1);
391 list = &twdr->cells[slot];
395 if (twdr->twcal_hand < 0) {
396 twdr->twcal_hand = 0;
397 twdr->twcal_jiffie = jiffies;
398 twdr->twcal_timer.expires = twdr->twcal_jiffie +
400 add_timer(&twdr->twcal_timer);
402 if (time_after(twdr->twcal_timer.expires,
404 mod_timer(&twdr->twcal_timer,
406 slot = (twdr->twcal_hand + slot) & (INET_TWDR_RECYCLE_SLOTS - 1);
408 list = &twdr->twcal_row[slot];
413 if (twdr->tw_count++ == 0)
414 mod_timer(&twdr->tw_timer, jiffies + twdr->period);
415 spin_unlock(&twdr->death_lock);
421 struct inet_timewait_death_row *twdr;
428 twdr = (struct inet_timewait_death_row *)data;
430 spin_lock(&twdr->death_lock);
431 if (twdr->twcal_hand < 0)
434 slot = twdr->twcal_hand;
435 j = twdr->twcal_jiffie;
443 &twdr->twcal_row[slot]) {
445 __inet_twsk_kill(tw, twdr->hashinfo);
455 twdr->twcal_jiffie = j;
456 twdr->twcal_hand = slot;
459 if (!hlist_empty(&twdr->twcal_row[slot])) {
460 mod_timer(&twdr->twcal_timer, j);
467 twdr->twcal_hand = -1;
470 if ((twdr->tw_count -= killed) == 0)
471 del_timer(&twdr->tw_timer);
475 spin_unlock(&twdr->death_lock);
480 struct inet_timewait_death_row *twdr, int family)
508 inet_twsk_deschedule(tw, twdr);