net: ip: Allow user to select number of network contexts
The network context is similar concept as network socket. Depending on application use, the number of contexts can be now tweaked. Default value is now 2, it was 5 earlier. Using the lower number saves 241 bytes of memory. Change-Id: I6e2a9f053c8c63163af6d6175783233f67553ae9 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
81671f793d
commit
e56f701a04
2 changed files with 11 additions and 1 deletions
|
@ -71,6 +71,14 @@ config IP_TIMER_STACK_SIZE
|
|||
responsible for handling re-transmissions and periodic network
|
||||
packet sending like IPv6 router solicitations.
|
||||
|
||||
config NET_MAX_CONTEXTS
|
||||
int "How many network context to use"
|
||||
default 2
|
||||
help
|
||||
The network context is similar concept as network socket.
|
||||
It defines a network endpoint and number of context depends
|
||||
on application usage.
|
||||
|
||||
choice
|
||||
prompt "Internet Protocol version"
|
||||
depends on NETWORKING
|
||||
|
|
|
@ -80,7 +80,9 @@ struct net_context {
|
|||
};
|
||||
|
||||
/* Override this in makefile if needed */
|
||||
#ifndef NET_MAX_CONTEXT
|
||||
#if defined(CONFIG_NET_MAX_CONTEXTS)
|
||||
#define NET_MAX_CONTEXT CONFIG_NET_MAX_CONTEXTS
|
||||
#else
|
||||
#define NET_MAX_CONTEXT 5
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue