Skip to contentSkip to conversation

Revert "sched: enable traffic class oversubscription unconditionally"

PATCH Superseded Megha Ajmera 5 participants 8 messages Mar 14, 2022 – Mar 15, 2022 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "sched: enable traffic class oversubscription unconditionally"

This reverts commit d91c4b1bb5a938734fe8e66da8f965304919f38e.

When enabling TC OV unconditionally, it is observed the performance drops by ~20% hence reverting this commit.

---
 config/rte_config.h                      |  1 +
 drivers/net/softnic/rte_eth_softnic_tm.c | 18 +++++
 examples/qos_sched/init.c                |  2 +
 lib/sched/rte_sched.c                    | 90 ++++++++++++++++++++++++
 4 files changed, 111 insertions(+)
config/rte_config.h +1 -0
index 8eb29c1525..de6fea5b67 100644
@@ -90,6 +90,7 @@
 
 /* rte_sched defines */
 #undef RTE_SCHED_CMAN
+#undef RTE_SCHED_SUBPORT_TC_OV
 
 /* rte_graph defines */
 #define RTE_GRAPH_BURST_SIZE 256
drivers/net/softnic/rte_eth_softnic_tm.c +18 -0
index 6a7766ba1c..e74092ce7f 100644
@@ -595,9 +595,15 @@ static const struct rte_tm_level_capabilities tm_level_cap[] = {
 			.sched_sp_n_priorities_max = 1,
 			.sched_wfq_n_children_per_group_max = UINT32_MAX,
 			.sched_wfq_n_groups_max = 1,
+#ifdef RTE_SCHED_SUBPORT_TC_OV
 			.sched_wfq_weight_max = UINT32_MAX,
 			.sched_wfq_packet_mode_supported = 0,
 			.sched_wfq_byte_mode_supported = 1,
+#else
+			.sched_wfq_weight_max = 1,
+			.sched_wfq_packet_mode_supported = 0,
+			.sched_wfq_byte_mode_supported = 1,
+#endif
 
 			.stats_mask = STATS_MASK_DEFAULT,
 		} },
@@ -2822,6 +2828,8 @@ pmd_tm_hierarchy_commit(struct rte_eth_dev *dev,
 	return 0;
 }
 
+#ifdef RTE_SCHED_SUBPORT_TC_OV
+
 static int
 update_pipe_weight(struct rte_eth_dev *dev, struct tm_node *np, uint32_t weight)
 {
@@ -2859,6 +2867,8 @@ update_pipe_weight(struct rte_eth_dev *dev, struct tm_node *np, uint32_t weight)
 	return 0;
 }
 
+#endif
+
 static int
 update_queue_weight(struct rte_eth_dev *dev,
 	struct tm_node *nq, uint32_t weight)
@@ -2973,6 +2983,7 @@ pmd_tm_node_parent_update(struct rte_eth_dev *dev,
 			rte_strerror(EINVAL));
 		/* fall-through */
 	case TM_NODE_LEVEL_PIPE:
