ethdev: remove forcing stopped state upon close
[dpdk.git] / drivers / mempool / dpaa2 / dpaa2_hw_mempool.c
index cc4f837..97ce08d 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
  *   Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
- *   Copyright 2016 NXP
+ *   Copyright 2016-2019 NXP
  *
  */
 
@@ -36,9 +36,6 @@
 struct dpaa2_bp_info *rte_dpaa2_bpid_info;
 static struct dpaa2_bp_list *h_bp_list;
 
-/* Dynamic logging identified for mempool */
-int dpaa2_logtype_mempool;
-
 static int
 rte_hw_mbuf_create_pool(struct rte_mempool *mp)
 {
@@ -69,7 +66,9 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp)
        if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
                ret = dpaa2_affine_qbman_swp();
                if (ret) {
-                       DPAA2_MEMPOOL_ERR("Failure in affining portal");
+                       DPAA2_MEMPOOL_ERR(
+                               "Failed to allocate IO portal, tid: %d\n",
+                               rte_gettid());
                        goto err1;
                }
        }
@@ -198,7 +197,9 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused,
        if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
                ret = dpaa2_affine_qbman_swp();
                if (ret != 0) {
-                       DPAA2_MEMPOOL_ERR("Failed to allocate IO portal");
+                       DPAA2_MEMPOOL_ERR(
+                               "Failed to allocate IO portal, tid: %d\n",
+                               rte_gettid());
                        return;
                }
        }
@@ -317,7 +318,9 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool,
        if (unlikely(!DPAA2_PER_LCORE_DPIO)) {
                ret = dpaa2_affine_qbman_swp();
                if (ret != 0) {
-                       DPAA2_MEMPOOL_ERR("Failed to allocate IO portal");
+                       DPAA2_MEMPOOL_ERR(
+                               "Failed to allocate IO portal, tid: %d\n",
+                               rte_gettid());
                        return ret;
                }
        }
@@ -432,8 +435,8 @@ dpaa2_populate(struct rte_mempool *mp, unsigned int max_objs,
        /* Insert entry into the PA->VA Table */
        dpaax_iova_table_update(paddr, vaddr, len);
 
-       return rte_mempool_op_populate_default(mp, max_objs, vaddr, paddr, len,
-                                              obj_cb, obj_cb_arg);
+       return rte_mempool_op_populate_helper(mp, 0, max_objs, vaddr, paddr,
+                                              len, obj_cb, obj_cb_arg);
 }
 
 static const struct rte_mempool_ops dpaa2_mpool_ops = {
@@ -448,9 +451,4 @@ static const struct rte_mempool_ops dpaa2_mpool_ops = {
 
 MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops);
 
-RTE_INIT(dpaa2_mempool_init_log)
-{
-       dpaa2_logtype_mempool = rte_log_register("mempool.dpaa2");
-       if (dpaa2_logtype_mempool >= 0)
-               rte_log_set_level(dpaa2_logtype_mempool, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(dpaa2_logtype_mempool, mempool.dpaa2, NOTICE);