Skip to contentSkip to conversation

accel-config: Export API to retrieve completion record size for the device

PATCH Ramesh Thomas 1 participant 1 message Apr 12, 2022 1 message not in the archive

lore
Share & tools
lore

Ramesh Thomas

author
#1 lore raw
In reply to a message not in the archive
Quoted 16 lines · Li Zhang

Add API accfg_device_get_compl_size(), DSA and IAA test code can retrieve completion record size by the API.

Signed-off-by Li Zhang <li4.zhang(a)intel.com>
Reviewed-by Dave Jiang <dave.jiang(a)intel.com>
---
  accfg/lib/libaccel-config.sym | 1 +
  accfg/lib/libaccfg.c          | 6 ++++++
  accfg/libaccel_config.h       | 1 +
  3 files changed, 8 insertions(+)
accfg/lib/libaccel-config.sym +0 -0
index fde9251..b85b9b5 100644

accfg/lib/libaccel-config.sym LIBACCFG_1 { · line 28

Quoted 7 lines
accfg/lib/libaccel-config.sym +1 -0
@@ -22,6 +22,7 @@ LIBACCFG_1 {
  	accfg_device_get_ims_size;
  	accfg_device_get_max_batch_size;
  	accfg_device_get_max_transfer_size;
+	accfg_device_get_compl_size;
  	accfg_device_get_configurable;
  	accfg_device_get_pasid_enabled;
  	accfg_device_get_errors;

Please create a new version block

Quoted 29 lines
accfg/lib/libaccfg.c +6 -0
index 200bd70..7e789b4 100644
@@ -1357,6 +1357,12 @@ ACCFG_EXPORT uint64_t accfg_device_get_max_transfer_size(
  	return device->max_transfer_size;
  }
 
+/* Helper function to retrieve completion record size */
+ACCFG_EXPORT unsigned int accfg_device_get_compl_size(struct accfg_device *device)
+{
+	return device->compl_size;
+}
+
  ACCFG_EXPORT int accfg_device_get_op_cap(struct accfg_device *device,
  		struct accfg_op_cap *op_cap)
  {
accfg/libaccel_config.h +1 -0
index ef7c8ae..5cb49ce 100644
@@ -188,6 +188,7 @@ int accfg_device_get_numa_node(struct accfg_device *device);
  unsigned int accfg_device_get_ims_size(struct accfg_device *device);
  unsigned int accfg_device_get_max_batch_size(struct accfg_device *device);
  uint64_t accfg_device_get_max_transfer_size(struct accfg_device *device);
+unsigned int accfg_device_get_compl_size(struct accfg_device *device);
  int accfg_device_get_op_cap(struct accfg_device *device,
  		struct accfg_op_cap *op_cap);
  uint64_t accfg_device_get_gen_cap(struct accfg_device *device);