Re: RFC: struct netdevice changes for IPoIB UC support

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

 



Michael S. Tsirkin <[email protected]> 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~} <[email protected]>
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux