tcp_hashinfo.port_rover = sysctl_local_port_range[0] - 1; 
void __init tcp_init(void){	struct sk_buff *skb = NULL;	int order, i;	if (sizeof(struct tcp_skb_cb) > sizeof(skb->cb))		__skb_cb_too_small_for_tcp(sizeof(struct tcp_skb_cb),					   sizeof(skb->cb));	tcp_hashinfo.bind_bucket_cachep =		kmem_cache_create("tcp_bind_bucket",				  sizeof(struct inet_bind_bucket), 0,				  SLAB_HWCACHE_ALIGN, NULL, NULL);	if (!tcp_hashinfo.bind_bucket_cachep)		panic("tcp_init: Cannot alloc tcp_bind_bucket cache.");	/* Size and allocate the main established and bind bucket	 * hash tables.	 *	 * The methodology is similar to that of the buffer cache.	 */	tcp_hashinfo.ehash =		alloc_large_system_hash("TCP established",					sizeof(struct inet_ehash_bucket),					thash_entries,					(num_physpages >= 128 * 1024) ?						(25 - PAGE_SHIFT) :						(27 - PAGE_SHIFT),					HASH_HIGHMEM,					&tcp_hashinfo.ehash_size,					NULL,					0);	tcp_hashinfo.ehash_size = (1 << tcp_hashinfo.ehash_size) >> 1;	for (i = 0; i < (tcp_hashinfo.ehash_size << 1); i++) {		rwlock_init(&tcp_hashinfo.ehash[i].lock);		INIT_HLIST_HEAD(&tcp_hashinfo.ehash[i].chain);	}	tcp_hashinfo.bhash =		alloc_large_system_hash("TCP bind",					sizeof(struct inet_bind_hashbucket),					tcp_hashinfo.ehash_size,					(num_physpages >= 128 * 1024) ?						(25 - PAGE_SHIFT) :						(27 - PAGE_SHIFT),					HASH_HIGHMEM,					&tcp_hashinfo.bhash_size,					NULL,					64 * 1024);	tcp_hashinfo.bhash_size = 1 << tcp_hashinfo.bhash_size;	for (i = 0; i < tcp_hashinfo.bhash_size; i++) {		spin_lock_init(&tcp_hashinfo.bhash[i].lock);		INIT_HLIST_HEAD(&tcp_hashinfo.bhash[i].chain);	}	/* Try to be a bit smarter and adjust defaults depending	 * on available memory.	 */	for (order = 0; ((1 << order) << PAGE_SHIFT) <			(tcp_hashinfo.bhash_size * sizeof(struct inet_bind_hashbucket));			order++)		;	if (order >= 4) {		sysctl_local_port_range[0] = 32768;		sysctl_local_port_range[1] = 61000;		tcp_death_row.sysctl_max_tw_buckets = 180000;		sysctl_tcp_max_orphans = 4096 << (order - 4);		sysctl_max_syn_backlog = 1024;	} else if (order < 3) {		sysctl_local_port_range[0] = 1024 * (3 - order);		tcp_death_row.sysctl_max_tw_buckets >>= (3 - order);		sysctl_tcp_max_orphans >>= (3 - order);		sysctl_max_syn_backlog = 128;	}	tcp_hashinfo.port_rover = sysctl_local_port_range[0] - 1;	sysctl_tcp_mem[0] =  768 << order;	sysctl_tcp_mem[1] = 1024 << order;	sysctl_tcp_mem[2] = 1536 << order;	if (order < 3) {		sysctl_tcp_wmem[2] = 64 * 1024;		sysctl_tcp_rmem[0] = PAGE_SIZE;		sysctl_tcp_rmem[1] = 43689;		sysctl_tcp_rmem[2] = 2 * 43689;	}	printk(KERN_INFO "TCP: Hash tables configured "	       "(established %d bind %d)\n",	       tcp_hashinfo.ehash_size << 1, tcp_hashinfo.bhash_size);	tcp_register_congestion_control(&tcp_reno);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6df716340da3a6fdd33d73d7ed4c6f7590ca1c42/tcp.c/clean/net/ipv4/tcp.c