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 C16E15598 for ; Fri, 6 May 2016 18:52:18 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 06 May 2016 09:52:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,587,1455004800"; d="scan'208";a="970264744" Received: from gklab-246-025.igk.intel.com (HELO Sent) ([10.217.246.25]) by orsmga002.jf.intel.com with SMTP; 06 May 2016 09:52:15 -0700 Received: by Sent (sSMTP sendmail emulation); Fri, 06 May 2016 19:54:46 +0200 From: Daniel Mrzyglod To: marcinx.kerlin@intel.com, cristian.dumitrescu@intel.com, jasvinder.singh@intel.com Cc: dev@dpdk.org, Daniel Mrzyglod Date: Fri, 6 May 2016 19:54:44 +0200 Message-Id: <1462557284-213903-1-git-send-email-danielx.t.mrzyglod@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dpdk-dev] [PATCH] examples/ip_pipline: fix memory initialization in firewall bulk functions 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: Fri, 06 May 2016 16:52:19 -0000 bulk functions expect that all memory is set with zeros Fixes: 67ebdbef0c31 ("examples/ip_pipeline: add bulk update of firewall rules") Signed-off-by: Daniel Mrzyglod --- examples/ip_pipeline/pipeline/pipeline_firewall_be.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c index e7a8a4c..4edca66 100644 --- a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c +++ b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c @@ -732,7 +732,7 @@ pipeline_firewall_msg_req_add_bulk_handler(struct pipeline *p, void *msg) n_keys = req->n_keys; for (i = 0; i < n_keys; i++) { - entries[i] = rte_malloc(NULL, + entries[i] = rte_zmalloc(NULL, sizeof(struct firewall_table_entry), RTE_CACHE_LINE_SIZE); if (entries[i] == NULL) { @@ -740,7 +740,7 @@ pipeline_firewall_msg_req_add_bulk_handler(struct pipeline *p, void *msg) return rsp; } - params[i] = rte_malloc(NULL, + params[i] = rte_zmalloc(NULL, sizeof(struct rte_table_acl_rule_add_params), RTE_CACHE_LINE_SIZE); if (params[i] == NULL) { @@ -814,7 +814,7 @@ pipeline_firewall_msg_req_del_bulk_handler(struct pipeline *p, void *msg) n_keys = req->n_keys; for (i = 0; i < n_keys; i++) { - params[i] = rte_malloc(NULL, + params[i] = rte_zmalloc(NULL, sizeof(struct rte_table_acl_rule_delete_params), RTE_CACHE_LINE_SIZE); if (params[i] == NULL) { -- 2.5.5