On 7/30/14, 8:29 AM, "Ben Pfaff" <b...@nicira.com> wrote:

>On Tue, Jul 29, 2014 at 04:21:32PM -0700, Daniele Di Proietto wrote:
>> DPDK rings must have a power-of-two size.
>> 
>> Signed-off-by: Daniele Di Proietto <ddiproie...@vmware.com>
>> ---
>>  lib/netdev-dpdk.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>> index b45e367..c1b644a 100644
>> --- a/lib/netdev-dpdk.c
>> +++ b/lib/netdev-dpdk.c
>> @@ -125,6 +125,7 @@ static const struct rte_eth_txconf tx_conf = {
>>  
>>  enum { MAX_RX_QUEUE_LEN = 192 };
>>  enum { MAX_TX_QUEUE_LEN = 384 };
>> +enum { DPDK_RING_SIZE = 256 }; /* Must be a power of 2 */
>
>We usually add something like
>BUILD_ASSERT_DECL(IS_POW2(DPDK_RING_SIZE)); to make that even clearer.

This makes sense, thanks!
I¹ll post a v2

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to