net: add a couple of helpers for iph tot_len
authorXin Long <lucien.xin@gmail.com>
Sat, 28 Jan 2023 15:58:30 +0000 (10:58 -0500)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Feb 2023 04:54:27 +0000 (20:54 -0800)
commit058a8f7f73aae1cc22b53fcefec031b9e391b54d
tree84e3a78af92605ddbc9897dd46432d5c18d1696b
parentd8673afbf51036ed1d72d9828d0d679035bb0d54
net: add a couple of helpers for iph tot_len

This patch adds three APIs to replace the iph->tot_len setting
and getting in all places where IPv4 BIG TCP packets may reach,
they will be used in the following patches.

Note that iph_totlen() will be used when iph is not in linear
data of the skb.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/ip.h
include/net/route.h