unsigned plaintext_pad_len;
unsigned plaintext_len;
uint8_t *plaintext;
+ struct rte_cryptodev_info dev_info;
- /* QAT PMD supports byte-aligned data only */
- if ((tdata->validAuthLenInBits.len % 8 != 0) &&
- (gbl_driver_id == rte_cryptodev_driver_id_get(
- RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD))))
+ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) &&
+ ((tdata->validAuthLenInBits.len % 8) != 0)) {
+ printf("Device doesn't support NON-Byte Aligned Data.\n");
return -ENOTSUP;
+ }
/* Verify the capabilities */
struct rte_cryptodev_sym_capability_idx cap_idx;
unsigned plaintext_pad_len;
unsigned plaintext_len;
uint8_t *plaintext;
+ struct rte_cryptodev_info dev_info;
+
+ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+ uint64_t feat_flags = dev_info.feature_flags;
- /* QAT PMD supports byte-aligned data only */
- if ((tdata->validAuthLenInBits.len % 8 != 0) &&
- (gbl_driver_id == rte_cryptodev_driver_id_get(
- RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD))))
+ if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) &&
+ ((tdata->validAuthLenInBits.len % 8) != 0)) {
+ printf("Device doesn't support NON-Byte Aligned Data.\n");
return -ENOTSUP;
+ }
/* Verify the capabilities */
struct rte_cryptodev_sym_capability_idx cap_idx;
uint32_t plaintext_pad_len;
uint8_t extra_offset = 4;
uint8_t *expected_ciphertext_shifted;
+ struct rte_cryptodev_info dev_info;
- /* QAT PMD supports byte-aligned data only */
- if (gbl_driver_id == rte_cryptodev_driver_id_get(
- RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)))
+ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) &&
+ ((tdata->validDataLenInBits.len % 8) != 0)) {
+ printf("Device doesn't support NON-Byte Aligned Data.\n");
return -ENOTSUP;
+ }
/* Verify the capabilities */
struct rte_cryptodev_sym_capability_idx cap_idx;
unsigned int plaintext_pad_len;
unsigned int plaintext_len;
+ struct rte_cryptodev_info dev_info;
struct rte_cryptodev_sym_capability_idx cap_idx;
+ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) &&
+ ((tdata->validAuthLenInBits.len % 8 != 0) ||
+ (tdata->validDataLenInBits.len % 8 != 0))) {
+ printf("Device doesn't support NON-Byte Aligned Data.\n");
+ return -ENOTSUP;
+ }
+
/* Check if device supports ZUC EEA3 */
cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
cap_idx.algo.cipher = RTE_CRYPTO_CIPHER_ZUC_EEA3;
uint8_t *plaintext;
struct rte_cryptodev_sym_capability_idx cap_idx;
+ struct rte_cryptodev_info dev_info;
- /* QAT PMD supports byte-aligned data only */
- if ((tdata->validAuthLenInBits.len % 8 != 0) &&
- (gbl_driver_id == rte_cryptodev_driver_id_get(
- RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD))))
+ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA) &&
+ (tdata->validAuthLenInBits.len % 8 != 0)) {
+ printf("Device doesn't support NON-Byte Aligned Data.\n");
return -ENOTSUP;
+ }
/* Check if device supports ZUC EIA3 */
cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
static int
test_zuc_hash_generate_test_case_7(void)
{
- /* This test is not for SW ZUC PMD */
- if (gbl_driver_id == rte_cryptodev_driver_id_get(
- RTE_STR(CRYPTODEV_NAME_ZUC_PMD)))
- return -ENOTSUP;
-
return test_zuc_authentication(&zuc_test_case_auth_2080b);
}
static int
test_zuc_auth_cipher_test_case_1(void)
{
- /* This test is not for SW ZUC PMD */
- if (gbl_driver_id == rte_cryptodev_driver_id_get(
- RTE_STR(CRYPTODEV_NAME_ZUC_PMD)))
- return -ENOTSUP;
-
return test_zuc_auth_cipher(
&zuc_auth_cipher_test_case_1, IN_PLACE, 0);
}