From: Wenjing Qiao <wenjing.qiao@intel.com>
To: jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com
Cc: dev@dpdk.org, Wenjing Qiao <wenjing.qiao@intel.com>,
stable@dpdk.org, Priyalee Kushwaha <priyalee.kushwaha@intel.com>
Subject: [PATCH 03/18] common/idpf: fix ITR register definitions for AVF
Date: Thu, 13 Apr 2023 05:44:47 -0400 [thread overview]
Message-ID: <20230413094502.1714755-4-wenjing.qiao@intel.com> (raw)
In-Reply-To: <20230413094502.1714755-1-wenjing.qiao@intel.com>
Fix ITR register definitions for AVF1.0 and AVF2.0
Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")
Cc: stable@dpdk.org
Signed-off-by: Priyalee Kushwaha <priyalee.kushwaha@intel.com>
Signed-off-by: Wenjing Qiao <wenjing.qiao@intel.com>
---
drivers/common/idpf/base/idpf_lan_pf_regs.h | 9 +++++++--
drivers/common/idpf/base/idpf_lan_vf_regs.h | 17 ++++++++++++-----
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/common/idpf/base/idpf_lan_pf_regs.h b/drivers/common/idpf/base/idpf_lan_pf_regs.h
index 3df2347bd7..7f731ec3d6 100644
--- a/drivers/common/idpf/base/idpf_lan_pf_regs.h
+++ b/drivers/common/idpf/base/idpf_lan_pf_regs.h
@@ -77,8 +77,13 @@
#define PF_GLINT_DYN_CTL_WB_ON_ITR_M BIT(PF_GLINT_DYN_CTL_WB_ON_ITR_S)
#define PF_GLINT_DYN_CTL_INTENA_MSK_S 31
#define PF_GLINT_DYN_CTL_INTENA_MSK_M BIT(PF_GLINT_DYN_CTL_INTENA_MSK_S)
-#define PF_GLINT_ITR_V2(_i, _reg_start) (((_i) * 4) + (_reg_start))
-#define PF_GLINT_ITR(_i, _INT) (PF_GLINT_BASE + (((_i) + 1) * 4) + ((_INT) * 0x1000))
+/* _ITR is ITR index, _INT is interrupt index, _itrn_indx_spacing is
+ * spacing b/w itrn registers of the same vector.
+ */
+#define PF_GLINT_ITR_ADDR(_ITR, _reg_start, _itrn_indx_spacing) \
+ ((_reg_start) + (((_ITR)) * (_itrn_indx_spacing)))
+/* For PF, itrn_indx_spacing is 4 and itrn_reg_spacing is 0x1000 */
+#define PF_GLINT_ITR(_ITR, _INT) (PF_GLINT_BASE + (((_ITR) + 1) * 4) + ((_INT) * 0x1000))
#define PF_GLINT_ITR_MAX_INDEX 2
#define PF_GLINT_ITR_INTERVAL_S 0
#define PF_GLINT_ITR_INTERVAL_M MAKEMASK(0xFFF, PF_GLINT_ITR_INTERVAL_S)
diff --git a/drivers/common/idpf/base/idpf_lan_vf_regs.h b/drivers/common/idpf/base/idpf_lan_vf_regs.h
index 9cd4f757d9..13c5c5a7da 100644
--- a/drivers/common/idpf/base/idpf_lan_vf_regs.h
+++ b/drivers/common/idpf/base/idpf_lan_vf_regs.h
@@ -90,11 +90,18 @@
#define VF_INT_DYN_CTLN_WB_ON_ITR_M BIT(VF_INT_DYN_CTLN_WB_ON_ITR_S)
#define VF_INT_DYN_CTLN_INTENA_MSK_S 31
#define VF_INT_DYN_CTLN_INTENA_MSK_M BIT(VF_INT_DYN_CTLN_INTENA_MSK_S)
-#define VF_INT_ITR0(_i) (0x00004C00 + ((_i) * 4))
-#define VF_INT_ITRN_V2(_i, _reg_start) ((_reg_start) + (((_i)) * 4))
-#define VF_INT_ITRN(_i, _INT) (0x00002800 + ((_i) * 4) + ((_INT) * 0x40))
-#define VF_INT_ITRN_64(_i, _INT) (0x00002C00 + ((_i) * 4) + ((_INT) * 0x100))
-#define VF_INT_ITRN_2K(_i, _INT) (0x00072000 + ((_i) * 4) + ((_INT) * 0x100))
+/* _ITR is ITR index, _INT is interrupt index, _itrn_indx_spacing is spacing
+ * b/w itrn registers of the same vector
+ */
+#define VF_INT_ITR0(_ITR) (0x00004C00 + ((_ITR) * 4))
+#define VF_INT_ITRN_ADDR(_ITR, _reg_start, _itrn_indx_spacing) \
+ ((_reg_start) + (((_ITR)) * (_itrn_indx_spacing)))
+/* For VF with 16 vector support, itrn_reg_spacing is 0x4 and itrn_indx_spacing is 0x40 */
+#define VF_INT_ITRN(_INT, _ITR) (0x00002800 + ((_INT) * 4) + ((_ITR) * 0x40))
+/* For VF with 64 vector support, itrn_reg_spacing is 0x4 and itrn_indx_spacing is 0x100 */
+#define VF_INT_ITRN_64(_INT, _ITR) (0x00002C00 + ((_INT) * 4) + ((_ITR) * 0x100))
+/* For VF with 2k vector support, itrn_reg_spacing is 0x4 and itrn_indx_spacing is 0x2000 */
+#define VF_INT_ITRN_2K(_INT, _ITR) (0x00072000 + ((_INT) * 4) + ((_ITR) * 0x2000))
#define VF_INT_ITRN_MAX_INDEX 2
#define VF_INT_ITRN_INTERVAL_S 0
#define VF_INT_ITRN_INTERVAL_M MAKEMASK(0xFFF, VF_INT_ITRN_INTERVAL_S)
--
2.25.1
next prev parent reply other threads:[~2023-04-13 9:50 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 9:44 [PATCH 00/18] update idpf shared code Wenjing Qiao
2023-04-13 9:44 ` [PATCH 01/18] common/idpf: support flow subscription Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 00/15] update idpf shared code Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 01/15] common/idpf: remove virtchnl related " Wenjing Qiao
2023-04-24 11:52 ` Zhang, Qi Z
2023-04-26 10:22 ` [PATCH v3 00/15] update idpf base code Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 01/15] common/idpf/base: remove virtchnl related " Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 02/15] common/idpf/base: fix ctlq message send and receive Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 03/15] common/idpf/base: fix ITR register definitions for AVF Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 04/15] common/idpf/base: remove qregion struct variables Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 05/15] common/idpf/base: move OEM capability to the last bit Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 06/15] common/idpf/base: modify SSO/LSO and ITR fields Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 07/15] common/idpf/base: add virtchnl2 error codes Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 08/15] common/idpf/base: swap opcode and retval location in msg struct Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 09/15] common/idpf/base: fix idpf_send_msg_to_cp prototypes Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 10/15] common/idpf/base: fix memory leaks on ctrlq functions Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 11/15] common/idpf/base: allocate static buffer at initialization Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 12/15] common/idpf/base: replace MAKEMASK to IDPF_M Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 13/15] common/idpf/base: add/delete queue groups commands Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 14/15] common/idpf/base: add func to clean all DESCs on controlq Wenjing Qiao
2023-04-26 10:22 ` [PATCH v3 15/15] common/idpf/base: update license and README Wenjing Qiao
2023-04-26 11:56 ` Zhang, Qi Z
2023-06-12 10:18 ` Thomas Monjalon
2023-04-26 12:40 ` [PATCH v3 00/15] update idpf base code Zhang, Qi Z
2023-04-21 8:40 ` [PATCH v2 02/15] common/idpf: fix ctlq message send and receive Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 03/15] common/idpf: fix ITR register definitions for AVF Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 04/15] common/idpf: remove qregion struct variables Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 05/15] common/idpf: move OEM capability to the last bit Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 06/15] common/idpf: modify SSO/LSO and ITR fields Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 07/15] common/idpf: add virtchnl2 error codes Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 08/15] common/idpf: swap opcode and retval location in msg struct Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 09/15] common/idpf: fix idpf_send_msg_to_cp prototypes Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 10/15] common/idpf: fix memory leaks on ctrlq functions Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 11/15] common/idpf: allocate static buffer at initialization Wenjing Qiao
2023-04-24 12:15 ` Zhang, Qi Z
2023-04-21 8:40 ` [PATCH v2 12/15] common/idpf: replace MAKEMASK to IDPF_M Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 13/15] common/idpf: add/delete queue groups commands Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 14/15] common/idpf: add func to clean all DESCs on controlq Wenjing Qiao
2023-04-21 8:40 ` [PATCH v2 15/15] common/idpf: update license and README Wenjing Qiao
2023-04-13 9:44 ` [PATCH 02/18] common/idpf: fix ctlq message send and receive Wenjing Qiao
2023-04-13 9:44 ` Wenjing Qiao [this message]
2023-04-13 9:44 ` [PATCH 04/18] common/idpf: remove qregion struct variables Wenjing Qiao
2023-04-13 9:44 ` [PATCH 05/18] common/idpf: move OEM capability to the last bit Wenjing Qiao
2023-04-13 9:44 ` [PATCH 06/18] common/idpf: modify SSO/LSO and ITR fields Wenjing Qiao
2023-04-13 9:44 ` [PATCH 07/18] common/idpf: add virtchnl2 error codes Wenjing Qiao
2023-04-13 9:44 ` [PATCH 08/18] common/idpf: swap opcode and retval location in msg struct Wenjing Qiao
2023-04-13 9:44 ` [PATCH 09/18] common/idpf: fix idpf_send_msg_to_cp prototypes Wenjing Qiao
2023-04-13 9:44 ` [PATCH 10/18] common/idpf: fix memory leaks on ctrlq functions Wenjing Qiao
2023-04-13 9:44 ` [PATCH 11/18] common/idpf: allocate static buffer at initialization Wenjing Qiao
2023-04-13 9:44 ` [PATCH 12/18] common/idpf: add SyncE support over VF Wenjing Qiao
2023-04-13 9:44 ` [PATCH 13/18] common/idpf: replace MAKEMASK to IDPF_M Wenjing Qiao
2023-04-13 9:44 ` [PATCH 14/18] common/idpf: add GNSS support over VF Wenjing Qiao
2023-04-13 9:44 ` [PATCH 15/18] common/idpf: add/delete queue groups commands Wenjing Qiao
2023-04-13 9:45 ` [PATCH 16/18] common/idpf: add func to clean all DESCs on controlq Wenjing Qiao
2023-04-13 9:45 ` [PATCH 17/18] common/idpf: fix cannot understand warnings Wenjing Qiao
2023-04-13 9:45 ` [PATCH 18/18] common/idpf: update license and README Wenjing Qiao
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=20230413094502.1714755-4-wenjing.qiao@intel.com \
--to=wenjing.qiao@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=priyalee.kushwaha@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
/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).