Messages in this thread | | | From | Herbert Xu <> | Subject | Re: RFC: struct netdevice changes for IPoIB UC support | Date | Wed, 21 Sep 2005 18:15:23 +1000 |
| |
Michael S. Tsirkin <mst@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@gondor.apana.org.au> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |