[v3,05/17] common/idpf/base: add some adi specific fields

Message ID 20230915021730.2681882-6-simei.su@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series update idpf base code |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Simei Su Sept. 15, 2023, 2:17 a.m. UTC
  a) Add maximum ADI count in capabilities message
b) Add PF side ADI index to create_adi message
c) Define another constant to indicate 'Function active' state of ADI

Signed-off-by: Shailendra Bhatnagar <shailendra.bhatnagar@intel.com>
Signed-off-by: Simei Su <simei.su@intel.com>
---
 .mailmap                             | 1 +
 drivers/common/idpf/base/virtchnl2.h | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
  

Patch

diff --git a/.mailmap b/.mailmap
index d8782cd67e..75d534c53d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1643,3 +1643,4 @@  Jayaprakash Shanmugam <jayaprakash.shanmugam@intel.com>
 Zhenning Xiao <zhenning.xiao@intel.com>
 Josh Hay <joshua.a.hay@intel.com>
 Madhu Chittim <madhu.chittim@intel.com>
+Shailendra Bhatnagar <shailendra.bhatnagar@intel.com>
diff --git a/drivers/common/idpf/base/virtchnl2.h b/drivers/common/idpf/base/virtchnl2.h
index 320430df6f..7a099f5148 100644
--- a/drivers/common/idpf/base/virtchnl2.h
+++ b/drivers/common/idpf/base/virtchnl2.h
@@ -294,6 +294,7 @@ 
 /* These messages are only sent to PF from CP */
 #define VIRTCHNL2_EVENT_START_RESET_ADI		2
 #define VIRTCHNL2_EVENT_FINISH_RESET_ADI	3
+#define VIRTCHNL2_EVENT_ADI_ACTIVE		4
 
 /* VIRTCHNL2_QUEUE_TYPE
  * Transmit and Receive queue types are valid in legacy as well as split queue
@@ -547,7 +548,8 @@  struct virtchnl2_get_capabilities {
 	u8 max_sg_bufs_per_tx_pkt;
 
 	u8 reserved1;
-	__le16 pad1;
+	/* upper bound of number of ADIs supported */
+	__le16 max_adis;
 
 	/* version of Control Plane that is running */
 	__le16 oem_cp_ver_major;
@@ -1076,10 +1078,12 @@  struct virtchnl2_create_adi {
 	__le16 mbx_id;
 	/* PF sends mailbox vector id to CP */
 	__le16 mbx_vec_id;
+	/* PF populates this ADI index */
+	__le16 adi_index;
 	/* CP populates ADI id */
 	__le16 adi_id;
 	u8 reserved[64];
-	u8 pad[6];
+	u8 pad[4];
 	/* CP populates queue chunks */
 	struct virtchnl2_queue_reg_chunks chunks;
 	/* PF sends vector chunks to CP */