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 <[email protected]> > --- > 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. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
