]> git.baikalelectronics.ru Git - kernel.git/commit
net: support 64bit rates for getsockopt(SO_MAX_PACING_RATE)
authorEric Dumazet <edumazet@google.com>
Thu, 28 Feb 2019 23:17:28 +0000 (15:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Mar 2019 07:08:30 +0000 (23:08 -0800)
commit4e4e14803a4bb0aeae92e0b7196d77920fbc6640
treeee7160784b8e3eca7187baa41bc586debd9c7143
parentb1a34b72d209b8c08ee017633b7f9e2ed5ee4f3a
net: support 64bit rates for getsockopt(SO_MAX_PACING_RATE)

For legacy applications using 32bit variable, SO_MAX_PACING_RATE
has to cap the returned value to 0xFFFFFFFF, meaning that
rates above 34.35 Gbit are capped.

This patch allows applications to read socket pacing rate
at full resolution, if they provide a 64bit variable to store it,
and the kernel is 64bit.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c