[dpdk-dev,v5,4/8] table: enable table library for ppc64le

Message ID 000001d1f793$b93a8b90$2bafa2b0$@linux.vnet.ibm.com (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

Chao Zhu Aug. 16, 2016, 7:56 a.m. UTC
  Gowrishankar,

The unit test of table got failed. 
When I took a look at the code, it failed on this line in file
lib/librte_table/rte_table_hash_key8.c ,
lib/librte_table/rte_table_hash_key16.c,
lib/librte_table/rte_table_hash_key32.c:

	if ((check_params_create_lru(p) != 0) ||
		((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0)
||
		((sizeof(struct rte_bucket_4_8) % RTE_CACHE_LINE_SIZE) !=
0)) {
		return NULL;
	}

	if ((check_params_create_lru(p) != 0) ||
		((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0)
||
		((sizeof(struct rte_bucket_4_16) % RTE_CACHE_LINE_SIZE) !=
0)) {
		return NULL;
	}

	if ((check_params_create_lru(p) != 0) ||
		((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0)
||
		((sizeof(struct rte_bucket_4_32) % RTE_CACHE_LINE_SIZE) !=
0)) {
		return NULL;
	}

The size of rte_bucket_4_8/16/32 is not aligned to cache line size. This is
normal, because POWER has different cache line size. The change of struct
rte_bucket_4_8/16/32 may solve this problem. I didn't do further
investigation. Can you help to double check this patch?


-----Original Message-----
From: Gowrishankar Muthukrishnan [mailto:gowrishankar.m@linux.vnet.ibm.com] 
Sent: 2016年8月12日 20:03
To: dev@dpdk.org
Cc: Chao Zhu <chaozhu@linux.vnet.ibm.com>; Bruce Richardson
<bruce.richardson@intel.com>; Konstantin Ananyev
<konstantin.ananyev@intel.com>; Thomas Monjalon <thomas.monjalon@6wind.com>;
Cristian Dumitrescu <cristian.dumitrescu@intel.com>; Pradeep
<pradeep@us.ibm.com>; gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
Subject: [PATCH v5 4/8] table: enable table library for ppc64le

From: gowrishankar <gowrishankar.m@linux.vnet.ibm.com>

This patch enables librte_table in ppc64le.

Signed-off-by: Gowrishankar Muthukrishnan
<gowrishankar.m@linux.vnet.ibm.com>
---
 config/defconfig_ppc_64-power8-linuxapp-gcc | 1 -
 1 file changed, 1 deletion(-)

--
1.9.1
  

Comments

Gowrishankar Aug. 16, 2016, 10:34 a.m. UTC | #1
Thanks Chao for bringing up.

I had fixed one of .c earlier before rebasing to master. I then dropped 
the patch
while decoupling ppc enablement and bug fixes. Now I realize on why we need
this fix as part of enabling table in ppc completely. So, added one 
additional patch
separately fixing this in v6. After this patch, a ltable lib unit test 
fail as in Intel case
currently and it is not related to powerpc changes.

If some one already looking into broken unit test failure for table lib, 
that is helpful.

Regards,
Gowrishankar

On Tuesday 16 August 2016 01:26 PM, Chao Zhu wrote:
> Gowrishankar,
>
> The unit test of table got failed.
> When I took a look at the code, it failed on this line in file
> lib/librte_table/rte_table_hash_key8.c ,
> lib/librte_table/rte_table_hash_key16.c,
> lib/librte_table/rte_table_hash_key32.c:
>
> 	if ((check_params_create_lru(p) != 0) ||
> 		((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0)
> ||
> 		((sizeof(struct rte_bucket_4_8) % RTE_CACHE_LINE_SIZE) !=
> 0)) {
> 		return NULL;
> 	}
>
> 	if ((check_params_create_lru(p) != 0) ||
> 		((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0)
> ||
> 		((sizeof(struct rte_bucket_4_16) % RTE_CACHE_LINE_SIZE) !=
> 0)) {
> 		return NULL;
> 	}
>
> 	if ((check_params_create_lru(p) != 0) ||
> 		((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0)
> ||
> 		((sizeof(struct rte_bucket_4_32) % RTE_CACHE_LINE_SIZE) !=
> 0)) {
> 		return NULL;
> 	}
>
> The size of rte_bucket_4_8/16/32 is not aligned to cache line size. This is
> normal, because POWER has different cache line size. The change of struct
> rte_bucket_4_8/16/32 may solve this problem. I didn't do further
> investigation. Can you help to double check this patch?
>
>
> -----Original Message-----
> From: Gowrishankar Muthukrishnan [mailto:gowrishankar.m@linux.vnet.ibm.com]
> Sent: 2016年8月12日 20:03
> To: dev@dpdk.org
> Cc: Chao Zhu <chaozhu@linux.vnet.ibm.com>; Bruce Richardson
> <bruce.richardson@intel.com>; Konstantin Ananyev
> <konstantin.ananyev@intel.com>; Thomas Monjalon <thomas.monjalon@6wind.com>;
> Cristian Dumitrescu <cristian.dumitrescu@intel.com>; Pradeep
> <pradeep@us.ibm.com>; gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
> Subject: [PATCH v5 4/8] table: enable table library for ppc64le
>
> From: gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
>
> This patch enables librte_table in ppc64le.
>
> Signed-off-by: Gowrishankar Muthukrishnan
> <gowrishankar.m@linux.vnet.ibm.com>
> ---
>   config/defconfig_ppc_64-power8-linuxapp-gcc | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/config/defconfig_ppc_64-power8-linuxapp-gcc
> b/config/defconfig_ppc_64-power8-linuxapp-gcc
> index dede34f..41f67d5 100644
> --- a/config/defconfig_ppc_64-power8-linuxapp-gcc
> +++ b/config/defconfig_ppc_64-power8-linuxapp-gcc
> @@ -59,5 +59,4 @@ CONFIG_RTE_LIBRTE_FM10K_PMD=n  # This following libraries
> are not available on Power. So they're turned off.
>   CONFIG_RTE_LIBRTE_SCHED=n
>   CONFIG_RTE_LIBRTE_PORT=n
> -CONFIG_RTE_LIBRTE_TABLE=n
>   CONFIG_RTE_LIBRTE_PIPELINE=n
> --
> 1.9.1
>
>
>
  

Patch

diff --git a/config/defconfig_ppc_64-power8-linuxapp-gcc
b/config/defconfig_ppc_64-power8-linuxapp-gcc
index dede34f..41f67d5 100644
--- a/config/defconfig_ppc_64-power8-linuxapp-gcc
+++ b/config/defconfig_ppc_64-power8-linuxapp-gcc
@@ -59,5 +59,4 @@  CONFIG_RTE_LIBRTE_FM10K_PMD=n  # This following libraries
are not available on Power. So they're turned off.
 CONFIG_RTE_LIBRTE_SCHED=n
 CONFIG_RTE_LIBRTE_PORT=n
-CONFIG_RTE_LIBRTE_TABLE=n
 CONFIG_RTE_LIBRTE_PIPELINE=n