From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3C1158D99 for ; Fri, 4 Dec 2015 15:29:01 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 04 Dec 2015 06:29:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,380,1444719600"; d="scan'208";a="834298651" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 04 Dec 2015 06:28:59 -0800 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 tB4ESw2P026923; Fri, 4 Dec 2015 14:28:58 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id tB4ESwCB014548; Fri, 4 Dec 2015 14:28:58 GMT Received: (from fanzhan2@localhost) by sivswdev02.ir.intel.com with id tB4ESwJH014544; Fri, 4 Dec 2015 14:28:58 GMT From: Fan Zhang To: dev@dpdk.org Date: Fri, 4 Dec 2015 14:28:56 +0000 Message-Id: <1449239336-14507-1-git-send-email-roy.fan.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] example/ip_pipeline: fix source port mempool assignment 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, 04 Dec 2015 14:29:01 -0000 Fixes the wrong source port mempool assignment (commit id eb32fe7c). The source port is now assigned by parsed mempool id index value either by default or configured by CFG file. Previously, the mempool id for locating source port's mempool pointer was the port id. When multiple source ports exist in the same pipeline, and the default mempool configuration is used (one MEMPOOL0 is shared between all source ports), the invalid mempool pointer (NULL) will be assigned to source ports other than first source port. Signed-off-by: Fan Zhang Acked-by: Cristian Dumitrescu --- examples/ip_pipeline/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c index 46d044e..28e959b 100644 --- a/examples/ip_pipeline/init.c +++ b/examples/ip_pipeline/init.c @@ -1064,6 +1064,7 @@ static void app_pipeline_params_get(struct app_params *app, struct pipeline_params *p_out) { uint32_t i; + uint32_t mempool_id; strcpy(p_out->name, p_in->name); @@ -1147,8 +1148,9 @@ static void app_pipeline_params_get(struct app_params *app, out->burst_size = app->tm_params[in->id].burst_read; break; case APP_PKTQ_IN_SOURCE: + mempool_id = app->source_params[in->id].mempool_id; out->type = PIPELINE_PORT_IN_SOURCE; - out->params.source.mempool = app->mempool[in->id]; + out->params.source.mempool = app->mempool[mempool_id]; out->burst_size = app->source_params[in->id].burst; break; default: -- 2.5.0