mirror of
https://github.com/openvswitch/ovs
synced 2025-09-03 15:55:19 +00:00
netdev-dpdk: Remove unused MAX_NB_MBUF.
MAX_NB_MBUF was used as a default mempool size for almost all ports.
Not used since new per-port mempool allocation introduced.
MIN_NB_MBUF still used as a lower limit.
CC: Robert Wojciechowicz <robertx.wojciechowicz@intel.com>
Fixes: d555d9bded
("netdev-dpdk: Create separate memory pool for each port.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Antonio Fischetti <antonio.fischetti@intel.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
committed by
Ian Stokes
parent
24e78f9350
commit
bc57ed901f
@@ -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_MBUF_ALIGN 1024
|
||||||
#define NETDEV_DPDK_MAX_PKT_LEN 9728
|
#define NETDEV_DPDK_MAX_PKT_LEN 9728
|
||||||
|
|
||||||
/* Max and min number of packets in the mempool. OVS tries to allocate a
|
/* Min number of packets in the mempool. OVS tries to allocate a mempool with
|
||||||
* mempool with MAX_NB_MBUF: if this fails (because the system doesn't have
|
* roughly estimated number of mbufs: if this fails (because the system doesn't
|
||||||
* enough hugepages) we keep halving the number until the allocation succeeds
|
* have enough hugepages) we keep halving the number until the allocation
|
||||||
* or we reach MIN_NB_MBUF */
|
* succeeds or we reach MIN_NB_MBUF */
|
||||||
|
|
||||||
#define MAX_NB_MBUF (4096 * 64)
|
|
||||||
#define MIN_NB_MBUF (4096 * 4)
|
#define MIN_NB_MBUF (4096 * 4)
|
||||||
#define MP_CACHE_SZ RTE_MEMPOOL_CACHE_MAX_SIZE
|
#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
|
* DPDK XSTATS Counter names definition
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user