[dpdk-dev] app/test-pipeline: Fix table hash lru initialization

Message ID 1474638890-64618-1-git-send-email-guruprasadx.rao@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Guruprasad Rao Sept. 23, 2016, 1:54 p.m. UTC
  macro ‘APP_METADATA_OFFSET’ was not used to initialize
‘signature_offset’ and ‘key_offset’ part of struct
rte_table_hash_lru_params.
Instead integer offset values were directly used.

with this fix 'hash-8-lru', 'hash-16-lru', 'hash-32-lru' table types are
able to forward traffic as expected.

Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")

Signed-off-by: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
Signed-off-by: Guruprasad Rao <guruprasadx.rao@intel.com>
---
 app/test-pipeline/pipeline_hash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Thomas Monjalon Sept. 23, 2016, 5:22 p.m. UTC | #1
> > macro ‘APP_METADATA_OFFSET’ was not used to initialize
> > ‘signature_offset’ and ‘key_offset’ part of struct
> > rte_table_hash_lru_params.
> > Instead integer offset values were directly used.
> > 
> > with this fix 'hash-8-lru', 'hash-16-lru', 'hash-32-lru' table types are
> > able to forward traffic as expected.
> > 
> > Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark")
> > 
> > Signed-off-by: Sankar Chokkalingam <sankarx.chokkalingam@intel.com>
> > Signed-off-by: Guruprasad Rao <guruprasadx.rao@intel.com>
> 
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Applied, thanks
  

Patch

diff --git a/app/test-pipeline/pipeline_hash.c b/app/test-pipeline/pipeline_hash.c
index f8aac0d..0e369a2 100644
--- a/app/test-pipeline/pipeline_hash.c
+++ b/app/test-pipeline/pipeline_hash.c
@@ -190,8 +190,8 @@  app_main_loop_worker_pipeline_hash(void) {
 			.n_buckets = 1 << 22,
 			.f_hash = test_hash,
 			.seed = 0,
-			.signature_offset = 0,
-			.key_offset = 32,
+			.signature_offset = APP_METADATA_OFFSET(0),
+			.key_offset = APP_METADATA_OFFSET(32),
 		};
 
 		struct rte_pipeline_table_params table_params = {