Skip to contentSkip to conversation

app/testpmd: fix display types failure when query RSS rule

PATCH Superseded Huisong Li 4 participants 9 messages Jul 7, 2022 – Jul 8, 2022

lore
Share & tools
lore

Huisong Li

author
#0 lore raw

PATCH 1/1 app/testpmd: fix display types failure when query RSS rule

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'.

Fixes 534988c490f1 ("app/testpmd: unify RSS types display")
---
 app/test-pmd/config.c | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/config.c +1 -0
index 608bec9796..bcb6d42da3 100644
@@ -1693,6 +1693,7 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
 		return;
 	}
 	rss_types_display(rss_conf->types, TESTPMD_RSS_TYPES_CHAR_NUM_PER_LINE);
+	printf("\n");
 }
 
 static struct port_indirect_action *
Signature · 1 line
2.22.0
#1 lore raw
Quoted 4 lines · Huisong Li

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'.

Bugzilla ID: 1048

Quoted 12 lines
Fixes 534988c490f1 ("app/testpmd: unify RSS types display")
---
  app/test-pmd/config.c | 1 +
  1 file changed, 1 insertion(+)
app/test-pmd/config.c +0 -0
index 608bec9796..bcb6d42da3 100644

app/test-pmd/config.c rss_config_display(struct rte_flow_action_rss *rss_conf) · line 1696

Quoted 4 lines
app/test-pmd/config.c +1 -0
@@ -1693,6 +1693,7 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
  		return;
  	}
  	rss_types_display(rss_conf->types, TESTPMD_RSS_TYPES_CHAR_NUM_PER_LINE);
+	printf("\n");

Thanks Huisong for the fix.

What do you think to have '\n' in the 'rss_types_display()' function and update 'port_rss_hash_conf_show()' usage?

And can do same change for 'rss_offload_types_display()', having last '\n' in the function.

Quoted 3 lines
app/test-pmd/config.c +0 -0
  }
 
  static struct port_indirect_action *
#2 lore raw
Quoted 29 lines · Ferruh Yigit
Quoted 4 lines · Huisong Li

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'.

Bugzilla ID: 1048

Quoted 12 lines
Fixes 534988c490f1 ("app/testpmd: unify RSS types display")

---
  app/test-pmd/config.c | 1 +

  1 file changed, 1 insertion(+)
app/test-pmd/config.c +0 -0
index 608bec9796..bcb6d42da3 100644

app/test-pmd/config.c rss_config_display(struct rte_flow_action_rss · line 1697

Quoted 5 lines
app/test-pmd/config.c +1 -0
@@ -1693,6 +1693,7 @@ rss_config_display(struct rte_flow_action_rss 
 *rss_conf)
           return;
       }
       rss_types_display(rss_conf->types, TESTPMD_RSS_TYPES_CHAR_NUM_PER_LINE);
+    printf("\n");

Thanks Huisong for the fix.

Quoted 3 lines

What do you think to have '\n' in the 'rss_types_display()' function and update 'port_rss_hash_conf_show()' usage?

And can do same change for 'rss_offload_types_display()', having last '\n' in the function.

For the quering RSS rule command, the 'rss_types_display()' is the last function of 'port_flow_query(). But it is not the case in other RSS commands, and all have ''printf("\n")'' after 'xxx_types_display()'.

Quoted 5 lines
Quoted 3 lines
app/test-pmd/config.c +0 -0
   }

    static struct port_indirect_action *

.

#3 lore raw
Quoted 37 lines · lihuisong (C)

CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

Quoted 33 lines · Ferruh Yigit
Quoted 4 lines · Huisong Li

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'.

Bugzilla ID: 1048

Quoted 12 lines
Fixes 534988c490f1 ("app/testpmd: unify RSS types display")

---
  app/test-pmd/config.c | 1 +

  1 file changed, 1 insertion(+)
app/test-pmd/config.c +0 -0
index 608bec9796..bcb6d42da3 100644

