mirror of
https://github.com/schoebel/mars
synced 2025-01-12 01:29:50 +00:00
net: make TOS / DSCP compile time configurable
This commit is contained in:
parent
734df921d8
commit
1615dbf538
@ -105,6 +105,15 @@ config MARS_SEPARATE_PORTS
|
||||
If unsure, say Y.
|
||||
|
||||
|
||||
config MARS_IPv4_TOS
|
||||
bool "use TOS / DSCP in IPv4"
|
||||
depends on MARS_SEPARATE_PORTS
|
||||
default y
|
||||
---help---
|
||||
Tag IP traffic differently for different ports.
|
||||
In certain private networks, this can improve certain
|
||||
network bottlenecks.
|
||||
|
||||
config MARS_MEM_RETRY
|
||||
bool "make MARS memory allocation more robust"
|
||||
depends on MARS
|
||||
|
@ -189,7 +189,9 @@ void _set_socketopts(struct socket *sock, struct mars_tcp_params *params)
|
||||
sock->sk->sk_reuse = 1;
|
||||
_setsockopt(sock, SOL_SOCKET, SO_SNDBUFFORCE, params->tcp_window_size);
|
||||
_setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE, params->tcp_window_size);
|
||||
#ifdef CONFIG_MARS_IPv4_TOS
|
||||
_setsockopt(sock, SOL_IP, IP_TOS, params->ip_tos);
|
||||
#endif
|
||||
_setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, params->tcp_nodelay);
|
||||
_setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, x_true);
|
||||
_setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, params->tcp_keepcnt);
|
||||
|
Loading…
Reference in New Issue
Block a user