[dpdk-dev,1/2] testpmd: allow to query any RETA size

Message ID 1499407333-1682-1-git-send-email-yliu@fridaylinux.org (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Yuanhan Liu July 7, 2017, 6:02 a.m. UTC
  Currently, testpmd just allows to query the RETA info only when the
required size equals to configured RETA size.

This patch allows to query any RETA size <= the configured size. This
helps when the RETA size is big (say 512) and when I just want to peak
few RETA entries.

Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jingjing Wu July 10, 2017, 1:17 a.m. UTC | #1
> -----Original Message-----
> From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
> Sent: Friday, July 7, 2017 2:02 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Yuanhan Liu <yliu@fridaylinux.org>
> Subject: [PATCH 1/2] testpmd: allow to query any RETA size
> 
> Currently, testpmd just allows to query the RETA info only when the
> required size equals to configured RETA size.
> 
> This patch allows to query any RETA size <= the configured size. This
> helps when the RETA size is big (say 512) and when I just want to peak
> few RETA entries.
> 
> Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
Looks reasonable.

Acked-by: Jingjing Wu <jingjing.wu@intel.com>
  
Ferruh Yigit Oct. 8, 2017, 4:03 a.m. UTC | #2
On 7/10/2017 2:17 AM, jingjing.wu at intel.com (Wu, Jingjing) wrote:
>> -----Original Message-----
>> From: Yuanhan Liu [mailto:yliu at fridaylinux.org]
>> Sent: Friday, July 7, 2017 2:02 PM
>> To: dev at dpdk.org
>> Cc: Wu, Jingjing <jingjing.wu at intel.com>; Yuanhan Liu <yliu at fridaylinux.org>
>> Subject: [PATCH 1/2] testpmd: allow to query any RETA size
>>
>> Currently, testpmd just allows to query the RETA info only when the
>> required size equals to configured RETA size.
>>
>> This patch allows to query any RETA size <= the configured size. This
>> helps when the RETA size is big (say 512) and when I just want to peak
>> few RETA entries.
>>
>> Signed-off-by: Yuanhan Liu <yliu at fridaylinux.org>
> 
> Acked-by: Jingjing Wu <jingjing.wu at intel.com>

Series applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 0afac68..c8faef9 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2143,7 +2143,7 @@  cmd_showport_reta_parsed(void *parsed_result,
 
 	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(res->port_id, &dev_info);
-	if (dev_info.reta_size == 0 || res->size != dev_info.reta_size ||
+	if (dev_info.reta_size == 0 || res->size > dev_info.reta_size ||
 				res->size > ETH_RSS_RETA_SIZE_512) {
 		printf("Invalid redirection table size: %u\n", res->size);
 		return;