[openib-general] Re: Re: [PATCH] TX/RX_RING_SIZE as loadable parameters
Talpey, Thomas
Thomas.Talpey at netapp.com
Tue Mar 7 05:27:32 PST 2006
At 08:00 AM 3/7/2006, Michael S. Tsirkin wrote:
>> Surely this isn't true of all hardware.
>
>This is true for all hardware.
>We have code in ipoib like
> tx_req = &priv->tx_ring[priv->tx_head & (IPOIB_TX_RING_SIZE - 1)]
>
>So it only works for tz size that is a power of 2.
Sorry but that sounds like a needless restriction. Some hardware
doesn't have ring buffers at all. Well, if ipoib does it this way
though, I guess that's what it is.
>
>> If the underlying hardware requires a
>> power of 2, it should fix it, not make a requirement on the
>framework setting?
>
>Supporting arbitrary ring size will require integer division or
>coditional code on data path, I don't think it's worth it.
That's actually not what I suggested. I said the hardware driver
should change any unacceptable value to something that is.
Or, it can simply reject it.
Anyway, I definitely think it should be settable - but isn't code like
you quote going to result in changing *all* ipoib interfaces? This
kind of thing is usually a driver parameter, not an upper layer.
Tom.
More information about the general
mailing list