[openib-general] Re: [PATCH] TX/RX_RING_SIZE as loadable parameters

Michael S. Tsirkin mst at mellanox.co.il
Tue Mar 7 05:59:18 PST 2006


Quoting r. Shirley Ma <xma at us.ibm.com>:
> Subject: Re: [PATCH] TX/RX_RING_SIZE as loadable parameters
> 
> 
> >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.
> 
> Agree. I thought about that and decided to trust the user. ;)

Wait, I think I have a better idea.

How about we take the ring buffer size from dev->tx_queue_len?

Round it up to the previous power of 2, for simplicity.
IPOIB_TX_RING_SIZE will then be just the default value, so it can
stay hardcoded. Make the RX queue say twice the number, and keep it per device.

This way I think the user can both view, and set, these values with the
standard "ip" command.

Sounds good?

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list