From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com,
marco.chiappero@intel.com,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Subject: [PATCH 18/24] crypto: qat - reorganize PFVF protocol definitions
Date: Wed, 10 Nov 2021 20:52:11 +0000 [thread overview]
Message-ID: <20211110205217.99903-19-giovanni.cabiddu@intel.com> (raw)
In-Reply-To: <20211110205217.99903-1-giovanni.cabiddu@intel.com>
From: Marco Chiappero <marco.chiappero@intel.com>
Organize PFVF protocol definitions by type rather than direction, by
keeping related fields close.
Also, make sure the order is consistent for both PF and VF definitions.
Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
---
drivers/crypto/qat/qat_common/adf_pfvf_msg.h | 36 +++++++++++---------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/drivers/crypto/qat/qat_common/adf_pfvf_msg.h b/drivers/crypto/qat/qat_common/adf_pfvf_msg.h
index 0520466563fd..23f4c4b35dac 100644
--- a/drivers/crypto/qat/qat_common/adf_pfvf_msg.h
+++ b/drivers/crypto/qat/qat_common/adf_pfvf_msg.h
@@ -53,34 +53,21 @@
* adf_gen2_pfvf_send() in adf_pf2vf_msg.c).
*/
-#define ADF_PFVF_COMPAT_THIS_VERSION 0x1 /* PF<->VF compat */
-
/* PF->VF messages */
#define ADF_PF2VF_INT BIT(0)
#define ADF_PF2VF_MSGORIGIN_SYSTEM BIT(1)
+#define ADF_PF2VF_IN_USE_BY_PF 0x6AC20000
+#define ADF_PF2VF_IN_USE_BY_PF_MASK 0xFFFE0000
#define ADF_PF2VF_MSGTYPE_MASK 0x0000003C
#define ADF_PF2VF_MSGTYPE_SHIFT 2
#define ADF_PF2VF_MSGTYPE_RESTARTING 0x01
#define ADF_PF2VF_MSGTYPE_VERSION_RESP 0x02
-#define ADF_PF2VF_IN_USE_BY_PF 0x6AC20000
-#define ADF_PF2VF_IN_USE_BY_PF_MASK 0xFFFE0000
-
-/* PF->VF Version Response */
-#define ADF_PF2VF_VERSION_RESP_VERS_MASK 0x00003FC0
-#define ADF_PF2VF_VERSION_RESP_VERS_SHIFT 6
-#define ADF_PF2VF_VERSION_RESP_RESULT_MASK 0x0000C000
-#define ADF_PF2VF_VERSION_RESP_RESULT_SHIFT 14
-#define ADF_PF2VF_MINORVERSION_SHIFT 6
-#define ADF_PF2VF_MAJORVERSION_SHIFT 10
-#define ADF_PF2VF_VF_COMPATIBLE 1
-#define ADF_PF2VF_VF_INCOMPATIBLE 2
-#define ADF_PF2VF_VF_COMPAT_UNKNOWN 3
/* VF->PF messages */
-#define ADF_VF2PF_IN_USE_BY_VF 0x00006AC2
-#define ADF_VF2PF_IN_USE_BY_VF_MASK 0x0000FFFE
#define ADF_VF2PF_INT BIT(16)
#define ADF_VF2PF_MSGORIGIN_SYSTEM BIT(17)
+#define ADF_VF2PF_IN_USE_BY_VF 0x00006AC2
+#define ADF_VF2PF_IN_USE_BY_VF_MASK 0x0000FFFE
#define ADF_VF2PF_MSGTYPE_MASK 0x003C0000
#define ADF_VF2PF_MSGTYPE_SHIFT 18
#define ADF_VF2PF_MSGTYPE_INIT 0x3
@@ -88,6 +75,21 @@
#define ADF_VF2PF_MSGTYPE_VERSION_REQ 0x5
#define ADF_VF2PF_MSGTYPE_COMPAT_VER_REQ 0x6
+/* VF/PF compatibility version. */
+/* Reference to the current version */
+#define ADF_PFVF_COMPAT_THIS_VERSION 1 /* PF<->VF compat */
+
+/* PF->VF Version Response */
+#define ADF_PF2VF_MINORVERSION_SHIFT 6
+#define ADF_PF2VF_MAJORVERSION_SHIFT 10
+#define ADF_PF2VF_VERSION_RESP_VERS_MASK 0x00003FC0
+#define ADF_PF2VF_VERSION_RESP_VERS_SHIFT 6
+#define ADF_PF2VF_VERSION_RESP_RESULT_MASK 0x0000C000
+#define ADF_PF2VF_VERSION_RESP_RESULT_SHIFT 14
+#define ADF_PF2VF_VF_COMPATIBLE 1
+#define ADF_PF2VF_VF_INCOMPATIBLE 2
+#define ADF_PF2VF_VF_COMPAT_UNKNOWN 3
+
/* VF->PF Compatible Version Request */
#define ADF_VF2PF_COMPAT_VER_REQ_SHIFT 22
--
2.33.1
next prev parent reply other threads:[~2021-11-10 20:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 20:51 [PATCH 00/24] crypto: qat - PFVF refactoring Giovanni Cabiddu
2021-11-10 20:51 ` [PATCH 01/24] crypto: qat - fix undetected PFVF timeout in ACK loop Giovanni Cabiddu
2021-11-10 20:51 ` [PATCH 02/24] crypto: qat - refactor PF top half for PFVF Giovanni Cabiddu
2021-11-10 20:51 ` [PATCH 03/24] crypto: qat - move vf2pf interrupt helpers Giovanni Cabiddu
2021-11-10 20:51 ` [PATCH 04/24] crypto: qat - move VF message handler to adf_vf2pf_msg.c Giovanni Cabiddu
2021-11-10 20:51 ` [PATCH 05/24] crypto: qat - move interrupt code out of the PFVF handler Giovanni Cabiddu
2021-11-10 20:51 ` [PATCH 06/24] crypto: qat - change PFVF ACK behaviour Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 07/24] crypto: qat - re-enable interrupts for legacy PFVF messages Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 08/24] crypto: qat - split PFVF message decoding from handling Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 09/24] crypto: qat - handle retries due to collisions in adf_iov_putmsg() Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 10/24] crypto: qat - relocate PFVF PF related logic Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 11/24] crypto: qat - relocate PFVF VF " Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 12/24] crypto: qat - relocate PFVF disabled function Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 13/24] crypto: qat - add pfvf_ops Giovanni Cabiddu
2021-11-12 9:43 ` kernel test robot
2021-11-12 10:20 ` Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 14/24] crypto: qat - differentiate between pf2vf and vf2pf offset Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 15/24] crypto: qat - abstract PFVF send function Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 16/24] crypto: qat - abstract PFVF receive logic Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 17/24] crypto: qat - reorganize PFVF code Giovanni Cabiddu
2021-11-10 20:52 ` Giovanni Cabiddu [this message]
2021-11-10 20:52 ` [PATCH 19/24] crypto: qat - use enums for PFVF protocol codes Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 20/24] crypto: qat - pass the PF2VF responses back to the callers Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 21/24] crypto: qat - refactor pfvf version request messages Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 22/24] crypto: qat - do not rely on min version Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 23/24] crypto: qat - fix VF IDs in PFVF log messages Giovanni Cabiddu
2021-11-10 20:52 ` [PATCH 24/24] crypto: qat - improve logging of PFVF messages Giovanni Cabiddu
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=20211110205217.99903-19-giovanni.cabiddu@intel.com \
--to=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=marco.chiappero@intel.com \
--cc=qat-linux@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