tcp: __tcp_hdrlen() helper
commiteaf3179d61514268a863cb9d50d66f6ebce1d5a0
authorCraig Gallek <kraig@google.com>
Wed, 10 Feb 2016 16:50:37 +0000 (10 11:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 13:46:15 +0000 (31 14:46 +0100)
treeab181a3007730b7128c73d93d1f09f91913bed7e
parent483217b88c632e1e510569f6aac6e914f598f21d
tcp: __tcp_hdrlen() helper

commit d9b3fca27385eafe61c3ca6feab6cb1e7dc77482 upstream.

tcp_hdrlen is wasteful if you already have a pointer to struct tcphdr.
This splits the size calculation into a helper function that can be
used if a struct tcphdr is already available.

Signed-off-by: Craig Gallek <kraig@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/tcp.h