DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Gagandeep Singh <g.singh@nxp.com>
Cc: dev@dpdk.org, Sachin Saxena <sachin.saxena@nxp.com>,
	Jun Yang <jun.yang@nxp.com>
Subject: Re: [v6 08/15] dma/dpaa: refactor driver
Date: Mon, 14 Oct 2024 19:59:46 -0700	[thread overview]
Message-ID: <20241014195946.7290c909@hermes.local> (raw)
In-Reply-To: <20241014093639.553467-9-g.singh@nxp.com>

On Mon, 14 Oct 2024 15:06:32 +0530
Gagandeep Singh <g.singh@nxp.com> wrote:

> @@ -551,7 +485,7 @@ fsl_qdma_reg_init(struct fsl_qdma_engine *fsl_qdma)
>  
>  		/* Initialize the status queue mode. */
>  		reg = FSL_QDMA_BSQMR_EN;
> -		val = ilog2(fsl_qdma->status[j]->n_cq) - 6;
> +		val = ilog2_qsize(temp_stat->n_cq);
>  		reg |= FSL_QDMA_BSQMR_CQ_SIZE(val);
>  		qdma_writel(reg, block + FSL_QDMA_BSQMR);
>  	}
> @@ -563,158 +497,389 @@ fsl_qdma_reg_init(struct fsl_qdma_engine *fsl_qdma)
>  	return 0;
>  }
>  
> -static void *
> -fsl_qdma_prep_memcpy(void *fsl_chan, dma_addr_t dst,
> -			   dma_addr_t src, size_t len,
> -			   void *call_back,
> -			   void *param)
> +static uint16_t
> +dpaa_qdma_block_dequeue(struct fsl_qdma_engine *fsl_qdma,
> +	uint8_t block_id)
>  {
> -	struct fsl_qdma_comp *fsl_comp;
> +	struct fsl_qdma_status_queue *stat_queue;
> +	struct fsl_qdma_queue *cmd_queue;
> +	struct fsl_qdma_comp_cmd_desc *cq;
> +	uint16_t start, count = 0;
> +	uint8_t qid = 0;
> +	uint32_t reg;
> +	int ret;
> +	uint8_t *block;
> +	uint16_t *dq_complete;
> +	struct fsl_qdma_desc *desc[FSL_QDMA_SG_MAX_ENTRY];
>  
> -	fsl_comp =
> -	fsl_qdma_request_enqueue_desc((struct fsl_qdma_chan *)fsl_chan);
> -	if (!fsl_comp)
> -		return NULL;
> +	stat_queue = &fsl_qdma->stat_queues[block_id];
> +	cq = stat_queue->cq;
> +	start = stat_queue->complete;
> +
> +	block = fsl_qdma->block_base +
> +		FSL_QDMA_BLOCK_BASE_OFFSET(fsl_qdma, block_id);
>  
> -	fsl_comp->qchan = fsl_chan;
> -	fsl_comp->call_back_func = call_back;
> -	fsl_comp->params = param;
> +	do {
> +		reg = qdma_readl_be(block + FSL_QDMA_BSQSR);
> +		if (reg & FSL_QDMA_BSQSR_QE_BE)
> +			break;
>  
> -	fsl_qdma_comp_fill_memcpy(fsl_comp, dst, src, len);
> -	return (void *)fsl_comp;
> +		qdma_writel_be(FSL_QDMA_BSQMR_DI, block + FSL_QDMA_BSQMR);
> +		ret = qdma_ccdf_get_queue(&cq[start], &qid);
> +		if (ret == true) {
> +			cmd_queue = &fsl_qdma->cmd_queues[block_id][qid];
> +
> +			ret = rte_ring_dequeue(cmd_queue->complete_burst,
> +				(void **)&dq_complete);
> +			if (ret)
> +				rte_panic("DQ desc number failed!\n");

Please don't panic here, either recover, log an error or take the device
offline. Killing the whole application is not acceptable.

  reply	other threads:[~2024-10-15  2:59 UTC|newest]

Thread overview: 165+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 10:00 [PATCH 01/30] dma/dpaa2: configure route by port by PCIe port param Gagandeep Singh
2024-07-19 10:00 ` [PATCH 02/30] dma/dpaa2: support multiple HW queues Gagandeep Singh
2024-07-19 10:00 ` [PATCH 03/30] dma/dpaa2: adapt DMA driver API Gagandeep Singh
2024-07-19 10:01 ` [PATCH 04/30] dma/dpaa2: multiple process support Gagandeep Singh
2024-07-19 10:01 ` [PATCH 05/30] dma/dpaa2: add sanity check for SG entry Gagandeep Singh
2024-07-19 10:01 ` [PATCH 06/30] dma/dpaa2: include DPAA2 specific header files Gagandeep Singh
2024-07-19 10:01 ` [PATCH 07/30] dma/dpaa2: borrow flags of DMA operation to pass job context Gagandeep Singh
2024-07-19 10:01 ` [PATCH 08/30] bus/fslmc: enhance the qbman dq storage logic Gagandeep Singh
2024-07-19 10:01 ` [PATCH 09/30] dma/dpaa2: add short FD support Gagandeep Singh
2024-07-19 10:01 ` [PATCH 10/30] dma/dpaa2: limit the max descriptor number Gagandeep Singh
2024-07-19 10:01 ` [PATCH 11/30] dma/dpaa2: change the DMA copy return value Gagandeep Singh
2024-07-19 10:01 ` [PATCH 12/30] dma/dpaa2: move the qdma header to common place Gagandeep Singh
2024-07-19 10:01 ` [PATCH 13/30] dma/dpaa: support multi channels Gagandeep Singh
2024-07-19 10:01 ` [PATCH 14/30] dma/dpaa: fix job enqueue Gagandeep Singh
2024-07-19 10:01 ` [PATCH 15/30] dma/dpaa: add burst capacity API Gagandeep Singh
2024-07-19 10:01 ` [PATCH 16/30] dma/dpaa: add workaround for ERR050757 Gagandeep Singh
2024-07-19 10:01 ` [PATCH 17/30] dma/dpaa: qdma stall workaround for ERR050265 Gagandeep Singh
2024-07-19 10:01 ` [PATCH 18/30] dma/dpaa: remove unwanted desc Gagandeep Singh
2024-07-19 10:01 ` [PATCH 19/30] dma/dpaa: data path optimization Gagandeep Singh
2024-07-19 10:01 ` [PATCH 20/30] dma/dpaa: refactor driver Gagandeep Singh
2024-07-19 10:01 ` [PATCH 21/30] dma/dpaa: dequeue status queue Gagandeep Singh
2024-07-19 10:01 ` [PATCH 22/30] dma/dpaa: add Scatter Gather support Gagandeep Singh
2024-07-19 10:01 ` [PATCH 23/30] dma/dpaa: block dequeue Gagandeep Singh
2024-07-19 10:01 ` [PATCH 24/30] dma/dpaa: improve congestion handling Gagandeep Singh
2024-07-19 10:01 ` [PATCH 25/30] dma/dpaa: disable SG descriptor as default Gagandeep Singh
2024-07-19 10:01 ` [PATCH 26/30] dma/dpaa: improve ERRATA workaround solution Gagandeep Singh
2024-07-19 10:01 ` [PATCH 27/30] dma/dpaa: improve silent mode support Gagandeep Singh
2024-07-19 10:01 ` [PATCH 28/30] dma/dpaa: support multiple SG copies Gagandeep Singh
2024-07-19 10:01 ` [PATCH 29/30] dma/dpaa: support max SG entry size Gagandeep Singh
2024-07-19 10:01 ` [PATCH 30/30] bus/dpaa: add port bmi stats Gagandeep Singh
2024-07-22 11:58 ` [v2 00/30] NXP DMA driver fixes and Enhancements Gagandeep Singh
2024-07-22 11:58   ` [v2 01/30] dma/dpaa2: configure route by port by PCIe port param Gagandeep Singh
2024-07-22 11:58   ` [v2 02/30] dma/dpaa2: support multiple HW queues Gagandeep Singh
2024-07-22 11:58   ` [v2 03/30] dma/dpaa2: adapt DMA driver API Gagandeep Singh
2024-07-22 11:58   ` [v2 04/30] dma/dpaa2: multiple process support Gagandeep Singh
2024-07-22 11:58   ` [v2 05/30] dma/dpaa2: add sanity check for SG entry Gagandeep Singh
2024-07-22 11:58   ` [v2 06/30] dma/dpaa2: include DPAA2 specific header files Gagandeep Singh
2024-07-22 11:58   ` [v2 07/30] dma/dpaa2: borrow flags of DMA operation to pass job context Gagandeep Singh
2024-07-22 11:58   ` [v2 08/30] bus/fslmc: enhance the qbman dq storage logic Gagandeep Singh
2024-07-22 11:58   ` [v2 09/30] dma/dpaa2: add short FD support Gagandeep Singh
2024-07-22 11:58   ` [v2 10/30] dma/dpaa2: limit the max descriptor number Gagandeep Singh
2024-07-22 11:58   ` [v2 11/30] dma/dpaa2: change the DMA copy return value Gagandeep Singh
2024-07-22 11:58   ` [v2 12/30] dma/dpaa2: move the qdma header to common place Gagandeep Singh
2024-07-22 11:58   ` [v2 13/30] dma/dpaa: support multi channels Gagandeep Singh
2024-07-22 11:58   ` [v2 14/30] dma/dpaa: fix job enqueue Gagandeep Singh
2024-07-22 11:58   ` [v2 15/30] dma/dpaa: add burst capacity API Gagandeep Singh
2024-07-22 11:58   ` [v2 16/30] dma/dpaa: add workaround for ERR050757 Gagandeep Singh
2024-07-22 11:58   ` [v2 17/30] dma/dpaa: qdma stall workaround for ERR050265 Gagandeep Singh
2024-07-22 11:58   ` [v2 18/30] dma/dpaa: remove unwanted desc Gagandeep Singh
2024-07-22 11:58   ` [v2 19/30] dma/dpaa: data path optimization Gagandeep Singh
2024-07-22 11:58   ` [v2 20/30] dma/dpaa: refactor driver Gagandeep Singh
2024-07-22 11:58   ` [v2 21/30] dma/dpaa: dequeue status queue Gagandeep Singh
2024-07-22 11:58   ` [v2 22/30] dma/dpaa: add Scatter Gather support Gagandeep Singh
2024-07-22 11:58   ` [v2 23/30] dma/dpaa: block dequeue Gagandeep Singh
2024-07-22 11:58   ` [v2 24/30] dma/dpaa: improve congestion handling Gagandeep Singh
2024-07-22 11:58   ` [v2 25/30] dma/dpaa: disable SG descriptor as default Gagandeep Singh
2024-07-22 11:58   ` [v2 26/30] dma/dpaa: improve ERRATA workaround solution Gagandeep Singh
2024-07-22 11:58   ` [v2 27/30] dma/dpaa: improve silent mode support Gagandeep Singh
2024-07-22 11:58   ` [v2 28/30] dma/dpaa: support multiple SG copies Gagandeep Singh
2024-07-22 11:58   ` [v2 29/30] dma/dpaa: support max SG entry size Gagandeep Singh
2024-07-22 11:58   ` [v2 30/30] bus/dpaa: add port bmi stats Gagandeep Singh
2024-07-22 16:39   ` [v3 00/30] NXP DMA driver fixes and Enhancements Gagandeep Singh
2024-07-22 16:39     ` [v3 01/30] dma/dpaa2: configure route by port by PCIe port param Gagandeep Singh
2024-10-08  7:22       ` [v4 00/15] NXP DMA driver fixes and Enhancements Gagandeep Singh
2024-10-08  7:22         ` [v4 01/15] dma/dpaa2: configure route by port by PCIe port param Gagandeep Singh
2024-10-08 10:57           ` [v5 00/15] NXP DMA driver fixes and Enhancements Gagandeep Singh
2024-10-08 10:57             ` [v5 01/15] dma/dpaa2: configure route by port by PCIe port param Gagandeep Singh
2024-10-14  9:36               ` [v6 00/15] NXP DMA driver fixes and Enhancements Gagandeep Singh
2024-10-14  9:36                 ` [v6 01/15] dma/dpaa2: configure route by port by PCIe port param Gagandeep Singh
2024-10-14  9:36                 ` [v6 02/15] dma/dpaa2: refactor driver code Gagandeep Singh
2024-10-14  9:36                 ` [v6 03/15] bus/fslmc: enhance the qbman dq storage logic Gagandeep Singh
2024-10-14  9:36                 ` [v6 04/15] dma/dpaa2: add short FD support Gagandeep Singh
2024-10-14  9:36                 ` [v6 05/15] dma/dpaa2: limit the max descriptor number Gagandeep Singh
2024-10-14  9:36                 ` [v6 06/15] dma/dpaa2: change the DMA copy return value Gagandeep Singh
2024-10-14  9:36                 ` [v6 07/15] dma/dpaa2: move the qdma header to common place Gagandeep Singh
2024-10-14  9:36                 ` [v6 08/15] dma/dpaa: refactor driver Gagandeep Singh
2024-10-15  2:59                   ` Stephen Hemminger [this message]
2024-10-14  9:36                 ` [v6 09/15] dma/dpaa: support burst capacity API Gagandeep Singh
2024-10-14  9:36                 ` [v6 10/15] dma/dpaa: add silent mode support Gagandeep Singh
2024-10-14  9:36                 ` [v6 11/15] dma/dpaa: add workaround for ERR050757 Gagandeep Singh
2024-10-14  9:36                 ` [v6 12/15] dma/dpaa: qdma stall workaround for ERR050265 Gagandeep Singh
2024-10-14  9:36                 ` [v6 13/15] dma/dpaa: add Scatter Gather support Gagandeep Singh
2024-10-14  9:36                 ` [v6 14/15] dma/dpaa: add DMA error checks Gagandeep Singh
2024-10-14  9:36                 ` [v6 15/15] bus/dpaa: add port bmi stats Gagandeep Singh
2024-10-15  7:13                 ` [v7 00/15] NXP DMA driver fixes and Enhancements Gagandeep Singh
2024-10-15  7:13                   ` [v7 01/15] dma/dpaa2: configure route by port by PCIe port param Gagandeep Singh
2024-10-15  7:13                   ` [v7 02/15] dma/dpaa2: refactor driver code Gagandeep Singh
2024-10-15 22:11                     ` Stephen Hemminger
2024-10-16  5:09                       ` Hemant Agrawal
2024-10-16  5:13                         ` Stephen Hemminger
2024-10-16  5:15                           ` Hemant Agrawal
2024-10-15  7:13                   ` [v7 03/15] bus/fslmc: enhance the qbman dq storage logic Gagandeep Singh
2024-10-15  7:13                   ` [v7 04/15] dma/dpaa2: add short FD support Gagandeep Singh
2024-10-15  7:13                   ` [v7 05/15] dma/dpaa2: limit the max descriptor number Gagandeep Singh
2024-10-15  7:13                   ` [v7 06/15] dma/dpaa2: change the DMA copy return value Gagandeep Singh
2024-10-15  7:13                   ` [v7 07/15] dma/dpaa2: move the qdma header to common place Gagandeep Singh
2024-10-15  7:13                   ` [v7 08/15] dma/dpaa: refactor driver Gagandeep Singh
2024-10-15  7:13                   ` [v7 09/15] dma/dpaa: support burst capacity API Gagandeep Singh
2024-10-15  7:13                   ` [v7 10/15] dma/dpaa: add silent mode support Gagandeep Singh
2024-10-15  7:13                   ` [v7 11/15] dma/dpaa: add workaround for ERR050757 Gagandeep Singh
2024-10-15  7:14                   ` [v7 12/15] dma/dpaa: qdma stall workaround for ERR050265 Gagandeep Singh
2024-10-15  7:14                   ` [v7 13/15] dma/dpaa: add Scatter Gather support Gagandeep Singh
2024-10-15  7:14                   ` [v7 14/15] dma/dpaa: add DMA error checks Gagandeep Singh
2024-10-15  7:14                   ` [v7 15/15] bus/dpaa: add port bmi stats Gagandeep Singh
2024-10-08 10:57             ` [v5 02/15] dma/dpaa2: refactor driver code Gagandeep Singh
2024-10-08 10:57             ` [v5 03/15] bus/fslmc: enhance the qbman dq storage logic Gagandeep Singh
2024-10-08 10:57             ` [v5 04/15] dma/dpaa2: add short FD support Gagandeep Singh
2024-10-08 10:58             ` [v5 05/15] dma/dpaa2: limit the max descriptor number Gagandeep Singh
2024-10-08 10:58             ` [v5 06/15] dma/dpaa2: change the DMA copy return value Gagandeep Singh
2024-10-08 10:58             ` [v5 07/15] dma/dpaa2: move the qdma header to common place Gagandeep Singh
2024-10-08 10:58             ` [v5 08/15] dma/dpaa: refactor driver Gagandeep Singh
2024-10-08 10:58             ` [v5 09/15] dma/dpaa: support burst capacity API Gagandeep Singh
2024-10-08 10:58             ` [v5 10/15] dma/dpaa: add silent mode support Gagandeep Singh
2024-10-08 10:58             ` [v5 11/15] dma/dpaa: add workaround for ERR050757 Gagandeep Singh
2024-10-08 10:58             ` [v5 12/15] dma/dpaa: qdma stall workaround for ERR050265 Gagandeep Singh
2024-10-08 10:58             ` [v5 13/15] dma/dpaa: add Scatter Gather support Gagandeep Singh
2024-10-08 10:58             ` [v5 14/15] dma/dpaa: add DMA error checks Gagandeep Singh
2024-10-08 10:58             ` [v5 15/15] bus/dpaa: add port bmi stats Gagandeep Singh
2024-10-09 18:02               ` Stephen Hemminger
2024-10-08  7:22         ` [v4 02/15] dma/dpaa2: refactor driver code Gagandeep Singh
2024-10-08  7:22         ` [v4 03/15] bus/fslmc: enhance the qbman dq storage logic Gagandeep Singh
2024-10-08  7:22         ` [v4 04/15] dma/dpaa2: add short FD support Gagandeep Singh
2024-10-08  7:22         ` [v4 05/15] dma/dpaa2: limit the max descriptor number Gagandeep Singh
2024-10-08  7:22         ` [v4 06/15] dma/dpaa2: change the DMA copy return value Gagandeep Singh
2024-10-08  7:22         ` [v4 07/15] dma/dpaa2: move the qdma header to common place Gagandeep Singh
2024-10-08  7:22         ` [v4 08/15] dma/dpaa: refactor driver Gagandeep Singh
2024-10-08  7:23         ` [v4 09/15] dma/dpaa: support burst capacity API Gagandeep Singh
2024-10-08  7:23         ` [v4 10/15] dma/dpaa: add silent mode support Gagandeep Singh
2024-10-08  7:23         ` [v4 11/15] dma/dpaa: add workaround for ERR050757 Gagandeep Singh
2024-10-08  7:23         ` [v4 12/15] dma/dpaa: qdma stall workaround for ERR050265 Gagandeep Singh
2024-10-08  7:23         ` [v4 13/15] dma/dpaa: add Scatter Gather support Gagandeep Singh
2024-10-08  7:23         ` [v4 14/15] dma/dpaa: add DMA error checks Gagandeep Singh
2024-10-08  7:23         ` [v4 15/15] bus/dpaa: add port bmi stats Gagandeep Singh
2024-07-22 16:39     ` [v3 02/30] dma/dpaa2: support multiple HW queues Gagandeep Singh
2024-07-22 20:19       ` Stephen Hemminger
2024-10-07 20:51       ` Stephen Hemminger
2024-07-22 16:39     ` [v3 03/30] dma/dpaa2: adapt DMA driver API Gagandeep Singh
2024-07-22 16:39     ` [v3 04/30] dma/dpaa2: multiple process support Gagandeep Singh
2024-07-22 16:39     ` [v3 05/30] dma/dpaa2: add sanity check for SG entry Gagandeep Singh
2024-07-22 20:21       ` Stephen Hemminger
2024-07-22 16:39     ` [v3 06/30] dma/dpaa2: include DPAA2 specific header files Gagandeep Singh
2024-07-22 16:39     ` [v3 07/30] dma/dpaa2: borrow flags of DMA operation to pass job context Gagandeep Singh
2024-07-22 16:39     ` [v3 08/30] bus/fslmc: enhance the qbman dq storage logic Gagandeep Singh
2024-07-22 16:39     ` [v3 09/30] dma/dpaa2: add short FD support Gagandeep Singh
2024-07-22 16:39     ` [v3 10/30] dma/dpaa2: limit the max descriptor number Gagandeep Singh
2024-07-22 16:39     ` [v3 11/30] dma/dpaa2: change the DMA copy return value Gagandeep Singh
2024-07-22 16:39     ` [v3 12/30] dma/dpaa2: move the qdma header to common place Gagandeep Singh
2024-07-22 16:39     ` [v3 13/30] dma/dpaa: support multi channels Gagandeep Singh
2024-07-22 16:39     ` [v3 14/30] dma/dpaa: fix job enqueue Gagandeep Singh
2024-07-22 16:39     ` [v3 15/30] dma/dpaa: add burst capacity API Gagandeep Singh
2024-07-22 16:39     ` [v3 16/30] dma/dpaa: add workaround for ERR050757 Gagandeep Singh
2024-07-22 16:39     ` [v3 17/30] dma/dpaa: qdma stall workaround for ERR050265 Gagandeep Singh
2024-07-22 16:39     ` [v3 18/30] dma/dpaa: remove unwanted desc Gagandeep Singh
2024-07-22 16:39     ` [v3 19/30] dma/dpaa: data path optimization Gagandeep Singh
2024-07-22 16:39     ` [v3 20/30] dma/dpaa: refactor driver Gagandeep Singh
2024-07-22 16:39     ` [v3 21/30] dma/dpaa: dequeue status queue Gagandeep Singh
2024-07-22 16:39     ` [v3 22/30] dma/dpaa: add Scatter Gather support Gagandeep Singh
2024-07-22 16:39     ` [v3 23/30] dma/dpaa: block dequeue Gagandeep Singh
2024-07-22 16:39     ` [v3 24/30] dma/dpaa: improve congestion handling Gagandeep Singh
2024-07-22 16:39     ` [v3 25/30] dma/dpaa: disable SG descriptor as default Gagandeep Singh
2024-07-22 16:39     ` [v3 26/30] dma/dpaa: improve ERRATA workaround solution Gagandeep Singh
2024-07-22 16:39     ` [v3 27/30] dma/dpaa: improve silent mode support Gagandeep Singh
2024-07-22 16:39     ` [v3 28/30] dma/dpaa: support multiple SG copies Gagandeep Singh
2024-07-22 16:39     ` [v3 29/30] dma/dpaa: support max SG entry size Gagandeep Singh
2024-07-22 16:39     ` [v3 30/30] bus/dpaa: add port bmi stats Gagandeep Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241014195946.7290c909@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    --cc=jun.yang@nxp.com \
    --cc=sachin.saxena@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).