]> git.baikalelectronics.ru Git - kernel.git/commit
soreuseport: use "unsigned int" in __reuseport_alloc()
authorAlexey Dobriyan <adobriyan@gmail.com>
Sun, 2 Apr 2017 22:18:23 +0000 (01:18 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Apr 2017 02:06:38 +0000 (19:06 -0700)
commit8a2876df42c5904d7175f829b8764e72a06cd87e
treeac00cc5d4dd56f60a8934e708009d8836387a36c
parentcd63794b70ec87da58ecf8da0880691321011be3
soreuseport: use "unsigned int" in __reuseport_alloc()

Number of sockets is limited by 16-bit, so 64-bit allocation will never
happen.

16-bit ops are the worst code density-wise on x86_64 because of
additional prefix (66).

Space savings:

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3 (-3)
function                                     old     new   delta
reuseport_add_sock                           539     536      -3

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock_reuseport.c