This commit makes the memory pool name contain the socket id. Since dpdk library do not allow creation of memory pool with same name, this commit serves as a simple way of making each name unique.
Signed-off-by: Alex Wang <al...@nicira.com> Acked-by: Thomas Graf <tg...@noironetworks.com> --- PATCH -> V2: - Rebase. --- lib/netdev-dpdk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index df71385..ee64cde 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -272,7 +272,8 @@ dpdk_mp_get(int socket_id, int mtu) OVS_REQUIRES(dpdk_mutex) dmp->mtu = mtu; dmp->refcount = 1; - snprintf(mp_name, RTE_MEMPOOL_NAMESIZE, "ovs_mp_%d", dmp->mtu); + snprintf(mp_name, RTE_MEMPOOL_NAMESIZE, "ovs_mp_%d_%d", dmp->mtu, + dmp->socket_id); dmp->mp = rte_mempool_create(mp_name, NB_MBUF, MBUF_SIZE(mtu), MP_CACHE_SZ, sizeof(struct rte_pktmbuf_pool_private), -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev