diff --git a/lib/librte_table/rte_table_hash_key16.c b/lib/librte_table/rte_table_hash_key16.c index 2cca1c924a..c4384b114d 100644 --- a/lib/librte_table/rte_table_hash_key16.c +++ b/lib/librte_table/rte_table_hash_key16.c @@ -33,6 +33,7 @@ #endif +#ifdef RTE_ARCH_64 struct rte_bucket_4_16 { /* Cache line 0 */ uint64_t signature[4 + 1]; @@ -46,6 +47,22 @@ struct rte_bucket_4_16 { /* Cache line 2 */ uint8_t data[0]; }; +#else +struct rte_bucket_4_16 { + /* Cache line 0 */ + uint64_t signature[4 + 1]; + uint64_t lru_list; + struct rte_bucket_4_16 *next; + uint32_t pad; + uint64_t next_valid; + + /* Cache line 1 */ + uint64_t key[4][2]; + + /* Cache line 2 */ + uint8_t data[0]; +}; +#endif struct rte_table_hash { struct rte_table_stats stats; diff --git a/lib/librte_table/rte_table_hash_key32.c b/lib/librte_table/rte_table_hash_key32.c index a137c50284..3e0031fe1e 100644 --- a/lib/librte_table/rte_table_hash_key32.c +++ b/lib/librte_table/rte_table_hash_key32.c @@ -33,6 +33,7 @@ #endif +#ifdef RTE_ARCH_64 struct rte_bucket_4_32 { /* Cache line 0 */ uint64_t signature[4 + 1]; @@ -46,6 +47,22 @@ struct rte_bucket_4_32 { /* Cache line 3 */ uint8_t data[0]; }; +#else +struct rte_bucket_4_32 { + /* Cache line 0 */ + uint64_t signature[4 + 1]; + uint64_t lru_list; + struct rte_bucket_4_32 *next; + uint32_t pad; + uint64_t next_valid; + + /* Cache lines 1 and 2 */ + uint64_t key[4][4]; + + /* Cache line 3 */ + uint8_t data[0]; +}; +#endif struct rte_table_hash { struct rte_table_stats stats; diff --git a/lib/librte_table/rte_table_hash_key8.c b/lib/librte_table/rte_table_hash_key8.c index 1811ad8d05..34e3ed1af9 100644 --- a/lib/librte_table/rte_table_hash_key8.c +++ b/lib/librte_table/rte_table_hash_key8.c @@ -31,6 +31,7 @@ #endif +#ifdef RTE_ARCH_64 struct rte_bucket_4_8 { /* Cache line 0 */ uint64_t signature; @@ -43,6 +44,21 @@ struct rte_bucket_4_8 { /* Cache line 1 */ uint8_t data[0]; }; +#else +struct rte_bucket_4_8 { + /* Cache line 0 */ + uint64_t signature; + uint64_t lru_list; + struct rte_bucket_4_8 *next; + uint32_t pad; + uint64_t next_valid; + + uint64_t key[4]; + + /* Cache line 1 */ + uint8_t data[0]; +}; +#endif struct rte_table_hash { struct rte_table_stats stats;