+#ifdef RTE_SCHED_SUBPORT_TC_OV
 		if (update_pipe_weight(dev, n, weight))
 			return -rte_tm_error_set(error,
 				EINVAL,
@@ -2980,6 +2991,13 @@ pmd_tm_node_parent_update(struct rte_eth_dev *dev,
 				NULL,
 				rte_strerror(EINVAL));
 		return 0;
+#else
+		return -rte_tm_error_set(error,
+			EINVAL,
+			RTE_TM_ERROR_TYPE_NODE_WEIGHT,
+			NULL,
+			rte_strerror(EINVAL));
+#endif
 		/* fall-through */
 	case TM_NODE_LEVEL_TC:
 		return -rte_tm_error_set(error,
examples/qos_sched/init.c +2 -0
index 8a0fb8a374..3c1f0bc680 100644
@@ -183,7 +183,9 @@ static struct rte_sched_pipe_params pipe_profiles[MAX_SCHED_PIPE_PROFILES] = {
 		.tc_rate = {305175, 305175, 305175, 305175, 305175, 305175,
 			305175, 305175, 305175, 305175, 305175, 305175, 305175},
 		.tc_period = 40,
+#ifdef RTE_SCHED_SUBPORT_TC_OV
 		.tc_ov_weight = 1,
+#endif
 
 		.wrr_weights = {1, 1, 1, 1},
 	},
lib/sched/rte_sched.c +90 -0

129 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 5 lines · Megha Ajmera

This reverts commit d91c4b1bb5a938734fe8e66da8f965304919f38e.

When enabling TC OV unconditionally, it is observed the performance drops by ~20% hence reverting this commit.

Fixes d91c4b1bb5a9 ("sched: enable traffic class oversubscription unconditionally")
Quoted 2 lines

---

Even though there is already a reference to the commit, it is better to add the DPDK style 'Fixes:' tag too for consistency and stable maintainers. Thanks.

Acked-by on v1 1/1
#7 lore raw
In reply to Megha Ajmera
Quoted 12 lines

-----Original Message-----
From: Ajmera, Megha <[email protected]>
Sent: Monday, March 14, 2022 9:59 AM
To: [email protected]; Mcnamara, John <[email protected]>; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Thakur, Sham Singh <[email protected]>
Subject: [PATCH] Revert "sched: enable traffic class oversubscription unconditionally"

Quoted 7 lines

This reverts commit d91c4b1bb5a938734fe8e66da8f965304919f38e.

When enabling TC OV unconditionally, it is observed the performance drops by ~20% hence reverting this commit.

---

We are reworking the original patch into a run-time configurable option and will resend the improved version shortly during the 22.07 development cycle.

#2 lore raw

PATCH v2 1/1 Revert "sched: enable traffic class oversubscription unconditionally"

In reply to Kevin Traynor

This reverts commit d91c4b1bb5a938734fe8e66da8f965304919f38e.

When enabling TC OV unconditionally, it is observed the performance drops by ~20% hence reverting this commit.

Fixes d91c4b1bb5a9 ("sched: enable traffic class oversubscription

unconditionally")

---
 config/rte_config.h                      |  1 +
 drivers/net/softnic/rte_eth_softnic_tm.c | 18 +++++
 examples/qos_sched/init.c                |  2 +
 lib/sched/rte_sched.c                    | 90 ++++++++++++++++++++++++
 4 files changed, 111 insertions(+)
config/rte_config.h +1 -0
index 8eb29c1525..de6fea5b67 100644
@@ -90,6 +90,7 @@
 
 /* rte_sched defines */
 #undef RTE_SCHED_CMAN
+#undef RTE_SCHED_SUBPORT_TC_OV
 
 /* rte_graph defines */
 #define RTE_GRAPH_BURST_SIZE 256
drivers/net/softnic/rte_eth_softnic_tm.c +18 -0
index 6a7766ba1c..e74092ce7f 100644
@@ -595,9 +595,15 @@ static const struct rte_tm_level_capabilities tm_level_cap[] = {
 			.sched_sp_n_priorities_max = 1,
 			.sched_wfq_n_children_per_group_max = UINT32_MAX,
 			.sched_wfq_n_groups_max = 1,
+#ifdef RTE_SCHED_SUBPORT_TC_OV
 			.sched_wfq_weight_max = UINT32_MAX,
 			.sched_wfq_packet_mode_supported = 0,
 			.sched_wfq_byte_mode_supported = 1,
+#else
+			.sched_wfq_weight_max = 1,
+			.sched_wfq_packet_mode_supported = 0,
+			.sched_wfq_byte_mode_supported = 1,
+#endif
 
 			.stats_mask = STATS_MASK_DEFAULT,
 		} },
@@ -2822,6 +2828,8 @@ pmd_tm_hierarchy_commit(struct rte_eth_dev *dev,
 	return 0;
 }
 
+#ifdef RTE_SCHED_SUBPORT_TC_OV
+
 static int
 update_pipe_weight(struct rte_eth_dev *dev, struct tm_node *np, uint32_t weight)
 {
@@ -2859,6 +2867,8 @@ update_pipe_weight(struct rte_eth_dev *dev, struct tm_node *np, uint32_t weight)
 	return 0;
 }
 
+#endif
+
 static int
 update_queue_weight(struct rte_eth_dev *dev,
 	struct tm_node *nq, uint32_t weight)
@@ -2973,6 +2983,7 @@ pmd_tm_node_parent_update(struct rte_eth_dev *dev,
 			rte_strerror(EINVAL));
 		/* fall-through */
 	case TM_NODE_LEVEL_PIPE:
+#ifdef RTE_SCHED_SUBPORT_TC_OV
 		if (update_pipe_weight(dev, n, weight))
 			return -rte_tm_error_set(error,
 				EINVAL,
@@ -2980,6 +2991,13 @@ pmd_tm_node_parent_update(struct rte_eth_dev *dev,
 				NULL,
 				rte_strerror(EINVAL));
 		return 0;
+#else
+		return -rte_tm_error_set(error,
+			EINVAL,
+			RTE_TM_ERROR_TYPE_NODE_WEIGHT,
+			NULL,
+			rte_strerror(EINVAL));
+#endif
 		/* fall-through */
 	case TM_NODE_LEVEL_TC:
 		return -rte_tm_error_set(error,
examples/qos_sched/init.c +2 -0
index 8a0fb8a374..3c1f0bc680 100644
@@ -183,7 +183,9 @@ static struct rte_sched_pipe_params pipe_profiles[MAX_SCHED_PIPE_PROFILES] = {
 		.tc_rate = {305175, 305175, 305175, 305175, 305175, 305175,
 			305175, 305175, 305175, 305175, 305175, 305175, 305175},
 		.tc_period = 40,
+#ifdef RTE_SCHED_SUBPORT_TC_OV
 		.tc_ov_weight = 1,
+#endif
 
 		.wrr_weights = {1, 1, 1, 1},
 	},
lib/sched/rte_sched.c +90 -0

129 lines not on this page · raw message

Signature · 1 line
2.25.1
#3 lore raw

14/03/2022 13:27, Megha Ajmera:

Quoted 9 lines

This reverts commit d91c4b1bb5a938734fe8e66da8f965304919f38e.

When enabling TC OV unconditionally, it is observed the performance drops by ~20% hence reverting this commit.

Fixes d91c4b1bb5a9 ("sched: enable traffic class oversubscription

unconditionally")

Repeating what was suggested yesterday in a private email. Sorry Megha, I don't know why you were not Cc'ed by your Intel colleagues.

David and I suggested to drop the code which was enabled by the compilation flag RTE_SCHED_SUBPORT_TC_OV,
which was kind of dead code before enabling it unconditionally. This way you maintain the performance of the default compilation, and you can re-introduce the feature, if proven useful, in the next release with a runtime option.

#4 lore raw

Hi Thomas,

Quoted 25 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, March 15, 2022 11:23 AM
To: Ajmera, Megha <[email protected]>
Cc: [email protected]; Mcnamara, John <[email protected]>; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Thakur, Sham Singh <[email protected]>; [email protected]
Subject: Re: [PATCH v2] Revert "sched: enable traffic class oversubscription unconditionally"

14/03/2022 13:27, Megha Ajmera:

Quoted 9 lines

This reverts commit d91c4b1bb5a938734fe8e66da8f965304919f38e.

When enabling TC OV unconditionally, it is observed the performance drops by ~20% hence reverting this commit.

Fixes d91c4b1bb5a9 ("sched: enable traffic class oversubscription

unconditionally")

Repeating what was suggested yesterday in a private email. Sorry Megha, I don't know why you were not Cc'ed by your Intel colleagues.

Quoted 8 lines

David and I suggested to drop the code which was enabled by the compilation flag RTE_SCHED_SUBPORT_TC_OV,
which was kind of dead code before enabling it unconditionally. This way you maintain the performance of the default compilation, and you can re-introduce the feature, if proven useful, in the next release with a runtime option.

After talking with Jasvinder and a few other folks, we think the best option at this point is to keep the code as it is now in the repository, so no further change at this point.

There is a small performance glitch that we plan to fix shortly after the 22.03 release by making the Traffic Class Oversubscription feature conditionally enabled at run-time as opposed to enabled unconditionally. Megha already sent a patch on this, which is under review.

Is this OK with you?

Thank you for your help, we don't want to delay the release in any way!

Regards,
Cristian

#5 lore raw
Quoted 60 lines

-----Original Message-----
From: Dumitrescu, Cristian <[email protected]>
Sent: Tuesday, March 15, 2022 5:25 PM
To: Thomas Monjalon <[email protected]>; Ajmera, Megha <[email protected]>
Cc: [email protected]; Mcnamara, John <[email protected]>; Singh, Jasvinder <[email protected]>; Thakur, Sham Singh <[email protected]>; [email protected]
Subject: RE: [PATCH v2] Revert "sched: enable traffic class oversubscription unconditionally"

Hi Thomas,

Quoted 17 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, March 15, 2022 11:23 AM
To: Ajmera, Megha <[email protected]>
Cc: [email protected]; Mcnamara, John <[email protected]>; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Thakur, Sham Singh <[email protected]>; [email protected]
Subject: Re: [PATCH v2] Revert "sched: enable traffic class oversubscription unconditionally"

14/03/2022 13:27, Megha Ajmera:

Quoted 5 lines

This reverts commit d91c4b1bb5a938734fe8e66da8f965304919f38e.

When enabling TC OV unconditionally, it is observed the performance drops by ~20% hence reverting this commit.

Quoted 7 lines
Quoted 4 lines
Fixes d91c4b1bb5a9 ("sched: enable traffic class oversubscription

unconditionally")

Repeating what was suggested yesterday in a private email. Sorry Megha, I don't know why you were not Cc'ed by your Intel

colleagues.

Quoted 3 lines

David and I suggested to drop the code which was enabled by the compilation flag RTE_SCHED_SUBPORT_TC_OV, which was kind of dead

code

Quoted 6 lines

before enabling it unconditionally.
This way you maintain the performance of the default compilation, and you can re-introduce the feature, if proven useful, in the next release with a runtime option.

After talking with Jasvinder and a few other folks, we think the best option at this point is to keep the code as it is now in the repository, so no further change at this point.

There is a small performance glitch that we plan to fix shortly after the 22.03 release by making the Traffic Class Oversubscription feature conditionally enabled at run-time as opposed to enabled unconditionally. Megha already sent a patch on this, which is under review.

Quoted 6 lines

Is this OK with you?

Thank you for your help, we don't want to delay the release in any way!

Regards,
Cristian

+1

#6 lore raw

15/03/2022 18:25, Singh, Jasvinder:

Quoted 36 lines

From: Dumitrescu, Cristian <[email protected]>

Quoted 35 lines

From: Thomas Monjalon <[email protected]>

Quoted 6 lines

14/03/2022 13:27, Megha Ajmera:

Quoted 5 lines

This reverts commit d91c4b1bb5a938734fe8e66da8f965304919f38e.

When enabling TC OV unconditionally, it is observed the performance drops by ~20% hence reverting this commit.

Quoted 7 lines
Quoted 4 lines
Fixes d91c4b1bb5a9 ("sched: enable traffic class oversubscription

unconditionally")

Repeating what was suggested yesterday in a private email. Sorry Megha, I don't know why you were not Cc'ed by your Intel

colleagues.

Quoted 3 lines

David and I suggested to drop the code which was enabled by the compilation flag RTE_SCHED_SUBPORT_TC_OV, which was kind of dead

code

Quoted 6 lines

before enabling it unconditionally.
This way you maintain the performance of the default compilation, and you can re-introduce the feature, if proven useful, in the next release with a runtime option.

After talking with Jasvinder and a few other folks, we think the best option at this point is to keep the code as it is now in the repository, so no further change at this point.

There is a small performance glitch that we plan to fix shortly after the 22.03 release by making the Traffic Class Oversubscription feature conditionally enabled at run-time as opposed to enabled unconditionally. Megha already sent a patch on this, which is under review.

Quoted 5 lines
Quoted 3 lines

Is this OK with you?

Thank you for your help, we don't want to delay the release in any way!

+1

OK so I mark this revert as rejected.
Thanks.