app/test-pmd/config.c rss_config_display(struct rte_flow_action_rss · line 1698

Quoted 6 lines
app/test-pmd/config.c +1 -0
@@ -1693,6 +1693,7 @@ rss_config_display(struct rte_flow_action_rss
 *rss_conf)
           return;
       }
       rss_types_display(rss_conf->types,
 TESTPMD_RSS_TYPES_CHAR_NUM_PER_LINE);
+    printf("\n");

Thanks Huisong for the fix.

What do you think to have '\n' in the 'rss_types_display()' function and update 'port_rss_hash_conf_show()' usage?

Quoted 7 lines
Quoted 2 lines

And can do same change for 'rss_offload_types_display()', having last '\n' in the function.

For the quering RSS rule command, the 'rss_types_display()' is the last function
of 'port_flow_query(). But it is not the case in other RSS commands, and all have
''printf("\n")'' after 'xxx_types_display()'.

It shouldn't matter if it is last function or not. I think we can make 'xxx_types_display()' functions self sufficient, without needing additional '\n' after them.

Current output of functions:
"
A B C
D E"

Suggested output"
"
A B C
D E
"

Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
app/test-pmd/config.c +0 -0
   }

    static struct port_indirect_action *

.

#4 lore raw
Quoted 53 lines · Ferruh Yigit
Quoted 37 lines · lihuisong (C)

CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.

Quoted 33 lines · Ferruh Yigit
Quoted 4 lines · Huisong Li

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'.

Bugzilla ID: 1048

Quoted 12 lines
Fixes 534988c490f1 ("app/testpmd: unify RSS types display")

---
  app/test-pmd/config.c | 1 +

  1 file changed, 1 insertion(+)
app/test-pmd/config.c +0 -0
index 608bec9796..bcb6d42da3 100644

app/test-pmd/config.c rss_config_display(struct rte_flow_action_rss · line 1698

Quoted 6 lines
app/test-pmd/config.c +1 -0
@@ -1693,6 +1693,7 @@ rss_config_display(struct rte_flow_action_rss
 *rss_conf)
           return;
       }
       rss_types_display(rss_conf->types,
 TESTPMD_RSS_TYPES_CHAR_NUM_PER_LINE);
+    printf("\n");

Thanks Huisong for the fix.

What do you think to have '\n' in the 'rss_types_display()' function and update 'port_rss_hash_conf_show()' usage?

Quoted 7 lines
Quoted 2 lines

And can do same change for 'rss_offload_types_display()', having last '\n' in the function.

For the quering RSS rule command, the 'rss_types_display()' is the last function
of 'port_flow_query(). But it is not the case in other RSS commands, and all have
''printf("\n")'' after 'xxx_types_display()'.

It shouldn't matter if it is last function or not. I think we can make 'xxx_types_display()' functions self sufficient, without needing additional '\n' after them.

Current output of functions:
"
A B C
D E"

Quoted 5 lines

Suggested output"
"
A B C
D E
"

Yes, every place calling "xxx_types_display()" needs '\n'. I will move it to the inside of "xxx_types_display()"

Quoted 9 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
app/test-pmd/config.c +0 -0
   }

    static struct port_indirect_action *

.

.

author
#5 lore raw

PATCH v2 1/1 app/testpmd: fix display types failure when query RSS rule

In reply to Huisong Li

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'. Actually, all places calling 'xxx_types_display()' need to '\n'. So this patch moves '\n' to the inside of these function.

Fixes 534988c490f1 ("app/testpmd: unify RSS types display")
Fixes 44a37f3cffe0 ("app/testpmd: compact RSS types output")

---
v2:
- move '\n' to the inside of 'xxx_types_display()'.

---
 app/test-pmd/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
app/test-pmd/config.c +2 -2
index 608bec9796..a2939867c4 100644
@@ -761,6 +761,7 @@ rss_offload_types_display(uint64_t offload_types, uint16_t char_num_per_line)
 			total_len += str_len;
 		}
 	}
