| 1874 | } |
| 1875 | |
| 1876 | static const struct rte_cryptodev_capabilities * |
| 1877 | check_device_support_auth_algo(const struct l2fwd_crypto_options *options, |
| 1878 | const struct rte_cryptodev_info *dev_info, |
| 1879 | uint8_t cdev_id) |
| 1880 | { |
| 1881 | unsigned int i = 0; |
| 1882 | const struct rte_cryptodev_capabilities *cap = &dev_info->capabilities[0]; |
| 1883 | enum rte_crypto_auth_algorithm cap_auth_algo; |
| 1884 | enum rte_crypto_auth_algorithm opt_auth_algo = |
| 1885 | options->auth_xform.auth.algo; |
| 1886 | |
| 1887 | while (cap->op != RTE_CRYPTO_OP_TYPE_UNDEFINED) { |
| 1888 | cap_auth_algo = cap->sym.auth.algo; |
| 1889 | if (cap->sym.xform_type == RTE_CRYPTO_SYM_XFORM_AUTH) { |
| 1890 | if (cap_auth_algo == opt_auth_algo) { |
| 1891 | if (check_type(options, dev_info) == 0) |
| 1892 | break; |
| 1893 | } |
| 1894 | } |
| 1895 | cap = &dev_info->capabilities[++i]; |
| 1896 | } |
| 1897 | |
| 1898 | if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED) { |
| 1899 | printf("Algorithm %s not supported by cryptodev %u" |
| 1900 | " or device not of preferred type (%s)\n", |
| 1901 | rte_cryptodev_get_auth_algo_string(opt_auth_algo), |
| 1902 | cdev_id, |
| 1903 | options->string_type); |
| 1904 | return NULL; |
| 1905 | } |
| 1906 | |
| 1907 | return cap; |
| 1908 | } |
| 1909 | |
| 1910 | static const struct rte_cryptodev_capabilities * |
| 1911 | check_device_support_aead_algo(const struct l2fwd_crypto_options *options, |
no test coverage detected