From patchwork Fri Mar 6 09:57:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 184244 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp7232518ile; Fri, 6 Mar 2020 02:01:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vsSxl8FDAVA6jOLiMPSMFvzgJ7gkOrqVavJJZuyMKVqNQvE4v7pPD6mVLIGtkbjtQkWTDF7 X-Received: by 2002:a17:906:5604:: with SMTP id f4mr2205134ejq.255.1583488865127; Fri, 06 Mar 2020 02:01:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583488865; cv=none; d=google.com; s=arc-20160816; b=A/JVEDKzmyVx7+aInzPySkkU0EBYlurTa72M1AsaTIFtsZsISFL+bJAAq1GPVNfYTw MvQ4L7f+8sxnCvXXuoOMQXmZ2BfeptNSxKwTnBywwwXvl4lrBw3BP1X6pN9VeY7ehehV kYeFLu9Fhz601H/tWLubcbIWayfGM6o8IRy0sy88DmOENcBJHc+AjTJ+WsGUqQ224Sgi 9Bpbr8gTuswt4xo+vLPv//bp3rtoSeajfJWr3TLWe/hn33TDcNkgFJL+6wb+FXNNANeu cyHyZj7RYjB5+X7vJaFbDVo79hmNtQ36XdWxYJhTm5tqBldSQCYMzqxQH1v2rBe7f5Iz 7wUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=CAvWqo0VQ3fzJHuuRsNVMT0OBJ2gufOrQZrrDsGIX9c=; b=mYZ7p+olDtjKQLPSG59vrhEbPwCAA8I/TRPFhYxAyEgLohwABK+OHliIrHVb02hXpL gE3AA0a2Jg28BjdFAB4mVMyTFJkRT25UVmaW+PBZX8Ed5QDFAsaJ1mL0DAG9DX5ccHAi 0hnBMf0MRy5CdnEqvqQpaUely9RKF+2C3jqoF3ViVa9Lpb8V594+V4WU99vcAlmDcYOW HsEnurK20tKxl6SV2TbRRaFuIdlz35Sva6tb5I9WaPkPFcp5FR48rj98ViWUuwE1F/e8 uR9Nq8HRx6y4R+QVbPHrvcTcDf7Y9TFoKSWG48l3nKWpV+n+0fzx/VbZS9rLedGGC1Mr mcHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id y19si1004016ejq.189.2020.03.06.02.01.04; Fri, 06 Mar 2020 02:01:05 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F96D1C066; Fri, 6 Mar 2020 10:59:58 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id F21461C00E for ; Fri, 6 Mar 2020 10:59:50 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D2B821A0A62; Fri, 6 Mar 2020 10:59:50 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 818F31A0AA4; Fri, 6 Mar 2020 10:59:48 +0100 (CET) Received: from bf-netperf1.ap.com (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 44EEA4029B; Fri, 6 Mar 2020 17:59:45 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Nipun Gupta Date: Fri, 6 Mar 2020 15:27:34 +0530 Message-Id: <20200306095742.18080-9-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200306095742.18080-1-hemant.agrawal@nxp.com> References: <20200302145829.27808-1-hemant.agrawal@nxp.com> <20200306095742.18080-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 08/16] drivers: enhance portal allocation failure log X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Nipun Gupta The change adds printing the thread id when portal allocation failure occurs Signed-off-by: Nipun Gupta --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 ++++++-- drivers/event/dpaa2/dpaa2_eventdev.c | 8 ++++++-- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 12 +++++++++--- drivers/net/dpaa2/dpaa2_ethdev.c | 4 +++- drivers/net/dpaa2/dpaa2_rxtx.c | 16 ++++++++++++---- drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 8 ++++++-- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 12 +++++++++--- 7 files changed, 51 insertions(+), 17 deletions(-) -- 2.17.1 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 6ed2701ab..cf08003cc 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1459,7 +1459,9 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, if (!DPAA2_PER_LCORE_DPIO) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_SEC_ERR("Failure in affining portal"); + DPAA2_SEC_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -1641,7 +1643,9 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops, if (!DPAA2_PER_LCORE_DPIO) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_SEC_ERR("Failure in affining portal"); + DPAA2_SEC_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 1833d659d..bb02ea9fb 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -74,7 +74,9 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], /* Affine current thread context to a qman portal */ ret = dpaa2_affine_qbman_swp(); if (ret < 0) { - DPAA2_EVENTDEV_ERR("Failure in affining portal"); + DPAA2_EVENTDEV_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -273,7 +275,9 @@ dpaa2_eventdev_dequeue_burst(void *port, struct rte_event ev[], /* Affine current thread context to a qman portal */ ret = dpaa2_affine_qbman_swp(); if (ret < 0) { - DPAA2_EVENTDEV_ERR("Failure in affining portal"); + DPAA2_EVENTDEV_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 48887beb7..fa9b53e64 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -69,7 +69,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 +200,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 +321,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; } } diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 4fc550a88..4a61c6f78 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -887,7 +887,9 @@ dpaa2_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return -EINVAL; } } diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 52d913d9e..d809e0f4b 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -760,7 +760,9 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal\n"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -872,7 +874,9 @@ uint16_t dpaa2_dev_tx_conf(void *queue) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal\n"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -1011,7 +1015,9 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -1272,7 +1278,9 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c index 997d1c873..7c21c6a52 100644 --- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c +++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c @@ -70,7 +70,9 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev, if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_CMDIF_ERR("Failure in affining portal\n"); + DPAA2_CMDIF_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -133,7 +135,9 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev, if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_CMDIF_ERR("Failure in affining portal\n"); + DPAA2_CMDIF_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index c90595400..d5202d652 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -666,7 +666,9 @@ dpdmai_dev_enqueue_multi(struct dpaa2_dpdmai_dev *dpdmai_dev, if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_QDMA_ERR("Failure in affining portal"); + DPAA2_QDMA_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -788,7 +790,9 @@ dpdmai_dev_dequeue_multijob_prefetch( if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_QDMA_ERR("Failure in affining portal"); + DPAA2_QDMA_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -929,7 +933,9 @@ dpdmai_dev_dequeue_multijob_no_prefetch( if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_QDMA_ERR("Failure in affining portal"); + DPAA2_QDMA_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } }