DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
To: <david.hunt@intel.com>, <anatoly.burakov@intel.com>,
	<jerinj@marvell.com>,  <radu.nicolau@intel.com>,
	<gakhil@marvell.com>, <cristian.dumitrescu@intel.com>,
	<ferruh.yigit@amd.com>, <konstantin.ananyev@huawei.com>,
	<stephen@networkplumber.org>, <mb@smartsharesystems.com>,
	<thomas@monjalon.net>
Cc: <dev@dpdk.org>, <ndabilpuram@marvell.com>, <stable@dpdk.org>
Subject: [PATCH v6 03/14] examples/l3fwd-graph: fix queue ID restriction
Date: Thu, 21 Mar 2024 19:47:09 +0100	[thread overview]
Message-ID: <20240321184721.69040-4-sivaprasad.tummala@amd.com> (raw)
In-Reply-To: <20240321184721.69040-1-sivaprasad.tummala@amd.com>

Currently application supports queue IDs up to 255
and max queues of 256 irrespective of device support.
This limits the number of active lcores to 256.

The patch fixes these constraints by increasing
the queue IDs to support up to 65535.

Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Cc: ndabilpuram@marvell.com
Cc: stable@dpdk.org

Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 examples/l3fwd-graph/main.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 96cb1c81ff..c3a7b267e9 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -90,7 +90,7 @@ static int pcap_trace_enable;
 
 struct lcore_rx_queue {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	char node_name[RTE_NODE_NAMESIZE];
 };
 
@@ -110,7 +110,7 @@ static struct lcore_conf lcore_conf[RTE_MAX_LCORE];
 
 struct lcore_params {
 	uint16_t port_id;
-	uint8_t queue_id;
+	uint16_t queue_id;
 	uint8_t lcore_id;
 } __rte_cache_aligned;
 
@@ -205,14 +205,14 @@ check_worker_model_params(void)
 static int
 check_lcore_params(void)
 {
-	uint8_t queue, lcore;
+	uint16_t queue, i;
 	int socketid;
-	uint16_t i;
+	uint8_t lcore;
 
 	for (i = 0; i < nb_lcore_params; ++i) {
 		queue = lcore_params[i].queue_id;
 		if (queue >= MAX_RX_QUEUE_PER_PORT) {
-			printf("Invalid queue number: %hhu\n", queue);
+			printf("Invalid queue number: %hu\n", queue);
 			return -1;
 		}
 		lcore = lcore_params[i].lcore_id;
@@ -257,7 +257,7 @@ check_port_config(void)
 	return 0;
 }
 
-static uint8_t
+static uint16_t
 get_port_n_rx_queues(const uint16_t port)
 {
 	int queue = -1;
@@ -275,7 +275,7 @@ get_port_n_rx_queues(const uint16_t port)
 		}
 	}
 
-	return (uint8_t)(++queue);
+	return (uint16_t)(++queue);
 }
 
 static int
@@ -450,7 +450,7 @@ parse_config(const char *q_arg)
 		lcore_params_array[nb_lcore_params].port_id =
 			(uint8_t)int_fld[FLD_PORT];
 		lcore_params_array[nb_lcore_params].queue_id =
-			(uint8_t)int_fld[FLD_QUEUE];
+			(uint16_t)int_fld[FLD_QUEUE];
 		lcore_params_array[nb_lcore_params].lcore_id =
 			(uint8_t)int_fld[FLD_LCORE];
 		++nb_lcore_params;
@@ -1011,7 +1011,8 @@ main(int argc, char **argv)
 		"ethdev_tx-*",
 		"pkt_drop",
 	};
-	uint8_t nb_rx_queue, queue, socketid;
+	uint8_t socketid;
+	uint16_t nb_rx_queue, queue;
 	struct rte_graph_param graph_conf;
 	struct rte_eth_dev_info dev_info;
 	uint32_t nb_ports, nb_conf = 0;
