mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
lxip: configure thash/uhash entries to 2048
The number of hash entries for TCP/UDP corresponds to the number of sockets managed by the stack. In case there are more sockets than entries available, buckets will be created to compensate for the lack of space. The default values for TCP (524288) and UDP (65536) are meant for the in kernel that manages all sockets of the user land and leads to very large hash table allocations (>20MB) during initialization. Since on Genode a component has its own instance of the IP stack or uses the VFS server, we do not need these kind of large default settings. issue #2181
This commit is contained in:
parent
c4679e7af6
commit
68ac1347b9
@ -316,7 +316,6 @@ DUMMY(-1, kobject_put)
|
||||
DUMMY(-1, kobject_uevent)
|
||||
DUMMY(-1, krealloc)
|
||||
DUMMY(-1, kstrdup)
|
||||
DUMMY(-1, kstrtoul)
|
||||
DUMMY(-1, ktime_equal)
|
||||
DUMMY(-1, ktime_to_timespec)
|
||||
DUMMY(-1, ktime_to_timeval)
|
||||
|
@ -485,6 +485,15 @@ void late_ip_auto_config(void);
|
||||
void late_tcp_congestion_default(void);
|
||||
|
||||
|
||||
int __set_thash_entries(char *str);
|
||||
int __set_uhash_entries(char *str);
|
||||
|
||||
static void lxip_kernel_params(void)
|
||||
{
|
||||
__set_thash_entries("2048");
|
||||
__set_uhash_entries("2048");
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize sub-systems
|
||||
*/
|
||||
@ -498,6 +507,8 @@ void lxip_init()
|
||||
|
||||
/* sub-systems */
|
||||
subsys_net_dev_init();
|
||||
|
||||
lxip_kernel_params();
|
||||
fs_inet_init();
|
||||
|
||||
/* enable local accepts */
|
||||
|
@ -660,3 +660,12 @@ int schedule_delayed_work(struct delayed_work *dwork, unsigned long delay)
|
||||
{
|
||||
return mod_delayed_work(0, dwork, delay);
|
||||
}
|
||||
|
||||
|
||||
int kstrtoul(const char *s, unsigned int base, unsigned long *res)
|
||||
{
|
||||
unsigned long val = 0;
|
||||
Genode::ascii_to(s, val);
|
||||
*res = val;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user