> -----Original Message----- > From: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> > Sent: Wednesday, February 2, 2022 2:04 PM > To: dev@dpdk.org; Honnappa Nagarahalli > <honnappa.nagaraha...@arm.com>; lijuan...@intel.com; > juraj.lin...@pantheon.tech; ohily...@iol.unh.edu; > david.march...@redhat.com; tho...@monjalon.net; jer...@marvell.com > Cc: Kathleen Capella <kathleen.cape...@arm.com>; nd <n...@arm.com> > Subject: [PATCH 2/2] examples/l3fwd: make RX and TX queue size > configurable > > Make RX and TX queue sizes configurable from the command line. > This helps DTS write better test cases. > > Signed-off-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> > --- > examples/l3fwd/main.c | 56 > ++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 55 insertions(+), 1 deletion(-) >
<snip> > > +static void > +parse_rx_queue_size(const char *rx_queue_size_arg) { > + char *end = NULL; > + uint32_t rx_queue_size; > + > + /* parse decimal string */ > + rx_queue_size = strtoul(rx_queue_size_arg, &end, 10); > + if ((rx_queue_size_arg[0] == '\0') || (end == NULL) || (*end != '\0')) > + return; > + > + if (rx_queue_size == 0) > + return; > + > + nb_rxd = rx_queue_size; > +} > + > +static void > +parse_tx_queue_size(const char *tx_queue_size_arg) { > + char *end = NULL; > + uint32_t tx_queue_size; > + > + /* parse decimal string */ > + tx_queue_size = strtoul(tx_queue_size_arg, &end, 10); > + if ((tx_queue_size_arg[0] == '\0') || (end == NULL) || (*end != '\0')) > + return; > + > + if (tx_queue_size == 0) > + return; > + > + nb_rxd = tx_queue_size; Typo. I assume here is 'nb_txd'. > +} > + > static void > parse_eventq_sched(const char *optarg) > { > @@ -581,6 +621,8 @@ static const char short_options[] = > ; > <snip>