From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9D4658DB4 for ; Tue, 8 Sep 2015 12:11:32 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 08 Sep 2015 03:11:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,489,1437462000"; d="scan'208";a="799938780" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 08 Sep 2015 03:11:30 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t88ABSMQ024437; Tue, 8 Sep 2015 11:11:28 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t88ABSB2018614; Tue, 8 Sep 2015 11:11:28 +0100 Received: (from jasvinde@localhost) by sivswdev02.ir.intel.com with id t88ABSpc018610; Tue, 8 Sep 2015 11:11:28 +0100 From: Jasvinder Singh To: dev@dpdk.org Date: Tue, 8 Sep 2015 11:11:26 +0100 Message-Id: <1441707088-18563-3-git-send-email-jasvinder.singh@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1441707088-18563-1-git-send-email-jasvinder.singh@intel.com> References: <1441707088-18563-1-git-send-email-jasvinder.singh@intel.com> Subject: [dpdk-dev] [PATCH 2/4] app/test: modify table and pipeline test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2015 10:11:33 -0000 LPM table and test-pipeline has been modified to include name parameter of the lpm table. Signed-off-by: Jasvinder Singh --- app/test-pipeline/pipeline_lpm.c | 1 + app/test-pipeline/pipeline_lpm_ipv6.c | 1 + app/test/test_table_combined.c | 2 + app/test/test_table_tables.c | 102 ++++++++++++++++++++-------------- 4 files changed, 63 insertions(+), 43 deletions(-) diff --git a/app/test-pipeline/pipeline_lpm.c b/app/test-pipeline/pipeline_lpm.c index b1a2c13..c03799c 100644 --- a/app/test-pipeline/pipeline_lpm.c +++ b/app/test-pipeline/pipeline_lpm.c @@ -112,6 +112,7 @@ app_main_loop_worker_pipeline_lpm(void) { /* Table configuration */ { struct rte_table_lpm_params table_lpm_params = { + .name = "LPM", .n_rules = 1 << 24, .entry_unique_size = sizeof(struct rte_pipeline_table_entry), diff --git a/app/test-pipeline/pipeline_lpm_ipv6.c b/app/test-pipeline/pipeline_lpm_ipv6.c index 3f24a2d..02b7a9c 100644 --- a/app/test-pipeline/pipeline_lpm_ipv6.c +++ b/app/test-pipeline/pipeline_lpm_ipv6.c @@ -113,6 +113,7 @@ app_main_loop_worker_pipeline_lpm_ipv6(void) { /* Table configuration */ { struct rte_table_lpm_ipv6_params table_lpm_ipv6_params = { + .name = "LPM", .n_rules = 1 << 24, .number_tbl8s = 1 << 21, .entry_unique_size = diff --git a/app/test/test_table_combined.c b/app/test/test_table_combined.c index dd09da5..f5c7c9b 100644 --- a/app/test/test_table_combined.c +++ b/app/test/test_table_combined.c @@ -293,6 +293,7 @@ test_table_lpm_combined(void) /* Traffic flow */ struct rte_table_lpm_params lpm_params = { + .name = "LPM", .n_rules = 1 << 16, .entry_unique_size = 8, .offset = 0, @@ -352,6 +353,7 @@ test_table_lpm_ipv6_combined(void) /* Traffic flow */ struct rte_table_lpm_ipv6_params lpm_ipv6_params = { + .name = "LPM", .n_rules = 1 << 16, .number_tbl8s = 1 << 13, .entry_unique_size = 8, diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c index 566964b..9d75fbf 100644 --- a/app/test/test_table_tables.c +++ b/app/test/test_table_tables.c @@ -322,6 +322,7 @@ test_table_lpm(void) /* Initialize params and create tables */ struct rte_table_lpm_params lpm_params = { + .name = "LPM", .n_rules = 1 << 24, .entry_unique_size = entry_size, .offset = 1 @@ -331,40 +332,47 @@ test_table_lpm(void) if (table != NULL) return -1; - lpm_params.n_rules = 0; + lpm_params.name = NULL; table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size); if (table != NULL) return -2; + lpm_params.name = "LPM"; + lpm_params.n_rules = 0; + + table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size); + if (table != NULL) + return -3; + lpm_params.n_rules = 1 << 24; lpm_params.offset = 32; lpm_params.entry_unique_size = 0; table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size); if (table != NULL) - return -3; + return -4; lpm_params.entry_unique_size = entry_size + 1; table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size); if (table != NULL) - return -4; + return -5; lpm_params.entry_unique_size = entry_size; table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size); if (table == NULL) - return -5; + return -6; /* Free */ status = rte_table_lpm_ops.f_free(table); if (status < 0) - return -6; + return -7; status = rte_table_lpm_ops.f_free(NULL); if (status == 0) - return -7; + return -8; /* Add */ struct rte_table_lpm_key lpm_key; @@ -372,75 +380,75 @@ test_table_lpm(void) table = rte_table_lpm_ops.f_create(&lpm_params, 0, 1); if (table == NULL) - return -8; + return -9; status = rte_table_lpm_ops.f_add(NULL, &lpm_key, &entry, &key_found, &entry_ptr); if (status == 0) - return -9; + return -10; status = rte_table_lpm_ops.f_add(table, NULL, &entry, &key_found, &entry_ptr); if (status == 0) - return -10; + return -11; status = rte_table_lpm_ops.f_add(table, &lpm_key, NULL, &key_found, &entry_ptr); if (status == 0) - return -11; + return -12; lpm_key.depth = 0; status = rte_table_lpm_ops.f_add(table, &lpm_key, &entry, &key_found, &entry_ptr); if (status == 0) - return -12; + return -13; lpm_key.depth = 33; status = rte_table_lpm_ops.f_add(table, &lpm_key, &entry, &key_found, &entry_ptr); if (status == 0) - return -13; + return -14; lpm_key.depth = 16; status = rte_table_lpm_ops.f_add(table, &lpm_key, &entry, &key_found, &entry_ptr); if (status != 0) - return -14; + return -15; /* Delete */ status = rte_table_lpm_ops.f_delete(NULL, &lpm_key, &key_found, NULL); if (status == 0) - return -15; + return -16; status = rte_table_lpm_ops.f_delete(table, NULL, &key_found, NULL); if (status == 0) - return -16; + return -17; lpm_key.depth = 0; status = rte_table_lpm_ops.f_delete(table, &lpm_key, &key_found, NULL); if (status == 0) - return -17; + return -18; lpm_key.depth = 33; status = rte_table_lpm_ops.f_delete(table, &lpm_key, &key_found, NULL); if (status == 0) - return -18; + return -19; lpm_key.depth = 16; status = rte_table_lpm_ops.f_delete(table, &lpm_key, &key_found, NULL); if (status != 0) - return -19; + return -20; status = rte_table_lpm_ops.f_delete(table, &lpm_key, &key_found, NULL); if (status != 0) - return -20; + return -21; /* Traffic flow */ entry = 'A'; status = rte_table_lpm_ops.f_add(table, &lpm_key, &entry, &key_found, &entry_ptr); if (status < 0) - return -21; + return -22; for (i = 0; i < RTE_PORT_IN_BURST_SIZE_MAX; i++) if (i % 2 == 0) { @@ -452,7 +460,7 @@ test_table_lpm(void) rte_table_lpm_ops.f_lookup(table, mbufs, -1, &result_mask, (void **)entries); if (result_mask != expected_mask) - return -22; + return -23; /* Free resources */ for (i = 0; i < RTE_PORT_IN_BURST_SIZE_MAX; i++) @@ -478,6 +486,7 @@ test_table_lpm_ipv6(void) /* Initialize params and create tables */ struct rte_table_lpm_ipv6_params lpm_params = { + .name = "LPM", .n_rules = 1 << 24, .number_tbl8s = 1 << 21, .entry_unique_size = entry_size, @@ -488,44 +497,51 @@ test_table_lpm_ipv6(void) if (table != NULL) return -1; - lpm_params.n_rules = 0; + lpm_params.name = NULL; table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size); if (table != NULL) return -2; + lpm_params.name = "LPM"; + lpm_params.n_rules = 0; + + table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size); + if (table != NULL) + return -3; + lpm_params.n_rules = 1 << 24; lpm_params.number_tbl8s = 0; table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size); if (table != NULL) - return -2; + return -4; lpm_params.number_tbl8s = 1 << 21; lpm_params.entry_unique_size = 0; table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size); if (table != NULL) - return -2; + return -5; lpm_params.entry_unique_size = entry_size + 1; table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size); if (table != NULL) - return -2; + return -6; lpm_params.entry_unique_size = entry_size; lpm_params.offset = 32; table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size); if (table == NULL) - return -3; + return -7; /* Free */ status = rte_table_lpm_ipv6_ops.f_free(table); if (status < 0) - return -4; + return -8; status = rte_table_lpm_ipv6_ops.f_free(NULL); if (status == 0) - return -5; + return -9; /* Add */ struct rte_table_lpm_ipv6_key lpm_key; @@ -537,80 +553,80 @@ test_table_lpm_ipv6(void) table = rte_table_lpm_ipv6_ops.f_create(&lpm_params, 0, entry_size); if (table == NULL) - return -6; + return -10; status = rte_table_lpm_ipv6_ops.f_add(NULL, &lpm_key, &entry, &key_found, &entry_ptr); if (status == 0) - return -7; + return -11; status = rte_table_lpm_ipv6_ops.f_add(table, NULL, &entry, &key_found, &entry_ptr); if (status == 0) - return -8; + return -12; status = rte_table_lpm_ipv6_ops.f_add(table, &lpm_key, NULL, &key_found, &entry_ptr); if (status == 0) - return -9; + return -13; lpm_key.depth = 0; status = rte_table_lpm_ipv6_ops.f_add(table, &lpm_key, &entry, &key_found, &entry_ptr); if (status == 0) - return -10; + return -14; lpm_key.depth = 129; status = rte_table_lpm_ipv6_ops.f_add(table, &lpm_key, &entry, &key_found, &entry_ptr); if (status == 0) - return -11; + return -15; lpm_key.depth = 16; status = rte_table_lpm_ipv6_ops.f_add(table, &lpm_key, &entry, &key_found, &entry_ptr); if (status != 0) - return -12; + return -16; /* Delete */ status = rte_table_lpm_ipv6_ops.f_delete(NULL, &lpm_key, &key_found, NULL); if (status == 0) - return -13; + return -17; status = rte_table_lpm_ipv6_ops.f_delete(table, NULL, &key_found, NULL); if (status == 0) - return -14; + return -18; lpm_key.depth = 0; status = rte_table_lpm_ipv6_ops.f_delete(table, &lpm_key, &key_found, NULL); if (status == 0) - return -15; + return -19; lpm_key.depth = 129; status = rte_table_lpm_ipv6_ops.f_delete(table, &lpm_key, &key_found, NULL); if (status == 0) - return -16; + return -20; lpm_key.depth = 16; status = rte_table_lpm_ipv6_ops.f_delete(table, &lpm_key, &key_found, NULL); if (status != 0) - return -17; + return -21; status = rte_table_lpm_ipv6_ops.f_delete(table, &lpm_key, &key_found, NULL); if (status != 0) - return -18; + return -22; /* Traffic flow */ entry = 'A'; status = rte_table_lpm_ipv6_ops.f_add(table, &lpm_key, &entry, &key_found, &entry_ptr); if (status < 0) - return -19; + return -23; for (i = 0; i < RTE_PORT_IN_BURST_SIZE_MAX; i++) if (i % 2 == 0) { @@ -622,7 +638,7 @@ test_table_lpm_ipv6(void) rte_table_lpm_ipv6_ops.f_lookup(table, mbufs, -1, &result_mask, (void **)entries); if (result_mask != expected_mask) - return -20; + return -24; /* Free resources */ for (i = 0; i < RTE_PORT_IN_BURST_SIZE_MAX; i++) -- 2.1.0