rte_eth_dev_info_get() return value was changed from void to
int, so this patch modify rte_eth_dev_info_get() usage across
latency component according to its new return type.
Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
const char *ptr_strings[NUM_LATENCY_STATS] = {0};
const struct rte_memzone *mz = NULL;
const unsigned int flags = 0;
const char *ptr_strings[NUM_LATENCY_STATS] = {0};
const struct rte_memzone *mz = NULL;
const unsigned int flags = 0;
if (rte_memzone_lookup(MZ_RTE_LATENCY_STATS))
return -EEXIST;
if (rte_memzone_lookup(MZ_RTE_LATENCY_STATS))
return -EEXIST;
/** Register Rx/Tx callbacks */
RTE_ETH_FOREACH_DEV(pid) {
struct rte_eth_dev_info dev_info;
/** Register Rx/Tx callbacks */
RTE_ETH_FOREACH_DEV(pid) {
struct rte_eth_dev_info dev_info;
- rte_eth_dev_info_get(pid, &dev_info);
+
+ ret = rte_eth_dev_info_get(pid, &dev_info);
+ if (ret != 0) {
+ RTE_LOG(INFO, LATENCY_STATS,
+ "Error during getting device (port %u) info: %s\n",
+ pid, strerror(-ret));
+
+ continue;
+ }
+
for (qid = 0; qid < dev_info.nb_rx_queues; qid++) {
cbs = &rx_cbs[pid][qid];
cbs->cb = rte_eth_add_first_rx_callback(pid, qid,
for (qid = 0; qid < dev_info.nb_rx_queues; qid++) {
cbs = &rx_cbs[pid][qid];
cbs->cb = rte_eth_add_first_rx_callback(pid, qid,
/** De register Rx/Tx callbacks */
RTE_ETH_FOREACH_DEV(pid) {
struct rte_eth_dev_info dev_info;
/** De register Rx/Tx callbacks */
RTE_ETH_FOREACH_DEV(pid) {
struct rte_eth_dev_info dev_info;
- rte_eth_dev_info_get(pid, &dev_info);
+
+ ret = rte_eth_dev_info_get(pid, &dev_info);
+ if (ret != 0) {
+ RTE_LOG(INFO, LATENCY_STATS,
+ "Error during getting device (port %u) info: %s\n",
+ pid, strerror(-ret));
+
+ continue;
+ }
+
for (qid = 0; qid < dev_info.nb_rx_queues; qid++) {
cbs = &rx_cbs[pid][qid];
ret = rte_eth_remove_rx_callback(pid, qid, cbs->cb);
for (qid = 0; qid < dev_info.nb_rx_queues; qid++) {
cbs = &rx_cbs[pid][qid];
ret = rte_eth_remove_rx_callback(pid, qid, cbs->cb);