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

Message ID 20220708014159.13499-1-lihuisong@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [V2] app/testpmd: fix display types failure when query RSS rule |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

lihuisong (C) July 8, 2022, 1:41 a.m. UTC
  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()'.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 app/test-pmd/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Weiyuan Li July 8, 2022, 5:32 a.m. UTC | #1
> -----Original Message-----
> From: Huisong Li <lihuisong@huawei.com>
> Sent: Friday, July 8, 2022 9:42 AM
> To: ferruh.yigit@xilinx.com; andrew.rybchenko@oktetlabs.ru;
> dev@dpdk.org
> Cc: thomas@monjalon.net; Li, WeiyuanX <weiyuanx.li@intel.com>;
> huangdaode@huawei.com; liudongdong3@huawei.com;
> lihuisong@huawei.com
> 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")
> 
> ---
> v2:
>  - move '\n' to the inside of 'xxx_types_display()'.
> 
> Signed-off-by: Huisong Li <lihuisong@huawei.com>

Tested-by: Weiyuan Li <weiyuanx.li@intel.com>
  
Yu Jiang July 8, 2022, 8:15 a.m. UTC | #2
> -----Original Message-----
> From: Li, WeiyuanX <weiyuanx.li@intel.com>
> Sent: Friday, July 8, 2022 1:32 PM
> To: Huisong Li <lihuisong@huawei.com>; ferruh.yigit@xilinx.com;
> andrew.rybchenko@oktetlabs.ru; dev@dpdk.org
> Cc: thomas@monjalon.net; huangdaode@huawei.com;
> liudongdong3@huawei.com
> Subject: RE: [PATCH V2] app/testpmd: fix display types failure when query
> RSS rule
> 
> > -----Original Message-----
> > From: Huisong Li <lihuisong@huawei.com>
> > Sent: Friday, July 8, 2022 9:42 AM
> > To: ferruh.yigit@xilinx.com; andrew.rybchenko@oktetlabs.ru;
> > dev@dpdk.org
> > Cc: thomas@monjalon.net; Li, WeiyuanX <weiyuanx.li@intel.com>;
> > huangdaode@huawei.com; liudongdong3@huawei.com;
> lihuisong@huawei.com
> > 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")
> >
> > ---
> > v2:
> >  - move '\n' to the inside of 'xxx_types_display()'.
> >
> > Signed-off-by: Huisong Li <lihuisong@huawei.com>
> 
> Tested-by: Weiyuan Li <weiyuanx.li@intel.com>

Thanks Huisong.

Hi Huisong, Ferruh,

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

Best regards,
Yu Jiang
  
Ferruh Yigit July 8, 2022, 10:31 a.m. UTC | #3
On 7/8/2022 6:32 AM, Li, WeiyuanX wrote:
>> -----Original Message-----
>> From: Huisong Li <lihuisong@huawei.com>
>> Sent: Friday, July 8, 2022 9:42 AM
>> To: ferruh.yigit@xilinx.com; andrew.rybchenko@oktetlabs.ru;
>> dev@dpdk.org
>> Cc: thomas@monjalon.net; Li, WeiyuanX <weiyuanx.li@intel.com>;
>> huangdaode@huawei.com; liudongdong3@huawei.com;
>> lihuisong@huawei.com
>> 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.
>>

Bugzilla ID: 1048

>> 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()'.
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
> 
> Tested-by: Weiyuan Li <weiyuanx.li@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>

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

Patch

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 608bec9796..a2939867c4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -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");