[openib-general] Re: RFC: struct netdevice changes for IPoIB UC support

Herbert Xu herbert at gondor.apana.org.au
Wed Sep 21 01:15:23 PDT 2005


Michael S. Tsirkin <mst at mellanox.co.il> 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 at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



More information about the general mailing list