MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cryptodev_handle_dev_stats

Function cryptodev_handle_dev_stats

dpdk/lib/cryptodev/rte_cryptodev.c:2820–2849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2818#define ADD_DICT_STAT(s) rte_tel_data_add_dict_uint(d, #s, cryptodev_stats.s)
2819
2820static int
2821cryptodev_handle_dev_stats(const char *cmd __rte_unused,
2822 const char *params,
2823 struct rte_tel_data *d)
2824{
2825 struct rte_cryptodev_stats cryptodev_stats;
2826 int dev_id, ret;
2827 char *end_param;
2828
2829 if (params == NULL || strlen(params) == 0 || !isdigit(*params))
2830 return -EINVAL;
2831
2832 dev_id = strtoul(params, &end_param, 0);
2833 if (*end_param != '\0')
2834 CDEV_LOG_ERR("Extra parameters passed to command, ignoring");
2835 if (!rte_cryptodev_is_valid_dev(dev_id))
2836 return -EINVAL;
2837
2838 ret = rte_cryptodev_stats_get(dev_id, &cryptodev_stats);
2839 if (ret < 0)
2840 return ret;
2841
2842 rte_tel_data_start_dict(d);
2843 ADD_DICT_STAT(enqueued_count);
2844 ADD_DICT_STAT(dequeued_count);
2845 ADD_DICT_STAT(enqueue_err_count);
2846 ADD_DICT_STAT(dequeue_err_count);
2847
2848 return 0;
2849}
2850
2851#define CRYPTO_CAPS_SZ \
2852 (RTE_ALIGN_CEIL(sizeof(struct rte_cryptodev_capabilities), \

Callers

nothing calls this directly

Calls 5

isdigitFunction · 0.85
strtoulFunction · 0.85
rte_cryptodev_stats_getFunction · 0.85
rte_tel_data_start_dictFunction · 0.85

Tested by

no test coverage detected