DPDK patches and discussions
 help / color / mirror / Atom feed
From: <abhimanyu.saini@xilinx.com>
To: <dev@dpdk.org>
Cc: <chenbo.xia@intel.com>, <maxime.coquelin@redhat.com>,
	<andrew.rybchenko@oktetlabs.ru>,
	Abhimanyu Saini <absaini@amd.com>
Subject: [PATCH v2 3/5] common/sfc_efx/base: use the updated definitions of cidx/pidx
Date: Thu, 14 Jul 2022 14:14:49 +0530	[thread overview]
Message-ID: <20220714084451.38375-4-asaini@xilinx.com> (raw)
In-Reply-To: <20220714084451.38375-1-asaini@xilinx.com>

From: Abhimanyu Saini <absaini@amd.com>

Change cidx and pidx definition to mean used queue and avail
queue index respectively.

Signed-off-by: Abhimanyu Saini <absaini@amd.com>
---
v2:
* Fix checkpatch warnings
* Add a cover letter

 drivers/common/sfc_efx/base/efx.h          | 12 ++++++------
 drivers/common/sfc_efx/base/rhead_virtio.c | 16 ++++++++--------
 drivers/vdpa/sfc/sfc_vdpa_ops.c            |  4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 95f5fb6bc0..c19205c638 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -4886,17 +4886,17 @@ typedef enum efx_virtio_vq_type_e {
 
 typedef struct efx_virtio_vq_dyncfg_s {
 	/*
-	 * If queue is being created to be migrated then this
-	 * should be the FINAL_PIDX value returned by MC_CMD_VIRTIO_FINI_QUEUE
+	 * If queue is being created to be migrated then this should be
+	 * the FINAL_AVAIL_IDX value returned by MC_CMD_VIRTIO_FINI_QUEUE
 	 * of the queue being migrated from. Otherwise, it should be zero.
 	 */
-	uint32_t		evvd_vq_pidx;
+	uint32_t		evvd_vq_avail_idx;
 	/*
-	 * If this queue is being created to be migrated then this
-	 * should be the FINAL_CIDX value returned by MC_CMD_VIRTIO_FINI_QUEUE
+	 * If queue is being created to be migrated then this should be
+	 * the FINAL_USED_IDX value returned by MC_CMD_VIRTIO_FINI_QUEUE
 	 * of the queue being migrated from. Otherwise, it should be zero.
 	 */
-	uint32_t		evvd_vq_cidx;
+	uint32_t		evvd_vq_used_idx;
 } efx_virtio_vq_dyncfg_t;
 
 /*
diff --git a/drivers/common/sfc_efx/base/rhead_virtio.c b/drivers/common/sfc_efx/base/rhead_virtio.c
index 7f087170fe..5a2ebe8822 100644
--- a/drivers/common/sfc_efx/base/rhead_virtio.c
+++ b/drivers/common/sfc_efx/base/rhead_virtio.c
@@ -95,10 +95,10 @@ rhead_virtio_qstart(
 		evvcp->evcc_features >> 32);
 
 	if (evvdp != NULL) {
-		MCDI_IN_SET_DWORD(req, VIRTIO_INIT_QUEUE_REQ_INITIAL_PIDX,
-			evvdp->evvd_vq_pidx);
-		MCDI_IN_SET_DWORD(req, VIRTIO_INIT_QUEUE_REQ_INITIAL_CIDX,
-			evvdp->evvd_vq_cidx);
+		MCDI_IN_SET_DWORD(req, VIRTIO_INIT_QUEUE_REQ_INITIAL_AVAIL_IDX,
+			evvdp->evvd_vq_avail_idx);
+		MCDI_IN_SET_DWORD(req, VIRTIO_INIT_QUEUE_REQ_INITIAL_USED_IDX,
+			evvdp->evvd_vq_used_idx);
 	}
 
 	MCDI_IN_SET_DWORD(req, VIRTIO_INIT_QUEUE_REQ_MPORT_SELECTOR,
@@ -161,10 +161,10 @@ rhead_virtio_qstop(
 	}
 
 	if (evvdp != NULL) {
-		evvdp->evvd_vq_pidx =
-		    MCDI_OUT_DWORD(req, VIRTIO_FINI_QUEUE_RESP_FINAL_PIDX);
-		evvdp->evvd_vq_cidx =
-		    MCDI_OUT_DWORD(req, VIRTIO_FINI_QUEUE_RESP_FINAL_CIDX);
+		evvdp->evvd_vq_avail_idx =
+		    MCDI_OUT_DWORD(req, VIRTIO_FINI_QUEUE_RESP_FINAL_AVAIL_IDX);
+		evvdp->evvd_vq_used_idx =
+		    MCDI_OUT_DWORD(req, VIRTIO_FINI_QUEUE_RESP_FINAL_USED_IDX);
 	}
 
 	return (0);
diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.c b/drivers/vdpa/sfc/sfc_vdpa_ops.c
index b84699d234..f4c4f82605 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_ops.c
+++ b/drivers/vdpa/sfc/sfc_vdpa_ops.c
@@ -258,8 +258,8 @@ sfc_vdpa_virtq_start(struct sfc_vdpa_ops_data *ops_data, int vq_num)
 	vq_cfg.evvc_used_ring_addr  = vring.used;
 	vq_cfg.evvc_vq_size = vring.size;
 
-	vq_dyncfg.evvd_vq_pidx = vring.last_used_idx;
-	vq_dyncfg.evvd_vq_cidx = vring.last_avail_idx;
+	vq_dyncfg.evvd_vq_used_idx  = vring.last_used_idx;
+	vq_dyncfg.evvd_vq_avail_idx = vring.last_avail_idx;
 
 	/* MSI-X vector is function-relative */
 	vq_cfg.evvc_msix_vector = RTE_INTR_VEC_RXTX_OFFSET + vq_num;
-- 
2.18.2


  parent reply	other threads:[~2022-07-14  8:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14  8:44 [PATCH v2 0/5] Add support for live migration and cleanup MCDI headers abhimanyu.saini
2022-07-14  8:44 ` [PATCH v2 1/5] common/sfc_efx/base: remove VQ index check during VQ start abhimanyu.saini
2022-07-14  8:44 ` [PATCH v2 2/5] common/sfc_efx/base: update MCDI headers abhimanyu.saini
2022-07-14  8:44 ` abhimanyu.saini [this message]
2022-07-14  8:44 ` [PATCH v2 4/5] vdpa/sfc: enable support for multi-queue abhimanyu.saini
2022-07-14  8:44 ` [PATCH v2 5/5] vdpa/sfc: Add support for SW assisted live migration abhimanyu.saini
2022-07-14 13:47 ` [PATCH v3 0/5] Add support for live migration and cleanup MCDI headers abhimanyu.saini
2022-07-14 13:48   ` [PATCH v3 1/5] common/sfc_efx/base: remove VQ index check during VQ start abhimanyu.saini
2022-07-14 13:48   ` [PATCH v3 2/5] common/sfc_efx/base: update MCDI headers abhimanyu.saini
2022-07-28 11:32     ` Andrew Rybchenko
2022-07-14 13:48   ` [PATCH v3 3/5] common/sfc_efx/base: use the updated definitions of cidx/pidx abhimanyu.saini
2022-07-28 11:34     ` Andrew Rybchenko
2022-07-14 13:48   ` [PATCH v3 4/5] vdpa/sfc: enable support for multi-queue abhimanyu.saini
2022-07-28 11:29     ` Andrew Rybchenko
2022-07-14 13:48   ` [PATCH v3 5/5] vdpa/sfc: Add support for SW assisted live migration abhimanyu.saini
2022-07-28 13:42     ` Andrew Rybchenko
2022-10-04 15:31   ` [PATCH v3 0/5] Add support for live migration and cleanup MCDI headers Andrew Rybchenko

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=20220714084451.38375-4-asaini@xilinx.com \
    --to=abhimanyu.saini@xilinx.com \
    --cc=absaini@amd.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.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).