diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index e1e9af95ec..eff1cbb9a8 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -873,11 +873,12 @@ launch_args_parse(int argc, char** argv) } if (!strcmp(lgopts[opt_idx].name, "total-num-mbufs")) { n = atoi(optarg); - if (n > 1024) + if (n > MIN_TOTAL_NUM_MBUFS) param_total_num_mbufs = (unsigned)n; else rte_exit(EXIT_FAILURE, - "total-num-mbufs should be > 1024\n"); + "total-num-mbufs should be > %d\n", + MIN_TOTAL_NUM_MBUFS); } if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) { n = atoi(optarg); diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 334bcc28e6..244b0c710a 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -53,6 +53,8 @@ #define NUMA_NO_CONFIG 0xFF #define UMA_NO_CONFIG 0xFF +#define MIN_TOTAL_NUM_MBUFS 1024 + typedef uint8_t lcoreid_t; typedef uint16_t portid_t; typedef uint16_t queueid_t;