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 4/5] vdpa/sfc: enable support for multi-queue
Date: Thu, 14 Jul 2022 14:14:50 +0530 [thread overview]
Message-ID: <20220714084451.38375-5-asaini@xilinx.com> (raw)
In-Reply-To: <20220714084451.38375-1-asaini@xilinx.com>
From: Abhimanyu Saini <absaini@amd.com>
Increase the number to default RX/TX queue pairs to 8,
and add MQ feature flag to vDPA protocol features.
Signed-off-by: Abhimanyu Saini <absaini@amd.com>
---
v2:
* Fix checkpatch warnings
* Add a cover letter
drivers/vdpa/sfc/sfc_vdpa_hw.c | 2 ++
drivers/vdpa/sfc/sfc_vdpa_ops.c | 10 ++++++----
drivers/vdpa/sfc/sfc_vdpa_ops.h | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/vdpa/sfc/sfc_vdpa_hw.c b/drivers/vdpa/sfc/sfc_vdpa_hw.c
index a7018b1ffe..edb7e35c2c 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_hw.c
+++ b/drivers/vdpa/sfc/sfc_vdpa_hw.c
@@ -286,6 +286,8 @@ sfc_vdpa_estimate_resource_limits(struct sfc_vdpa_adapter *sva)
SFC_VDPA_ASSERT(max_queue_cnt > 0);
sva->max_queue_count = max_queue_cnt;
+ sfc_vdpa_log_init(sva, "NIC init done with %u pair(s) of queues",
+ max_queue_cnt);
return 0;
diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.c b/drivers/vdpa/sfc/sfc_vdpa_ops.c
index f4c4f82605..6401d4e16f 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_ops.c
+++ b/drivers/vdpa/sfc/sfc_vdpa_ops.c
@@ -24,14 +24,16 @@
(1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ) | \
(1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD) | \
(1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) | \
- (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD))
+ (1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD) | \
+ (1ULL << VHOST_USER_PROTOCOL_F_MQ))
/*
* Set of features which are enabled by default.
* Protocol feature bit is needed to enable notification notifier ctrl.
*/
#define SFC_VDPA_DEFAULT_FEATURES \
- (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)
+ ((1ULL << VHOST_USER_F_PROTOCOL_FEATURES) | \
+ (1ULL << VIRTIO_NET_F_MQ))
#define SFC_VDPA_MSIX_IRQ_SET_BUF_LEN \
(sizeof(struct vfio_irq_set) + \
@@ -321,8 +323,8 @@ sfc_vdpa_virtq_stop(struct sfc_vdpa_ops_data *ops_data, int vq_num)
/* stop the vq */
rc = efx_virtio_qstop(vq, &vq_idx);
if (rc == 0) {
- ops_data->vq_cxt[vq_num].cidx = vq_idx.evvd_vq_cidx;
- ops_data->vq_cxt[vq_num].pidx = vq_idx.evvd_vq_pidx;
+ ops_data->vq_cxt[vq_num].cidx = vq_idx.evvd_vq_used_idx;
+ ops_data->vq_cxt[vq_num].pidx = vq_idx.evvd_vq_avail_idx;
}
ops_data->vq_cxt[vq_num].enable = B_FALSE;
diff --git a/drivers/vdpa/sfc/sfc_vdpa_ops.h b/drivers/vdpa/sfc/sfc_vdpa_ops.h
index 9dbd5b84dd..5c8e352de3 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_ops.h
+++ b/drivers/vdpa/sfc/sfc_vdpa_ops.h
@@ -7,7 +7,7 @@
#include <rte_vdpa.h>
-#define SFC_VDPA_MAX_QUEUE_PAIRS 1
+#define SFC_VDPA_MAX_QUEUE_PAIRS 8
enum sfc_vdpa_context {
SFC_VDPA_AS_VF
--
2.18.2
next prev 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 ` [PATCH v2 3/5] common/sfc_efx/base: use the updated definitions of cidx/pidx abhimanyu.saini
2022-07-14 8:44 ` abhimanyu.saini [this message]
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-5-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).