All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] small fixes for QoS profile handling
@ 2023-03-21 13:13 Bruce Richardson
  2023-03-21 13:13 ` [PATCH 1/2] examples/qos_sched: fix config entries in wrong sections Bruce Richardson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bruce Richardson @ 2023-03-21 13:13 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

Fix issues with the QoS block not having explicitly configured pipes -
instead they started zeroed, which worked fine. Also add into the
example app a check to flag a warning on any future misconfiguration.

Bruce Richardson (2):
  examples/qos_sched: fix config entries in wrong sections
  examples/qos_sched: report error if no pipes configured

 examples/qos_sched/init.c          | 7 +++++++
 examples/qos_sched/profile.cfg     | 6 +++---
 examples/qos_sched/profile_ov.cfg  | 6 +++---
 examples/qos_sched/profile_pie.cfg | 6 +++---
 examples/qos_sched/profile_red.cfg | 6 +++---
 5 files changed, 19 insertions(+), 12 deletions(-)

--
2.37.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] examples/qos_sched: fix config entries in wrong sections
  2023-03-21 13:13 [PATCH 0/2] small fixes for QoS profile handling Bruce Richardson
@ 2023-03-21 13:13 ` Bruce Richardson
  2023-03-21 17:38   ` Dumitrescu, Cristian
  2023-03-21 13:13 ` [PATCH 2/2] examples/qos_sched: report error if no pipes configured Bruce Richardson
  2023-03-23  9:11 ` [PATCH 0/2] small fixes for QoS profile handling Thomas Monjalon
  2 siblings, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2023-03-21 13:13 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable, Cristian Dumitrescu

When specifying the QoS config, the profiles to be used for each pipe
within a subport must be specified in the subport section, not in the
section for the subport profile itself. Similarly for subport profiles,
those should be specified in the port section.

Fixes: de3cfa2c9823 ("sched: initial import")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/qos_sched/profile.cfg     | 6 +++---
 examples/qos_sched/profile_ov.cfg  | 6 +++---
 examples/qos_sched/profile_pie.cfg | 6 +++---
 examples/qos_sched/profile_red.cfg | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg
index e8de101b6c..00d4c7c1a5 100644
--- a/examples/qos_sched/profile.cfg
+++ b/examples/qos_sched/profile.cfg
@@ -26,6 +26,8 @@ number of subports per port = 1
 number of pipes per subport = 4096
 queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64

+pipe 0-4095 = 0                ; These pipes are configured with pipe profile 0
+
 [subport profile 0]
 tb rate = 1250000000           ; Bytes per second
 tb size = 1000000              ; Bytes
@@ -46,8 +48,6 @@ tc 12 rate = 1250000000        ; Bytes per second

 tc period = 10                 ; Milliseconds

-pipe 0-4095 = 0                ; These pipes are configured with pipe profile 0
-
 ; Pipe configuration
 [pipe profile 0]
 tb rate = 305175               ; Bytes per second
@@ -71,4 +71,4 @@ tc period = 40                ; Milliseconds

 tc 12 oversubscription weight = 1

-tc 12 wrr weights = 1 1 1 1
\ No newline at end of file
+tc 12 wrr weights = 1 1 1 1
diff --git a/examples/qos_sched/profile_ov.cfg b/examples/qos_sched/profile_ov.cfg
index 14c89ae340..b6fe21ee1e 100644
--- a/examples/qos_sched/profile_ov.cfg
+++ b/examples/qos_sched/profile_ov.cfg
@@ -6,12 +6,14 @@
 frame overhead = 24
 number of subports per port = 1

+subport 0-8 = 0
+
 ; Subport configuration
 [subport 0]
 number of pipes per subport = 32
 queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64

-subport 0-8 = 0
+pipe 0-31 = 0               ; These pipes are configured with pipe profile 0

 [subport profile 0]
 tb rate = 8400000           ; Bytes per second
@@ -32,8 +34,6 @@ tc 11 rate = 8400000         ; Bytes per second
 tc 12 rate = 8400000         ; Bytes per second
 tc period = 10              ; Milliseconds

-pipe 0-31 = 0               ; These pipes are configured with pipe profile 0
-
 ; Pipe configuration
 [pipe profile 0]
 tb rate = 16800000             ; Bytes per second
diff --git a/examples/qos_sched/profile_pie.cfg b/examples/qos_sched/profile_pie.cfg
index 241f748b33..bbc09d912b 100644
--- a/examples/qos_sched/profile_pie.cfg
+++ b/examples/qos_sched/profile_pie.cfg
@@ -21,12 +21,14 @@
 frame overhead = 24
 number of subports per port = 1

+subport 0-8 = 0                ; These subports are configured with subport profile 0
+
 ; Subport configuration
 [subport 0]
 number of pipes per subport = 4096
 queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64

-subport 0-8 = 0                ; These subports are configured with subport profile 0
+pipe 0-4095 = 0                ; These pipes are configured with pipe profile 0

 [subport profile 0]
 tb rate = 1250000000           ; Bytes per second
@@ -48,8 +50,6 @@ tc 12 rate = 1250000000        ; Bytes per second

 tc period = 10                 ; Milliseconds

-pipe 0-4095 = 0                ; These pipes are configured with pipe profile 0
-
 ; Pipe configuration
 [pipe profile 0]
 tb rate = 305175               ; Bytes per second
diff --git a/examples/qos_sched/profile_red.cfg b/examples/qos_sched/profile_red.cfg
index 4486d2799e..cee1470fd7 100644
--- a/examples/qos_sched/profile_red.cfg
+++ b/examples/qos_sched/profile_red.cfg
@@ -21,12 +21,14 @@
 frame overhead = 24
 number of subports per port = 1

+subport 0-8 = 0                ; These subports are configured with subport profile 0
+
 ; Subport configuration
 [subport 0]
 number of pipes per subport = 4096
 queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64

-subport 0-8 = 0                ; These subports are configured with subport profile 0
+pipe 0-4095 = 0                ; These pipes are configured with pipe profile 0

 [subport profile 0]
 tb rate = 1250000000           ; Bytes per second
@@ -48,8 +50,6 @@ tc 12 rate = 1250000000        ; Bytes per second

 tc period = 10                 ; Milliseconds

-pipe 0-4095 = 0                ; These pipes are configured with pipe profile 0
-
 ; Pipe configuration
 [pipe profile 0]
 tb rate = 305175               ; Bytes per second
--
2.37.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] examples/qos_sched: report error if no pipes configured
  2023-03-21 13:13 [PATCH 0/2] small fixes for QoS profile handling Bruce Richardson
  2023-03-21 13:13 ` [PATCH 1/2] examples/qos_sched: fix config entries in wrong sections Bruce Richardson
@ 2023-03-21 13:13 ` Bruce Richardson
  2023-03-21 17:37   ` Dumitrescu, Cristian
  2023-03-23  9:11 ` [PATCH 0/2] small fixes for QoS profile handling Thomas Monjalon
  2 siblings, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2023-03-21 13:13 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Cristian Dumitrescu

Have the QoS scheduler sample application report an error if no pipes
are configured for a subport.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/qos_sched/init.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 7a27c03b64..d8abae635a 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -233,6 +233,7 @@ app_init_sched_port(uint32_t portid, uint32_t socketid)
 	struct rte_eth_link link;
 	struct rte_sched_port *port = NULL;
 	uint32_t pipe, subport;
+	uint32_t pipe_count;
 	int err;
 
 	err = rte_eth_link_get(portid, &link);
@@ -263,6 +264,7 @@ app_init_sched_port(uint32_t portid, uint32_t socketid)
 		uint32_t n_pipes_per_subport =
 			subport_params[subport].n_pipes_per_subport_enabled;
 
+		pipe_count = 0;
 		for (pipe = 0; pipe < n_pipes_per_subport; pipe++) {
 			if (app_pipe_to_profile[subport][pipe] != -1) {
 				err = rte_sched_pipe_config(port, subport, pipe,
@@ -272,8 +274,13 @@ app_init_sched_port(uint32_t portid, uint32_t socketid)
 							"for profile %d, err=%d\n", pipe,
 							app_pipe_to_profile[subport][pipe], err);
 				}
+				pipe_count++;
 			}
 		}
+
+		if (pipe_count == 0)
+			rte_exit(EXIT_FAILURE, "Error: invalid config, no pipes enabled for sched subport %u\n",
+					subport);
 	}
 
 	return port;
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH 2/2] examples/qos_sched: report error if no pipes configured
  2023-03-21 13:13 ` [PATCH 2/2] examples/qos_sched: report error if no pipes configured Bruce Richardson
