dpdk: fix wrong tx ring size calculations
[vpp.git] / vnet / vnet / devices / dpdk / init.c
index a2cc884..44b4dc3 100644 (file)
@@ -666,7 +666,7 @@ dpdk_lib_init (dpdk_main_t * dm)
                            CLIB_CACHE_LINE_BYTES);
       for (j = 0; j < tm->n_vlib_mains; j++)
        {
-         vec_validate_ha (xd->tx_vectors[j], DPDK_TX_RING_SIZE,
+         vec_validate_ha (xd->tx_vectors[j], xd->nb_tx_desc,
                           sizeof (tx_ring_hdr_t), CLIB_CACHE_LINE_BYTES);
          vec_reset_length (xd->tx_vectors[j]);
        }
@@ -775,7 +775,7 @@ dpdk_lib_init (dpdk_main_t * dm)
                                CLIB_CACHE_LINE_BYTES);
          for (j = 0; j < tm->n_vlib_mains; j++)
            {
-             vec_validate_ha (xd->tx_vectors[j], DPDK_TX_RING_SIZE,
+             vec_validate_ha (xd->tx_vectors[j], xd->nb_tx_desc,
                               sizeof (tx_ring_hdr_t), CLIB_CACHE_LINE_BYTES);
              vec_reset_length (xd->tx_vectors[j]);
            }