]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: add tipc_bearer_min_mtu to calculate min mtu
authorXin Long <lucien.xin@gmail.com>
Sun, 14 May 2023 19:52:27 +0000 (15:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:32:45 +0000 (17:32 +0100)
commitd6f5552877e0e4687ea9eb88304e7299865f20d9
treee175b23be77dbba62aebf903fbd2461284bff04e
parent2a1ff18b85ea2d693bb5da7bd0e53cba957fcec5
tipc: add tipc_bearer_min_mtu to calculate min mtu

[ Upstream commit 3ae6d66b605be604644d4bb5708a7ffd9cf1abe8 ]

As different media may requires different min mtu, and even the
same media with different net family requires different min mtu,
add tipc_bearer_min_mtu() to calculate min mtu accordingly.

This API will be used to check the new mtu when doing the link
mtu negotiation in the next patch.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 56077b56cd3f ("tipc: do not update mtu if msg_max is too small in mtu negotiation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tipc/bearer.c
net/tipc/bearer.h
net/tipc/udp_media.c