tcp: Introduce optional per-netns ehash.
[platform/kernel/linux-starfive.git] / Documentation / networking / ip-sysctl.rst
index a759872..e7b3fa7 100644 (file)
@@ -1040,6 +1040,35 @@ tcp_challenge_ack_limit - INTEGER
        TCP stack implements per TCP socket limits anyway.
        Default: INT_MAX (unlimited)
 
+tcp_ehash_entries - INTEGER
+       Show the number of hash buckets for TCP sockets in the current
+       networking namespace.
+
+       A negative value means the networking namespace does not own its
+       hash buckets and shares the initial networking namespace's one.
+
+tcp_child_ehash_entries - INTEGER
+       Control the number of hash buckets for TCP sockets in the child
+       networking namespace, which must be set before clone() or unshare().
+
+       If the value is not 0, the kernel uses a value rounded up to 2^n
+       as the actual hash bucket size.  0 is a special value, meaning
+       the child networking namespace will share the initial networking
+       namespace's hash buckets.
+
+       Note that the child will use the global one in case the kernel
+       fails to allocate enough memory.  In addition, the global hash
+       buckets are spread over available NUMA nodes, but the allocation
+       of the child hash table depends on the current process's NUMA
+       policy, which could result in performance differences.
+
+       Note also that the default value of tcp_max_tw_buckets and
+       tcp_max_syn_backlog depend on the hash bucket size.
+
+       Possible values: 0, 2^n (n: 0 - 24 (16Mi))
+
+       Default: 0
+
 UDP variables
 =============