Hi!
From: Xin Long lucien.xin@gmail.com
[ 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.
Ok, but we don't have the next patch queued with the AUTOSEL, so do we need this?
+++ b/net/tipc/bearer.c @@ -541,6 +541,19 @@ int tipc_bearer_mtu(struct net *net, u32 bearer_id) return mtu; } +int tipc_bearer_min_mtu(struct net *net, u32 bearer_id) +{
- int mtu = TIPC_MIN_BEARER_MTU;
- struct tipc_bearer *b;
- rcu_read_lock();
- b = bearer_get(net, bearer_id);
- if (b)
mtu += b->encap_hlen;
- rcu_read_unlock();
- return mtu;
+}
AFAICT this function is unused.
Best regards, Pavel