diff mbox series

[ovs-dev,4/4] netdev-dpdk: Remove unused MAX_NB_MBUF.

Message ID 1509367961-7172-5-git-send-email-i.maximets@samsung.com
State Superseded
Delegated to: Ian Stokes
Headers show
Series netdev-dpdk: mempool management: Leaks & Refactoring. | expand

Commit Message

Ilya Maximets Oct. 30, 2017, 12:52 p.m. UTC
CC: Robert Wojciechowicz <robertx.wojciechowicz@intel.com>
Fixes: d555d9bded5f ("netdev-dpdk: Create separate memory pool for each port.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/netdev-dpdk.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

Comments

Fischetti, Antonio Oct. 31, 2017, 1:28 p.m. UTC | #1
Hi Ilya, I've tested all this patch-series by 
 - running some PVP test, 
 - checking the NUMA-awareness works and 
 - MTU small/big changes that causes reuse/creation of a new mp

It works fine.

LGTM

Acked-by: Antonio Fischetti <antonio.fischetti@intel.com>

> -----Original Message-----
> From: Ilya Maximets [mailto:i.maximets@samsung.com]
> Sent: Monday, October 30, 2017 12:53 PM
> To: ovs-dev@openvswitch.org
> Cc: Heetae Ahn <heetae82.ahn@samsung.com>; Fischetti, Antonio
> <antonio.fischetti@intel.com>; Loftus, Ciara <ciara.loftus@intel.com>;
> Kavanagh, Mark B <mark.b.kavanagh@intel.com>; Stokes, Ian
> <ian.stokes@intel.com>; Wojciechowicz, RobertX
> <robertx.wojciechowicz@intel.com>; Ilya Maximets <i.maximets@samsung.com>
> Subject: [PATCH 4/4] netdev-dpdk: Remove unused MAX_NB_MBUF.
> 
> CC: Robert Wojciechowicz <robertx.wojciechowicz@intel.com>
> Fixes: d555d9bded5f ("netdev-dpdk: Create separate memory pool for each port.")
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>  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 cdb3244..0b40966 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
diff mbox series

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index cdb3244..0b40966 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
  */