#define ADF_MAX_RING_SIZE ADF_RING_SIZE_4M
#define ADF_DEFAULT_RING_SIZE ADF_RING_SIZE_16K
-#define ADF_NUM_BUNDLES_PER_DEV 1
-/* Maximum number of qps for any service type */
-#define ADF_MAX_QPS_PER_BUNDLE 4
+/* Maximum number of qps on a device for any service type */
+#define ADF_MAX_QPS_ON_ANY_SERVICE 2
#define ADF_RING_DIR_TX 0
#define ADF_RING_DIR_RX 1
}
qp = dev->qps_in_use[service];
- for (i = 0; i < ADF_MAX_QPS_PER_BUNDLE; i++) {
+ for (i = 0; i < ADF_MAX_QPS_ON_ANY_SERVICE; i++) {
if (qp[i] == NULL) {
PMD_DRV_LOG(DEBUG, "Service %d Uninitialised qp %d",
service, i);
}
qp = dev->qps_in_use[service];
- for (i = 0; i < ADF_MAX_QPS_PER_BUNDLE; i++) {
+ for (i = 0; i < ADF_MAX_QPS_ON_ANY_SERVICE; i++) {
if (qp[i] == NULL) {
PMD_DRV_LOG(DEBUG, "Service %d Uninitialised qp %d",
service, i);
uint8_t attached : 1;
/**< Flag indicating the device is attached */
- struct qat_qp *qps_in_use[QAT_MAX_SERVICES][ADF_MAX_QPS_PER_BUNDLE];
+ struct qat_qp *qps_in_use[QAT_MAX_SERVICES][ADF_MAX_QPS_ON_ANY_SERVICE];
/**< links to qps set up for each service, index same as on API */
/* Data relating to symmetric crypto service */
struct qat_gen_hw_data {
enum qat_device_gen dev_gen;
- const struct qat_qp_hw_data (*qp_hw_data)[ADF_MAX_QPS_PER_BUNDLE];
+ const struct qat_qp_hw_data (*qp_hw_data)[ADF_MAX_QPS_ON_ANY_SERVICE];
};
extern struct qat_gen_hw_data qp_gen_config[];
__extension__
const struct qat_qp_hw_data qat_gen1_qps[QAT_MAX_SERVICES]
- [ADF_MAX_QPS_PER_BUNDLE] = {
+ [ADF_MAX_QPS_ON_ANY_SERVICE] = {
/* queue pairs which provide an asymmetric crypto service */
[QAT_SERVICE_ASYMMETRIC] = {
{
}, {
.service_type = QAT_SERVICE_ASYMMETRIC,
+ .hw_bundle_num = 0,
.tx_ring_num = 1,
.rx_ring_num = 9,
.tx_msg_size = 64,
.rx_msg_size = 32,
- }, {
- .service_type = QAT_SERVICE_INVALID,
- }, {
- .service_type = QAT_SERVICE_INVALID,
}
},
/* queue pairs which provide a symmetric crypto service */
.rx_ring_num = 11,
.tx_msg_size = 128,
.rx_msg_size = 32,
- }, {
- .service_type = QAT_SERVICE_INVALID,
- }, {
- .service_type = QAT_SERVICE_INVALID,
}
},
/* queue pairs which provide a compression service */
.rx_ring_num = 15,
.tx_msg_size = 128,
.rx_msg_size = 32,
- }, {
- .service_type = QAT_SERVICE_INVALID,
- }, {
- .service_type = QAT_SERVICE_INVALID,
}
}
};
{
int i, count;
- for (i = 0, count = 0; i < ADF_MAX_QPS_PER_BUNDLE; i++)
+ for (i = 0, count = 0; i < ADF_MAX_QPS_ON_ANY_SERVICE; i++)
if (qp_hw_data[i].service_type == service)
count++;
- return count * ADF_NUM_BUNDLES_PER_DEV;
+ return count;
}
static const struct rte_memzone *
/**< qat device this qp is on */
} __rte_cache_aligned;
-extern const struct qat_qp_hw_data qat_gen1_qps[][ADF_MAX_QPS_PER_BUNDLE];
+extern const struct qat_qp_hw_data qat_gen1_qps[][ADF_MAX_QPS_ON_ANY_SERVICE];
uint16_t
qat_enqueue_op_burst(void *qp, void **ops, uint16_t nb_ops);