[ofa-general] [PATCH] IPoIB UD 4K MTU support

Pradeep Satyanarayana pradeeps at linux.vnet.ibm.com
Thu Jan 24 15:06:39 PST 2008


Roland Dreier wrote:
> OK, this is some half-baked thinking based on reading the patch.  I
> don't know the right answer here -- I am hoping to spark discussion
> that makes the correct thing clear:
> 
>  > +static inline int ipoib_ud_mtu(unsigned int ib_mtu) 
>  > +{
>  > +	return (ib_mtu < 4096) ? (ib_mtu - IPOIB_ENCAP_LEN) :
>  > +				 (ib_mtu - IB_GRH_BYTES - IPOIB_ENCAP_LEN - 4);
>  > +}
> 
> reading this, my first reaction is that the magic 4096 constant should
> have a name.  And in fact the most obvious name for it is PAGE_SIZE.
> However, this means that (assuming everyone can handle an IB MTU of
> 4096), systems with PAGE_SIZE > 4096 would come up with a different
> IPoIB MTU than systems with PAGE_SIZE == 4096.  And I'm not sure
> whether that would cause problems or not.  (eg TCP should be OK)
> 
> But then in general, if we use the approach here (which is very
> appealing because it's so simple), Linux will potentially have an MTU
> different from other OSes that might choose a different way to handle
> an IB MTU of 4096.  So does that mean that we should use a more
> complicated approach to get the max possible MTU of 4096 - 4?

I am not sure I understand -are you concerned that other OSes might use
4096 as the payload size of a packet? SM will dictate the max size of
the packet to be used and so packets with a payload size of 4096 will
get split into two and interoperability should not be an issue.

Pradeep




More information about the general mailing list