* [dpdk-stable] [PATCH v1] lib/table: fix cache alignment issue
@ 2020-07-09 1:43 Ting Xu
0 siblings, 0 replies; 2+ messages in thread
From: Ting Xu @ 2020-07-09 1:43 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu, Ting Xu, stable
When create softnic hash table with 16 keys, it failed on 32bit
environment because of the structure rte_bucket_4_16 alignment
issue. Add __rte_cache_aligned to ensure correct cache align.
Fixes: 8aa327214c ("table: hash")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
---
lib/librte_table/rte_table_hash_key16.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_table/rte_table_hash_key16.c b/lib/librte_table/rte_table_hash_key16.c
index 2cca1c924..5e1665c15 100644
--- a/lib/librte_table/rte_table_hash_key16.c
+++ b/lib/librte_table/rte_table_hash_key16.c
@@ -44,7 +44,7 @@ struct rte_bucket_4_16 {
uint64_t key[4][2];
/* Cache line 2 */
- uint8_t data[0];
+ uint8_t data[0] __rte_cache_aligned;
};
struct rte_table_hash {
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-stable] [PATCH v1] lib/table: fix cache alignment issue
@ 2020-06-16 16:27 Ting Xu
0 siblings, 0 replies; 2+ messages in thread
From: Ting Xu @ 2020-06-16 16:27 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu, stable
When create softnic hash table with 16 keys, it failed on 32bit
environment because of the structure rte_bucket_4_16 alignment
issue. Add __rte_cache_aligned to ensure correct cache align.
Fixes: 8aa327214c ("table: hash")
Cc: stable@dpdk.org
Signed-off-by: Ting Xu <ting.xu@intel.com>
---
lib/librte_table/rte_table_hash_key16.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_table/rte_table_hash_key16.c b/lib/librte_table/rte_table_hash_key16.c
index 2cca1c924..5e1665c15 100644
--- a/lib/librte_table/rte_table_hash_key16.c
+++ b/lib/librte_table/rte_table_hash_key16.c
@@ -44,7 +44,7 @@ struct rte_bucket_4_16 {
uint64_t key[4][2];
/* Cache line 2 */
- uint8_t data[0];
+ uint8_t data[0] __rte_cache_aligned;
};
struct rte_table_hash {
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-09 1:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 1:43 [dpdk-stable] [PATCH v1] lib/table: fix cache alignment issue Ting Xu
-- strict thread matches above, loose matches on Subject: below --
2020-06-16 16:27 Ting Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).