[openib-general] Re: Re: [PATCH] TX/RX_RING_SIZE as loadable parameters
Michael S. Tsirkin
mst at mellanox.co.il
Tue Mar 7 05:00:38 PST 2006
Quoting r. Talpey, Thomas <Thomas.Talpey at netapp.com>:
> Subject: Re: Re: [PATCH] TX/RX_RING_SIZE as loadable parameters
>
> At 02:11 AM 3/7/2006, Michael S. Tsirkin wrote:
> >> The default TX_RING_SIZE is 64, RX_RING_SIZE is 128 in IPoIB, which
>
> >These parameters must be a power of 2, and at least 2, otherwise things
> >break. I'd suggest making these a log and multiplying the result by 2,
> >to exclude the possibility of user error.
>
> 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.
> 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.
--
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies
More information about the general
mailing list