-- 
2.34.1


  parent reply	other threads:[~2024-03-21 18:48 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18  7:49 [PATCH 1/6] examples/l3fwd: fix lcore " Sivaprasad Tummala
2023-12-18  7:49 ` [PATCH 2/6] examples/l3fwd-power: " Sivaprasad Tummala
2023-12-18  7:49 ` [PATCH 3/6] examples/l3fwd-graph: " Sivaprasad Tummala
2023-12-18  7:49 ` [PATCH 4/6] examples/ipsec-secgw: " Sivaprasad Tummala
2023-12-18  7:49 ` [PATCH 5/6] examples/qos_sched: " Sivaprasad Tummala
2023-12-18  7:49 ` [PATCH 6/6] examples/vm_power_manager: " Sivaprasad Tummala
2023-12-19  3:28 ` [PATCH v2 0/6] " Sivaprasad Tummala
2023-12-19  3:28   ` [PATCH v2 1/6] examples/l3fwd: " Sivaprasad Tummala
2023-12-19 12:05     ` Konstantin Ananyev
2023-12-19 12:30       ` Konstantin Ananyev
2023-12-19 14:18         ` Tummala, Sivaprasad
2023-12-19 15:10           ` Konstantin Ananyev
2023-12-20  1:32             ` Tummala, Sivaprasad
2023-12-19  3:28   ` [PATCH v2 2/6] examples/l3fwd-power: " Sivaprasad Tummala
2023-12-19  3:28   ` [PATCH v2 3/6] examples/l3fwd-graph: " Sivaprasad Tummala
2023-12-19  3:28   ` [PATCH v2 4/6] examples/ipsec-secgw: " Sivaprasad Tummala
2023-12-19 12:03     ` Konstantin Ananyev
2023-12-19  3:28   ` [PATCH v2 5/6] examples/qos_sched: " Sivaprasad Tummala
2023-12-19  3:28   ` [PATCH v2 6/6] examples/vm_power_manager: " Sivaprasad Tummala
2023-12-19  3:28   ` [PATCH v2 0/6] " Sivaprasad Tummala
2023-12-20  6:44   ` [PATCH v3 " Sivaprasad Tummala
2023-12-20  6:44     ` [PATCH v3 1/6] examples/l3fwd: " Sivaprasad Tummala
2023-12-20  6:44     ` [PATCH v3 2/6] examples/l3fwd-power: " Sivaprasad Tummala
2023-12-20  6:44     ` [PATCH v3 3/6] examples/l3fwd-graph: " Sivaprasad Tummala
2023-12-20  6:44     ` [PATCH v3 4/6] examples/ipsec-secgw: " Sivaprasad Tummala
2023-12-20  6:45     ` [PATCH v3 5/6] examples/qos_sched: " Sivaprasad Tummala
2023-12-20 16:31       ` Stephen Hemminger
2024-01-09 15:16         ` Ferruh Yigit
2024-01-16 12:33           ` Tummala, Sivaprasad
2024-01-16 16:28             ` Stephen Hemminger
2023-12-20  6:45     ` [PATCH v3 6/6] examples/vm_power_manager: " Sivaprasad Tummala
2023-12-20  6:45     ` [PATCH v3 0/6] " Sivaprasad Tummala
2024-01-16 18:23     ` [PATCH v4 " Sivaprasad Tummala
2024-01-16 18:23       ` [PATCH v4 1/6] examples/l3fwd: " Sivaprasad Tummala
2024-01-16 18:23       ` [PATCH v4 2/6] examples/l3fwd-power: " Sivaprasad Tummala
2024-01-16 18:23       ` [PATCH v4 3/6] examples/l3fwd-graph: " Sivaprasad Tummala
2024-01-16 18:23       ` [PATCH v4 4/6] examples/ipsec-secgw: " Sivaprasad Tummala
2024-01-16 18:23       ` [PATCH v4 5/6] examples/qos_sched: " Sivaprasad Tummala
2024-01-16 18:23       ` [PATCH v4 6/6] examples/vm_power_manager: " Sivaprasad Tummala
2024-01-16 18:23       ` [PATCH v4 0/6] " Sivaprasad Tummala
2024-03-18 17:31       ` [PATCH v5 " Sivaprasad Tummala
2024-03-18 17:31         ` [PATCH v5 1/6] examples/l3fwd: " Sivaprasad Tummala
2024-03-19  7:24           ` Morten Brørup
2024-03-21  9:55             ` Thomas Monjalon
2024-03-21 11:05               ` Tummala, Sivaprasad
2024-03-21 11:18                 ` Thomas Monjalon
2024-03-21 18:26                   ` Tummala, Sivaprasad
2024-03-21 11:05             ` Tummala, Sivaprasad
2024-03-18 17:31         ` [PATCH v5 2/6] examples/l3fwd-power: " Sivaprasad Tummala
2024-03-18 17:31         ` [PATCH v5 3/6] examples/l3fwd-graph: " Sivaprasad Tummala
2024-03-18 17:31         ` [PATCH v5 4/6] examples/ipsec-secgw: " Sivaprasad Tummala
2024-03-18 17:31         ` [PATCH v5 5/6] examples/qos_sched: " Sivaprasad Tummala
2024-03-18 17:31         ` [PATCH v5 6/6] examples/vm_power_manager: " Sivaprasad Tummala
2024-03-18 17:31         ` [PATCH v5 0/6] " Sivaprasad Tummala
2024-03-19 18:41         ` Ferruh Yigit
2024-03-21 18:47         ` [PATCH v6 00/10] " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 01/14] examples/l3fwd: fix queue " Sivaprasad Tummala
2024-03-22 15:41             ` David Marchand
2024-03-25 12:45               ` Tummala, Sivaprasad
2024-03-21 18:47           ` [PATCH v6 02/14] examples/l3fwd-power: " Sivaprasad Tummala
2024-03-21 18:47           ` Sivaprasad Tummala [this message]
2024-03-21 18:47           ` [PATCH v6 04/14] examples/ipsec-secgw: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 05/14] examples/l3fwd: fix lcore " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 06/14] examples/l3fwd-power: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 07/14] examples/l3fwd-graph: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 08/14] examples/ipsec-secgw: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 09/14] examples/qos_sched: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 10/14] examples/vm_power_manager: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 11/14] examples/l3fwd: fix port " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 12/14] examples/l3fwd-power: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 13/14] examples/l3fwd-graph: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 14/14] examples/ipsec-secgw: " Sivaprasad Tummala
2024-03-21 18:47           ` [PATCH v6 00/10] fix lcore " Sivaprasad Tummala
2024-03-26 12:55           ` [PATCH v7 00/14] " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 01/14] examples/l3fwd: fix queue " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 02/14] examples/l3fwd-power: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 03/14] examples/l3fwd-graph: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 04/14] examples/ipsec-secgw: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 05/14] examples/l3fwd: fix lcore " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 06/14] examples/l3fwd-power: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 07/14] examples/l3fwd-graph: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 08/14] examples/ipsec-secgw: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 09/14] examples/qos_sched: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 10/14] examples/vm_power_manager: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 11/14] examples/l3fwd: fix port " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 12/14] examples/l3fwd-power: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 13/14] examples/l3fwd-graph: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 14/14] examples/ipsec-secgw: " Sivaprasad Tummala
2024-03-26 12:55             ` [PATCH v7 00/14] fix lcore " Sivaprasad Tummala
2024-04-25 12:31             ` Ferruh Yigit
2024-04-30 13:47               ` Ferruh Yigit
2024-03-07  8:34 ` [PATCH 1/6] examples/l3fwd: " David Marchand
2024-03-07  9:16   ` Morten Brørup
2024-03-07  9:22     ` David Marchand
2024-03-07  9:53       ` Morten Brørup
2024-03-13  9:14   ` Tummala, Sivaprasad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240321184721.69040-4-sivaprasad.tummala@amd.com \
    --to=sivaprasad.tummala@amd.com \
    --cc=anatoly.burakov@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=gakhil@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=konstantin.ananyev@huawei.com \
    --cc=mb@smartsharesystems.com \
    --cc=ndabilpuram@marvell.com \
    --cc=radu.nicolau@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).