@ 2023-03-21 17:37   ` Dumitrescu, Cristian
  0 siblings, 0 replies; 6+ messages in thread
From: Dumitrescu, Cristian @ 2023-03-21 17:37 UTC (permalink / raw)
  To: Richardson, Bruce, dev@dpdk.org



> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Tuesday, March 21, 2023 1:14 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>
> Subject: [PATCH 2/2] examples/qos_sched: report error if no pipes configured
> 
> Have the QoS scheduler sample application report an error if no pipes
> are configured for a subport.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] examples/qos_sched: fix config entries in wrong sections
  2023-03-21 13:13 ` [PATCH 1/2] examples/qos_sched: fix config entries in wrong sections Bruce Richardson
@ 2023-03-21 17:38   ` Dumitrescu, Cristian
  0 siblings, 0 replies; 6+ messages in thread
From: Dumitrescu, Cristian @ 2023-03-21 17:38 UTC (permalink / raw)
  To: Richardson, Bruce, dev@dpdk.org; +Cc: stable@dpdk.org



> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Tuesday, March 21, 2023 1:14 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; stable@dpdk.org;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH 1/2] examples/qos_sched: fix config entries in wrong sections
> 
> When specifying the QoS config, the profiles to be used for each pipe
> within a subport must be specified in the subport section, not in the
> section for the subport profile itself. Similarly for subport profiles,
> those should be specified in the port section.
> 
> Fixes: de3cfa2c9823 ("sched: initial import")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] small fixes for QoS profile handling
  2023-03-21 13:13 [PATCH 0/2] small fixes for QoS profile handling Bruce Richardson
  2023-03-21 13:13 ` [PATCH 1/2] examples/qos_sched: fix config entries in wrong sections Bruce Richardson
  2023-03-21 13:13 ` [PATCH 2/2] examples/qos_sched: report error if no pipes configured Bruce Richardson
@ 2023-03-23  9:11 ` Thomas Monjalon
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2023-03-23  9:11 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

21/03/2023 14:13, Bruce Richardson:
> Fix issues with the QoS block not having explicitly configured pipes -
> instead they started zeroed, which worked fine. Also add into the
> example app a check to flag a warning on any future misconfiguration.
> 
> Bruce Richardson (2):
>   examples/qos_sched: fix config entries in wrong sections
>   examples/qos_sched: report error if no pipes configured

Applied, thanks.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-23  9:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-21 13:13 [PATCH 0/2] small fixes for QoS profile handling Bruce Richardson
2023-03-21 13:13 ` [PATCH 1/2] examples/qos_sched: fix config entries in wrong sections Bruce Richardson
2023-03-21 17:38   ` Dumitrescu, Cristian
2023-03-21 13:13 ` [PATCH 2/2] examples/qos_sched: report error if no pipes configured Bruce Richardson
2023-03-21 17:37   ` Dumitrescu, Cristian
2023-03-23  9:11 ` [PATCH 0/2] small fixes for QoS profile handling Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.