Fix tcp tx buffer allocation
[vpp.git] / src / plugins / dpdk / device / cli.c
index c7e5090..fe1c41c 100644 (file)
@@ -357,6 +357,7 @@ show_dpdk_buffer (vlib_main_t * vm, unformat_input_t * input,
                           "name=\"%s\"  available = %7d allocated = %7d total = %7d\n",
                           rmp->name, (u32) count, (u32) free_count,
                           (u32) (count + free_count));
+         rte_mempool_dump (stderr, rmp);
        }
       else
        {
@@ -537,7 +538,10 @@ set_dpdk_if_desc (vlib_main_t * vm, unformat_input_t * input,
   if (nb_tx_desc != (u32) ~ 0)
     xd->nb_tx_desc = nb_tx_desc;
 
-  error = dpdk_device_setup (xd);
+  dpdk_device_setup (xd);
+
+  if (vec_len (xd->errors))
+    return clib_error_return (0, "%U", format_dpdk_device_errors, xd);
 
 done:
   unformat_free (line_input);