lkml.org 
[lkml]   [2023]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH AUTOSEL 6.1 30/57] tipc: add tipc_bearer_min_mtu to calculate min mtu
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
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-06-16 21:29    [W:0.168 / U:1.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site