diff options
Diffstat (limited to 'debian/patches/dpdk-dev-ppc-enable-5-7-table-fix-verification-on-hash-bucket-header-alignme.patch')
-rw-r--r-- | debian/patches/dpdk-dev-ppc-enable-5-7-table-fix-verification-on-hash-bucket-header-alignme.patch | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/debian/patches/dpdk-dev-ppc-enable-5-7-table-fix-verification-on-hash-bucket-header-alignme.patch b/debian/patches/dpdk-dev-ppc-enable-5-7-table-fix-verification-on-hash-bucket-header-alignme.patch new file mode 100644 index 00000000..1c24ce29 --- /dev/null +++ b/debian/patches/dpdk-dev-ppc-enable-5-7-table-fix-verification-on-hash-bucket-header-alignme.patch @@ -0,0 +1,90 @@ +From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com> +Date: Thu, 8 Sep 2016 22:18:11 +0530 +Subject: [PATCH 5/7] table: fix verification on hash bucket header alignment + +In powerpc systems, rte table hash structs rte_bucket_4_8, rte_bucket_4_16 and +rte_bucket_4_32 are not cache aligned and hence verification on same would fail. +Instead of checking alignment on cpu cacheline, it could equally be tested as +multiple of 64 bytes. + +Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com> +Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> + +Origin: Upstream, commit:43f15e28377f8cc2f8622b458a249efa006c637a +Author: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com> +Last-Update: 2016-09-21 +--- + lib/librte_table/rte_table_hash_key16.c | 4 ++-- + lib/librte_table/rte_table_hash_key32.c | 4 ++-- + lib/librte_table/rte_table_hash_key8.c | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/lib/librte_table/rte_table_hash_key16.c b/lib/librte_table/rte_table_hash_key16.c +index b7e000f..08d4d77 100644 +--- a/lib/librte_table/rte_table_hash_key16.c ++++ b/lib/librte_table/rte_table_hash_key16.c +@@ -130,7 +130,7 @@ rte_table_hash_create_key16_lru(void *params, + /* Check input parameters */ + 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)) ++ ((sizeof(struct rte_bucket_4_16) % 64) != 0)) + return NULL; + n_entries_per_bucket = 4; + key_size = 16; +@@ -344,7 +344,7 @@ rte_table_hash_create_key16_ext(void *params, + /* Check input parameters */ + if ((check_params_create_ext(p) != 0) || + ((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0) || +- ((sizeof(struct rte_bucket_4_16) % RTE_CACHE_LINE_SIZE) != 0)) ++ ((sizeof(struct rte_bucket_4_16) % 64) != 0)) + return NULL; + + n_entries_per_bucket = 4; +diff --git a/lib/librte_table/rte_table_hash_key32.c b/lib/librte_table/rte_table_hash_key32.c +index a7aba49..161f6b7 100644 +--- a/lib/librte_table/rte_table_hash_key32.c ++++ b/lib/librte_table/rte_table_hash_key32.c +@@ -129,7 +129,7 @@ rte_table_hash_create_key32_lru(void *params, + /* Check input parameters */ + 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)) { ++ ((sizeof(struct rte_bucket_4_32) % 64) != 0)) { + return NULL; + } + n_entries_per_bucket = 4; +@@ -337,7 +337,7 @@ rte_table_hash_create_key32_ext(void *params, + /* Check input parameters */ + if ((check_params_create_ext(p) != 0) || + ((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0) || +- ((sizeof(struct rte_bucket_4_32) % RTE_CACHE_LINE_SIZE) != 0)) ++ ((sizeof(struct rte_bucket_4_32) % 64) != 0)) + return NULL; + + n_entries_per_bucket = 4; +diff --git a/lib/librte_table/rte_table_hash_key8.c b/lib/librte_table/rte_table_hash_key8.c +index e2e2bdc..b04f60d 100644 +--- a/lib/librte_table/rte_table_hash_key8.c ++++ b/lib/librte_table/rte_table_hash_key8.c +@@ -125,7 +125,7 @@ rte_table_hash_create_key8_lru(void *params, int socket_id, uint32_t entry_size) + /* Check input parameters */ + 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)) { ++ ((sizeof(struct rte_bucket_4_8) % 64) != 0)) { + return NULL; + } + n_entries_per_bucket = 4; +@@ -332,7 +332,7 @@ rte_table_hash_create_key8_ext(void *params, int socket_id, uint32_t entry_size) + /* Check input parameters */ + if ((check_params_create_ext(p) != 0) || + ((sizeof(struct rte_table_hash) % RTE_CACHE_LINE_SIZE) != 0) || +- ((sizeof(struct rte_bucket_4_8) % RTE_CACHE_LINE_SIZE) != 0)) ++ ((sizeof(struct rte_bucket_4_8) % 64) != 0)) + return NULL; + + n_entries_per_bucket = 4; +-- +1.9.1 + |