+	printf("\n");
 }
 
 void
@@ -870,7 +871,6 @@ port_infos_display(portid_t port_id)
 		printf("Supported RSS offload flow types:\n");
 		rss_offload_types_display(dev_info.flow_type_rss_offloads,
 				TESTPMD_RSS_TYPES_CHAR_NUM_PER_LINE);
-		printf("\n");
 	}
 
 	printf("Minimum size of RX buffer: %u\n", dev_info.min_rx_bufsize);
@@ -1648,6 +1648,7 @@ rss_types_display(uint64_t rss_types, uint16_t char_num_per_line)
 			total_len += str_len;
 		}
 	}
+	printf("\n");
 }
 
 static void
@@ -3924,7 +3925,6 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
 	}
 	printf("RSS functions:\n");
 	rss_types_display(rss_hf, TESTPMD_RSS_TYPES_CHAR_NUM_PER_LINE);
-	printf("\n");
 	if (!show_rss_key)
 		return;
 	printf("RSS key:\n");
Signature · 1 line
2.22.0
Tested-by on v2 1/1
#6 lore raw
Quoted 16 lines

-----Original Message-----
From: Huisong Li <[email protected]>
Sent: Friday, July 8, 2022 9:42 AM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Li, WeiyuanX <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [PATCH V2] app/testpmd: fix display types failure when query RSS rule

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'. Actually, all places calling 'xxx_types_display()' need to '\n'. So this patch moves '\n' to the inside of these function.

Quoted 8 lines
Fixes 534988c490f1 ("app/testpmd: unify RSS types display")
Fixes 44a37f3cffe0 ("app/testpmd: compact RSS types output")

---
v2:
- move '\n' to the inside of 'xxx_types_display()'.

#7 lore raw
Quoted 29 lines

-----Original Message-----
From: Li, WeiyuanX <[email protected]>
Sent: Friday, July 8, 2022 1:32 PM
To: Huisong Li <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: RE: [PATCH V2] app/testpmd: fix display types failure when query RSS rule

Quoted 7 lines

-----Original Message-----
From: Huisong Li <[email protected]>
Sent: Friday, July 8, 2022 9:42 AM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Li, WeiyuanX <[email protected]>; [email protected]; [email protected];

[email protected]

Quoted 11 lines

Subject: [PATCH V2] app/testpmd: fix display types failure when query RSS rule

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'. Actually, all places calling 'xxx_types_display()' need to '\n'. So this patch moves '\n' to the inside of these function.

Fixes 534988c490f1 ("app/testpmd: unify RSS types display")
Fixes 44a37f3cffe0 ("app/testpmd: compact RSS types output")
Quoted 7 lines
Quoted 5 lines

---
v2:
- move '\n' to the inside of 'xxx_types_display()'.

Thanks Huisong.

Hi Huisong, Ferruh,

May I know that this patch can be merged into RC4?

Best regards,
Yu Jiang

Reviewed-by Applied
#8 lore raw
In reply to Li, WeiyuanX
Quoted 11 lines · WeiyuanX
Quoted 11 lines

-----Original Message-----
From: Huisong Li <[email protected]>
Sent: Friday, July 8, 2022 9:42 AM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Li, WeiyuanX <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [PATCH V2] app/testpmd: fix display types failure when query RSS rule

Quoted 5 lines
Quoted 5 lines

Now testpmd fails to display types when query RSS rule. The failure is because the '\n' character is missing at the end of the function 'rss_config_display()'. Actually, all places calling 'xxx_types_display()' need to '\n'. So this patch moves '\n' to the inside of these function.

Bugzilla ID: 1048

Quoted 10 lines
Quoted 8 lines
Fixes 534988c490f1 ("app/testpmd: unify RSS types display")
Fixes 44a37f3cffe0 ("app/testpmd: compact RSS types output")

---
v2:
- move '\n' to the inside of 'xxx_types_display()'.

Applied to dpdk-next-net/main, thanks.