]> git.baikalelectronics.ru Git - kernel.git/commit
net: do not read sk_drops if application does not care
authorEric Dumazet <edumazet@google.com>
Wed, 7 Dec 2016 18:05:36 +0000 (10:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Dec 2016 18:30:22 +0000 (13:30 -0500)
commit03d290be5970d45d5d88766973749c8a39323ebb
treebfa286eca8f2807aa35c241507e05955884379b2
parente4f5a5363ff9861e15dc6d5e00ac992cfb9ef70f
net: do not read sk_drops if application does not care

sk_drops can be an often written field, do not read it unless
application showed interest.

Note that sk_drops can be read via inet_diag, so applications
can avoid getting this info from every received packet.

In the future, 'reading' sk_drops might require folding per node or per
cpu fields, and thus become even more expensive than today.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h