> -----Original Message----- > From: Ilya Maximets [mailto:[email protected]] > Sent: Tuesday, November 7, 2017 1:33 PM > To: [email protected] > Cc: Heetae Ahn <[email protected]>; Fischetti, Antonio > <[email protected]>; Loftus, Ciara <[email protected]>; > Kavanagh, Mark B <[email protected]>; Stokes, Ian > <[email protected]>; Wojciechowicz, RobertX > <[email protected]>; Ilya Maximets <[email protected]> > Subject: [PATCH v2 3/3] netdev-dpdk: Remove unused MAX_NB_MBUF. > Hi Ilya,
Similar to patch 1 of this series, can you submit with an expanded commit message explaining the patch and why MAX_NB_MBUF can be removed now. I'll validate the patch in the meantime with a view to putting it on the DPDK merge branch. Thanks Ian > CC: Robert Wojciechowicz <[email protected]> > Fixes: d555d9bded5f ("netdev-dpdk: Create separate memory pool for each > port.") > Signed-off-by: Ilya Maximets <[email protected]> > Acked-by: Antonio Fischetti <[email protected]> > --- > lib/netdev-dpdk.c | 18 ++++-------------- > 1 file changed, 4 insertions(+), 14 deletions(-) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 82f41db..9ceb109 > 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -89,23 +89,13 @@ static struct vlog_rate_limit rl = > VLOG_RATE_LIMIT_INIT(5, 20); > #define NETDEV_DPDK_MBUF_ALIGN 1024 > #define NETDEV_DPDK_MAX_PKT_LEN 9728 > > -/* Max and min number of packets in the mempool. OVS tries to allocate a > - * mempool with MAX_NB_MBUF: if this fails (because the system doesn't > have > - * enough hugepages) we keep halving the number until the allocation > succeeds > - * or we reach MIN_NB_MBUF */ > - > -#define MAX_NB_MBUF (4096 * 64) > +/* Min number of packets in the mempool. OVS tries to allocate a > +mempool with > + * roughly estimated number of mbufs: if this fails (because the system > +doesn't > + * have enough hugepages) we keep halving the number until the > +allocation > + * succeeds or we reach MIN_NB_MBUF */ > #define MIN_NB_MBUF (4096 * 4) > #define MP_CACHE_SZ RTE_MEMPOOL_CACHE_MAX_SIZE > > -/* MAX_NB_MBUF can be divided by 2 many times, until MIN_NB_MBUF */ - > BUILD_ASSERT_DECL(MAX_NB_MBUF % ROUND_DOWN_POW2(MAX_NB_MBUF/MIN_NB_MBUF) > == 0); > - > -/* The smallest possible NB_MBUF that we're going to try should be a > multiple > - * of MP_CACHE_SZ. This is advised by DPDK documentation. */ - > BUILD_ASSERT_DECL((MAX_NB_MBUF / ROUND_DOWN_POW2(MAX_NB_MBUF/MIN_NB_MBUF)) > - % MP_CACHE_SZ == 0); > - > /* > * DPDK XSTATS Counter names definition > */ > -- > 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
