[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZIy3q/R6olw/6lNY@duo.ucw.cz>
Date: Fri, 16 Jun 2023 21:27:39 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Xin Long <lucien.xin@...il.com>, Jon Maloy <jmaloy@...hat.com>,
"David S . Miller" <davem@...emloft.net>, ying.xue@...driver.com,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH AUTOSEL 6.1 30/57] tipc: add tipc_bearer_min_mtu to
calculate min mtu
Hi!
> From: Xin Long <lucien.xin@...il.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
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists