[PATCH 2/2] examples/l3fwd: make RX and TX queue size configurable
Ruifeng Wang
Ruifeng.Wang at arm.com
Tue Feb 8 08:41:42 CET 2022
> -----Original Message-----
> From: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Sent: Wednesday, February 2, 2022 2:04 PM
> To: dev at dpdk.org; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>; lijuan.tu at intel.com;
> juraj.linkes at pantheon.tech; ohilyard at iol.unh.edu;
> david.marchand at redhat.com; thomas at monjalon.net; jerinj at marvell.com
> Cc: Kathleen Capella <Kathleen.Capella at arm.com>; nd <nd at 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.nagarahalli at 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>
More information about the dev
mailing list