From: Bruce Richardson <bruce.richardson@intel.com>
To: Soumyadeep Hore <soumyadeep.hore@intel.com>
Cc: <yuying.zhang@intel.com>, <jingjing.wu@intel.com>, <dev@dpdk.org>
Subject: Re: [PATCH 01/25] common/idpf: added NVME CPF specific code with defines
Date: Wed, 29 May 2024 13:32:18 +0100 [thread overview]
Message-ID: <ZlcgUkE_zQb5qFjL@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20240528072839.867100-2-soumyadeep.hore@intel.com>
On Tue, May 28, 2024 at 07:28:31AM +0000, Soumyadeep Hore wrote:
> The aim of the changes is to remove NVME dependency on
Hi,
The intro words "The aim of the changes" is unnecessary. Just shorten the
commit log by stating what the patch is for without any intro:
"Remove NVME dependency on memory allocations..."
If rewording, it would be worth including detail about when the define is
expected to be used - will it be defined/configured in a later patch, or is
it expected that it's a build-time setting set by user? If latter case, we
need a doc update here.
One further minor nit below too.
/Bruce
> memory allocations, and to use a prepared buffer instead.
>
> The changes do not affect other components.
>
> Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
> ---
> drivers/common/idpf/base/idpf_controlq.c | 27 +++++++++++++++++---
> drivers/common/idpf/base/idpf_controlq_api.h | 9 +++++--
> 2 files changed, 31 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/common/idpf/base/idpf_controlq.c b/drivers/common/idpf/base/idpf_controlq.c
> index a82ca628de..0ba7281a45 100644
> --- a/drivers/common/idpf/base/idpf_controlq.c
> +++ b/drivers/common/idpf/base/idpf_controlq.c
> @@ -1,5 +1,5 @@
> /* SPDX-License-Identifier: BSD-3-Clause
> - * Copyright(c) 2001-2023 Intel Corporation
> + * Copyright(c) 2001-2024 Intel Corporation
> */
>
> #include "idpf_controlq.h"
> @@ -145,8 +145,12 @@ int idpf_ctlq_add(struct idpf_hw *hw,
> qinfo->buf_size > IDPF_CTLQ_MAX_BUF_LEN)
> return -EINVAL;
>
> +#ifndef NVME_CPF
> cq = (struct idpf_ctlq_info *)
> idpf_calloc(hw, 1, sizeof(struct idpf_ctlq_info));
> +#else
> + cq = *cq_out;
> +#endif
> if (!cq)
> return -ENOMEM;
>
> @@ -172,10 +176,15 @@ int idpf_ctlq_add(struct idpf_hw *hw,
> }
>
> if (status)
> +#ifdef NVME_CPF
> + return status;
> +#else
> goto init_free_q;
> +#endif
>
> if (is_rxq) {
> idpf_ctlq_init_rxq_bufs(cq);
> +#ifndef NVME_CPF
> } else {
> /* Allocate the array of msg pointers for TX queues */
> cq->bi.tx_msg = (struct idpf_ctlq_msg **)
> @@ -185,6 +194,7 @@ int idpf_ctlq_add(struct idpf_hw *hw,
> status = -ENOMEM;
> goto init_dealloc_q_mem;
> }
> +#endif
> }
>
> idpf_ctlq_setup_regs(cq, qinfo);
> @@ -195,6 +205,7 @@ int idpf_ctlq_add(struct idpf_hw *hw,
>
> LIST_INSERT_HEAD(&hw->cq_list_head, cq, cq_list);
>
> +#ifndef NVME_CPF
> *cq_out = cq;
> return status;
>
> @@ -205,6 +216,7 @@ int idpf_ctlq_add(struct idpf_hw *hw,
> idpf_free(hw, cq);
> cq = NULL;
>
> +#endif
> return status;
> }
>
> @@ -232,8 +244,13 @@ void idpf_ctlq_remove(struct idpf_hw *hw,
> * destroyed. This must be called prior to using the individual add/remove
> * APIs.
> */
> +#ifdef NVME_CPF
> +int idpf_ctlq_init(struct idpf_hw *hw, u8 num_q,
> + struct idpf_ctlq_create_info *q_info, struct idpf_ctlq_info **ctlq)
> +#else
> int idpf_ctlq_init(struct idpf_hw *hw, u8 num_q,
> struct idpf_ctlq_create_info *q_info)
> +#endif
> {
> struct idpf_ctlq_info *cq = NULL, *tmp = NULL;
> int ret_code = 0;
> @@ -244,6 +261,10 @@ int idpf_ctlq_init(struct idpf_hw *hw, u8 num_q,
> for (i = 0; i < num_q; i++) {
> struct idpf_ctlq_create_info *qinfo = q_info + i;
>
> +#ifdef NVME_CPF
> + cq = *(ctlq + i);
> +
> +#endif
> ret_code = idpf_ctlq_add(hw, qinfo, &cq);
> if (ret_code)
> goto init_destroy_qs;
> @@ -398,7 +419,7 @@ int idpf_ctlq_send(struct idpf_hw *hw, struct idpf_ctlq_info *cq,
> * ctlq_msgs and free or reuse the DMA buffers.
> */
> static int __idpf_ctlq_clean_sq(struct idpf_ctlq_info *cq, u16 *clean_count,
> - struct idpf_ctlq_msg *msg_status[], bool force)
> + struct idpf_ctlq_msg *msg_status[], bool force)
> {
> struct idpf_ctlq_desc *desc;
> u16 i = 0, num_to_clean;
> @@ -469,7 +490,7 @@ static int __idpf_ctlq_clean_sq(struct idpf_ctlq_info *cq, u16 *clean_count,
> * ctlq_msgs and free or reuse the DMA buffers.
> */
> int idpf_ctlq_clean_sq_force(struct idpf_ctlq_info *cq, u16 *clean_count,
> - struct idpf_ctlq_msg *msg_status[])
> + struct idpf_ctlq_msg *msg_status[])
> {
> return __idpf_ctlq_clean_sq(cq, clean_count, msg_status, true);
> }
> diff --git a/drivers/common/idpf/base/idpf_controlq_api.h b/drivers/common/idpf/base/idpf_controlq_api.h
> index 38f5d2df3c..bce5187981 100644
> --- a/drivers/common/idpf/base/idpf_controlq_api.h
> +++ b/drivers/common/idpf/base/idpf_controlq_api.h
> @@ -1,5 +1,5 @@
> /* SPDX-License-Identifier: BSD-3-Clause
> - * Copyright(c) 2001-2023 Intel Corporation
> + * Copyright(c) 2001-2024 Intel Corporation
> */
>
> #ifndef _IDPF_CONTROLQ_API_H_
> @@ -158,8 +158,13 @@ enum idpf_mbx_opc {
> /* Will init all required q including default mb. "q_info" is an array of
> * create_info structs equal to the number of control queues to be created.
> */
> +#ifdef NVME_CPF
> +int idpf_ctlq_init(struct idpf_hw *hw, u8 num_q,
> + struct idpf_ctlq_create_info *q_info, struct idpf_ctlq_info **ctlq);
> +#else
> int idpf_ctlq_init(struct idpf_hw *hw, u8 num_q,
> struct idpf_ctlq_create_info *q_info);
> +#endif
>
> /* Allocate and initialize a single control queue, which will be added to the
> * control queue list; returns a handle to the created control queue
> @@ -186,7 +191,7 @@ int idpf_ctlq_recv(struct idpf_ctlq_info *cq, u16 *num_q_msg,
>
> /* Reclaims all descriptors on HW write back */
> int idpf_ctlq_clean_sq_force(struct idpf_ctlq_info *cq, u16 *clean_count,
> - struct idpf_ctlq_msg *msg_status[]);
> + struct idpf_ctlq_msg *msg_status[]);
This is a whitespace change that has slipped in unrelated to the rest of
the patch. Not a big deal, just keep an eye out for such things. If there
are a few like this, you can consider just putting them in a misc patch at
the end.
>
> /* Reclaims send descriptors on HW write back */
> int idpf_ctlq_clean_sq(struct idpf_ctlq_info *cq, u16 *clean_count,
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-05-29 12:32 UTC|newest]
Thread overview: 125+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 7:28 [PATCH 00/25] Update IDPF Base Driver Soumyadeep Hore
2024-05-28 7:28 ` [PATCH 01/25] common/idpf: added NVME CPF specific code with defines Soumyadeep Hore
2024-05-29 12:32 ` Bruce Richardson [this message]
2024-05-28 7:28 ` [PATCH 02/25] common/idpf: updated IDPF VF device ID Soumyadeep Hore
2024-05-28 7:28 ` [PATCH 03/25] common/idpf: update ADD QUEUE GROUPS offset Soumyadeep Hore
2024-05-29 12:38 ` Bruce Richardson
2024-05-28 7:28 ` [PATCH 04/25] common/idpf: update in PTP message validation Soumyadeep Hore
2024-05-29 13:03 ` Bruce Richardson
2024-05-28 7:28 ` [PATCH 05/25] common/idpf: added FLOW STEER capability and a vport flag Soumyadeep Hore
2024-05-28 7:28 ` [PATCH 06/25] common/idpf: moved the IDPF HW into API header file Soumyadeep Hore
2024-05-28 7:28 ` [PATCH 07/25] common/idpf: avoid defensive programming Soumyadeep Hore
2024-05-28 7:28 ` [PATCH 08/25] common/idpf: move related defines into enums Soumyadeep Hore
2024-05-28 7:28 ` [PATCH 09/25] common/idpf: add flex array support to virtchnl2 structures Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 00/21] Update MEV TS Base Driver Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 01/21] common/idpf: added NVME CPF specific code with defines Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 02/21] common/idpf: updated IDPF VF device ID Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 03/21] common/idpf: added new virtchnl2 capability and vport flag Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 04/21] common/idpf: moved the idpf HW into API header file Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 05/21] common/idpf: avoid defensive programming Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 06/21] common/idpf: use BIT ULL for large bitmaps Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 07/21] common/idpf: convert data type to 'le' Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 08/21] common/idpf: compress RXDID mask definitions Soumyadeep Hore
2024-06-04 8:05 ` [PATCH v2 09/21] common/idpf: refactor size check macro Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 10/21] common/idpf: update mask of Rx FLEX DESC ADV FF1 M Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 11/21] common/idpf: use 'pad' and 'reserved' fields appropriately Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 12/21] common/idpf: move related defines into enums Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 13/21] common/idpf: avoid variable 0-init Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 14/21] common/idpf: update in PTP message validation Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 15/21] common/idpf: rename INLINE FLOW STEER to FLOW STEER Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 16/21] common/idpf: add wmb before tail Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 17/21] drivers: add flex array support and fix issues Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 18/21] common/idpf: enable flow steer capability for vports Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 19/21] common/idpf: add a new Tx context descriptor structure Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 20/21] common/idpf: remove idpf common file Soumyadeep Hore
2024-06-04 8:06 ` [PATCH v2 21/21] drivers: adding type to idpf vc queue switch Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 00/22] Update MEV TS Base Driver Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 01/22] common/idpf: added NVME CPF specific code with defines Soumyadeep Hore
2024-06-14 10:33 ` Burakov, Anatoly
2024-06-12 3:52 ` [PATCH v3 02/22] common/idpf: updated IDPF VF device ID Soumyadeep Hore
2024-06-14 10:36 ` Burakov, Anatoly
2024-06-12 3:52 ` [PATCH v3 03/22] common/idpf: added new virtchnl2 capability and vport flag Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 04/22] common/idpf: moved the idpf HW into API header file Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 05/22] common/idpf: avoid defensive programming Soumyadeep Hore
2024-06-14 12:16 ` Burakov, Anatoly
2024-06-12 3:52 ` [PATCH v3 06/22] common/idpf: use BIT ULL for large bitmaps Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 07/22] common/idpf: convert data type to 'le' Soumyadeep Hore
2024-06-14 12:19 ` Burakov, Anatoly
2024-06-12 3:52 ` [PATCH v3 08/22] common/idpf: compress RXDID mask definitions Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 09/22] common/idpf: refactor size check macro Soumyadeep Hore
2024-06-14 12:21 ` Burakov, Anatoly
2024-06-12 3:52 ` [PATCH v3 10/22] common/idpf: update mask of Rx FLEX DESC ADV FF1 M Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 00/21] Update MEV TS Base Driver Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 01/21] common/idpf: updated IDPF VF device ID Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 02/21] common/idpf: added new virtchnl2 capability and vport flag Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 03/21] common/idpf: moved the idpf HW into API header file Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 04/21] common/idpf: avoid defensive programming Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 05/21] common/idpf: use BIT ULL for large bitmaps Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 06/21] common/idpf: convert data type to 'le' Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 07/21] common/idpf: compress RXDID mask definitions Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 08/21] common/idpf: refactor size check macro Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 09/21] common/idpf: update mask of Rx FLEX DESC ADV FF1 M Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 10/21] common/idpf: use 'pad' and 'reserved' fields appropriately Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 11/21] common/idpf: move related defines into enums Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 12/21] common/idpf: avoid variable 0-init Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 13/21] common/idpf: update in PTP message validation Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 14/21] common/idpf: rename INLINE FLOW STEER to FLOW STEER Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 15/21] common/idpf: add wmb before tail Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 16/21] drivers: add flex array support and fix issues Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 17/21] common/idpf: enable flow steer capability for vports Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 18/21] common/idpf: add a new Tx context descriptor structure Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 19/21] common/idpf: remove idpf common file Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 20/21] drivers: adding type to idpf vc queue switch Soumyadeep Hore
2024-06-18 10:57 ` [PATCH v4 21/21] doc: updated the documentation for cpfl PMD Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 00/21] Update MEV TS Base Driver Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 01/21] common/idpf: updated IDPF VF device ID Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 02/21] common/idpf: added new virtchnl2 capability and vport flag Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 03/21] common/idpf: moved the idpf HW into API header file Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 04/21] common/idpf: avoid defensive programming Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 05/21] common/idpf: use BIT ULL for large bitmaps Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 06/21] common/idpf: convert data type to 'le' Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 07/21] common/idpf: compress RXDID mask definitions Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 08/21] common/idpf: refactor size check macro Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 09/21] common/idpf: update mask of Rx FLEX DESC ADV FF1 M Soumyadeep Hore
2024-06-28 14:16 ` Bruce Richardson
2024-06-24 9:16 ` [PATCH v5 10/21] common/idpf: use 'pad' and 'reserved' fields appropriately Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 11/21] common/idpf: move related defines into enums Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 12/21] common/idpf: avoid variable 0-init Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 13/21] common/idpf: update in PTP message validation Soumyadeep Hore
2024-06-28 14:33 ` Bruce Richardson
2024-06-24 9:16 ` [PATCH v5 14/21] common/idpf: rename INLINE FLOW STEER to FLOW STEER Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 15/21] common/idpf: add wmb before tail Soumyadeep Hore
2024-06-28 14:45 ` Bruce Richardson
2024-07-01 10:05 ` Hore, Soumyadeep
2024-07-01 9:13 ` [PATCH v6 0/7] Update MEV TS Base Driver Soumyadeep Hore
2024-07-01 9:13 ` [PATCH v6 1/7] common/idpf: add wmb before tail Soumyadeep Hore
2024-07-01 9:13 ` [PATCH v6 2/7] drivers: adding macros for dynamic data structures Soumyadeep Hore
2024-07-01 9:13 ` [PATCH v6 3/7] common/idpf: enable flow steer capability for vports Soumyadeep Hore
2024-07-01 9:13 ` [PATCH v6 4/7] common/idpf: add a new Tx context descriptor structure Soumyadeep Hore
2024-07-01 9:13 ` [PATCH v6 5/7] common/idpf: remove idpf common file Soumyadeep Hore
2024-07-01 9:13 ` [PATCH v6 6/7] drivers: adding config queue types for virtchnl2 message Soumyadeep Hore
2024-07-01 9:13 ` [PATCH v6 7/7] doc: updated the documentation for cpfl PMD Soumyadeep Hore
2024-07-01 11:23 ` [PATCH v6 0/7] Update MEV TS Base Driver Bruce Richardson
2024-06-24 9:16 ` [PATCH v5 16/21] drivers: add flex array support and fix issues Soumyadeep Hore
2024-06-28 14:50 ` Bruce Richardson
2024-07-01 10:09 ` Hore, Soumyadeep
2024-06-24 9:16 ` [PATCH v5 17/21] common/idpf: enable flow steer capability for vports Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 18/21] common/idpf: add a new Tx context descriptor structure Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 19/21] common/idpf: remove idpf common file Soumyadeep Hore
2024-06-24 9:16 ` [PATCH v5 20/21] drivers: adding type to idpf vc queue switch Soumyadeep Hore
2024-06-28 14:53 ` Bruce Richardson
2024-06-24 9:16 ` [PATCH v5 21/21] doc: updated the documentation for cpfl PMD Soumyadeep Hore
2024-06-28 14:58 ` [PATCH v5 00/21] Update MEV TS Base Driver Bruce Richardson
2024-06-12 3:52 ` [PATCH v3 11/22] common/idpf: use 'pad' and 'reserved' fields appropriately Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 12/22] common/idpf: move related defines into enums Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 13/22] common/idpf: avoid variable 0-init Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 14/22] common/idpf: update in PTP message validation Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 15/22] common/idpf: rename INLINE FLOW STEER to FLOW STEER Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 16/22] common/idpf: add wmb before tail Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 17/22] drivers: add flex array support and fix issues Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 18/22] common/idpf: enable flow steer capability for vports Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 19/22] common/idpf: add a new Tx context descriptor structure Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 20/22] common/idpf: remove idpf common file Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 21/22] drivers: adding type to idpf vc queue switch Soumyadeep Hore
2024-06-12 3:52 ` [PATCH v3 22/22] doc: updated the documentation for cpfl PMD Soumyadeep Hore
2024-06-14 12:48 ` [PATCH v3 00/22] Update MEV TS Base Driver Burakov, Anatoly
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=ZlcgUkE_zQb5qFjL@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=soumyadeep.hore@intel.com \
--cc=yuying.zhang@intel.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).