Closed manishmatey closed 2 years ago
Hi @manishmatey,
The value for 'pcb_tcp_max' can be configured through OFP configuration file (See OFP_CONF_FILE_ENV). I see no reason not to propose a similar method for tcptw.. e.g: to permit configuration of tcptw size as value or percentage of global_param->pcb_tcp_max.
You can propose a change (pull request) with this... it will take (near) forever to be reviewed but you may have it.
At least a memory impact is expected as the computed value is used on allocation of V_tcptw_zone (that is an ODP pool). If memory is not an issue for your setup, you can enable (define) OFP_TCP_MAX_CONNECTION_RATE in ofp_config.h for the default configuration (tcptw size = pcb_tcp_max)
@bogdanPricope Thanks for the reply. I will increase TIME_WAIT buffer and proceed.
@manishmatey You may also check the NFP repo: https://github.com/NetInoSoftware/nfp NFP is a commercial version of OFP with the 'nfp' repo as 'public'/'demo' part. API is similar and has a lot of cool features (e.g DHCP IPv4 client).
Hi Team,
In OFP timewait.c file, below function is used to set number of TIME_WAIT buffers: --------------------------------- code -------------------------------------------- static int tcptw_auto_size(void) {
ifdef OFP_TCP_MAX_CONNECTION_RATE
else
endif / OFP_TCP_MAX_CONNECTION_RATE/
}
In the above code we are assigning 20% of TCP max buffers for TIME_WAIT using formula as below global_param->pcb_tcp_max / 5
Queries : 1) As we can see above TIME_WAIT buffers are dependent on TCP max buffers (global_param->pcb_tcp_max). Can we increase TIME_WAIT buffer alone using /4 (divide by 4), /3 (divide by 3) OR TCP max buffers need to be increase in order to increase TIME_WAIT buffers?
2) If we increase TCP TIME_WAIT buffers using /4(divide by 4) or /3(divide by 3) then is there any impact of this?