Re: RFC: struct netdevice changes for IPoIB UC support

From: Herbert Xu
Date: Wed Sep 21 2005 - 03:16:49 EST


Michael S. Tsirkin <mst@xxxxxxxxxxxxxx> wrote:
>
> Please comment on this approach: does it make sense to you guys?
> Please Cc me directly, I'm not on the list.

Sorry, this doesn't make sense.

> static inline u32 dst_mtu(const struct dst_entry *dst)
> {
> - u32 mtu = dst_metric(dst, RTAX_MTU);
> + u32 mtu;
> + if (dst->dev && dst->dev->get_mtu)
> + mtu = dst->dev->get_mtu(dst->dev, dst->neighbour,
> + dst_metric(dst, RTAX_MTU));
> + else
> + mtu = dst_metric(dst, RTAX_MTU);

>From this I gather that for a given dst the MTU is actually constant.
That is, it only varies across different dst's.

In this case you should calculate the correct MTU when the dst is
created rather than here.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/