Re: [PATCH AUTOSEL 6.1 30/57] tipc: add tipc_bearer_min_mtu to calculate min mtu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> From: Xin Long <lucien.xin@xxxxxxxxx>
> 
> [ 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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux