From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Xinying Yu <xinying.yu@corigine.com>,
chaoyong.he@corigine.com, stable@dpdk.org,
Long Wu <long.wu@corigine.com>,
Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH 02/10] vdpa/nfp: fix logic in hardware init
Date: Fri, 26 Apr 2024 15:48:23 +0800 [thread overview]
Message-ID: <20240426074831.1729792-3-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20240426074831.1729792-1-chaoyong.he@corigine.com>
From: Xinying Yu <xinying.yu@corigine.com>
Reconfigure the NIC will fail because lack of the
initialization logic of queue configuration pointer.
Fix this by adding the correct initialization logic.
Fixes: d89f4990c14e ("vdpa/nfp: add hardware init")
Cc: chaoyong.he@corigine.com
Cc: stable@dpdk.org
Signed-off-by: Xinying Yu <xinying.yu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/vdpa/nfp/nfp_vdpa_core.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/vdpa/nfp/nfp_vdpa_core.c b/drivers/vdpa/nfp/nfp_vdpa_core.c
index 7b877605e4..291798196c 100644
--- a/drivers/vdpa/nfp/nfp_vdpa_core.c
+++ b/drivers/vdpa/nfp/nfp_vdpa_core.c
@@ -55,7 +55,10 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw,
struct rte_pci_device *pci_dev)
{
uint32_t queue;
+ uint8_t *tx_bar;
+ uint32_t start_q;
struct nfp_hw *hw;
+ uint32_t tx_bar_off;
uint8_t *notify_base;
hw = &vdpa_hw->super;
@@ -82,6 +85,12 @@ nfp_vdpa_hw_init(struct nfp_vdpa_hw *vdpa_hw,
idx + 1, vdpa_hw->notify_addr[idx + 1]);
}
+ /* NFP vDPA cfg queue setup */
+ start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_TXQ);
+ tx_bar_off = start_q * NFP_QCP_QUEUE_ADDR_SZ;
+ tx_bar = (uint8_t *)pci_dev->mem_resource[2].addr + tx_bar_off;
+ hw->qcp_cfg = tx_bar + NFP_QCP_QUEUE_ADDR_SZ;
+
vdpa_hw->features = (1ULL << VIRTIO_F_VERSION_1) |
(1ULL << VIRTIO_F_IN_ORDER) |
(1ULL << VHOST_USER_F_PROTOCOL_FEATURES);
--
2.39.1
next parent reply other threads:[~2024-04-26 7:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240426074831.1729792-1-chaoyong.he@corigine.com>
2024-04-26 7:48 ` Chaoyong He [this message]
2024-06-13 11:41 ` Maxime Coquelin
2024-04-26 7:48 ` [PATCH 03/10] vdpa/nfp: fix the logic of reconfiguration Chaoyong He
2024-06-13 11:43 ` Maxime Coquelin
2024-06-14 2:30 ` Chaoyong He
[not found] ` <20240614070120.2663160-1-chaoyong.he@corigine.com>
2024-06-14 7:01 ` [PATCH v2 02/11] vdpa/nfp: fix logic in hardware init Chaoyong He
2024-06-14 7:01 ` [PATCH v2 03/11] vdpa/nfp: fix the logic of reconfiguration Chaoyong He
[not found] ` <20240617062708.2932037-1-chaoyong.he@corigine.com>
2024-06-17 6:26 ` [PATCH v3 02/11] vdpa/nfp: fix logic in hardware init Chaoyong He
2024-06-18 7:50 ` Maxime Coquelin
2024-06-17 6:27 ` [PATCH v3 03/11] vdpa/nfp: fix the logic of reconfiguration Chaoyong He
2024-06-18 7:51 ` Maxime Coquelin
[not found] ` <20240805021248.1051198-1-chaoyong.he@corigine.com>
2024-08-05 2:12 ` [PATCH v4 02/11] vdpa/nfp: fix logic in hardware init Chaoyong He
2024-08-05 2:12 ` [PATCH v4 03/11] vdpa/nfp: fix the logic of reconfiguration Chaoyong He
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=20240426074831.1729792-3-chaoyong.he@corigine.com \
--to=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=long.wu@corigine.com \
--cc=oss-drivers@corigine.com \
--cc=peng.zhang@corigine.com \
--cc=stable@dpdk.org \
--cc=xinying.yu@corigine.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).