app/testpmd: check status of getting ethdev info
[dpdk.git] / app / test-pmd / cmdline_flow.c
index 4958713..932bdb9 100644 (file)
@@ -3549,8 +3549,12 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
        if (!port_id_is_invalid(ctx->port, DISABLED_WARN) &&
            ctx->port != (portid_t)RTE_PORT_ALL) {
                struct rte_eth_dev_info info;
+               int ret2;
+
+               ret2 = rte_eth_dev_info_get(ctx->port, &info);
+               if (ret2 != 0)
+                       return ret2;
 
-               rte_eth_dev_info_get(ctx->port, &info);
                action_rss_data->conf.key_len =
                        RTE_MIN(sizeof(action_rss_data->key),
                                info.hash_key_size);