net: Move mtu handling down to the protocol depended handlers
We move all mtu handling from dst_mtu() down to the protocol layer. So each protocol can implement the mtu handling in a different manner. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ebb762f27f
commit
618f9bc74a
5 changed files with 25 additions and 12 deletions
|
@ -205,12 +205,7 @@ dst_feature(const struct dst_entry *dst, u32 feature)
|
|||
|
||||
static inline u32 dst_mtu(const struct dst_entry *dst)
|
||||
{
|
||||
u32 mtu = dst_metric_raw(dst, RTAX_MTU);
|
||||
|
||||
if (!mtu)
|
||||
mtu = dst->ops->mtu(dst);
|
||||
|
||||
return mtu;
|
||||
return dst->ops->mtu(dst);
|
||||
}
|
||||
|
||||
/* RTT metrics are stored in milliseconds for user ABI, but used as jiffies */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue