From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dwdohert@ecsmtp.ir.intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id CBA33333
 for <dev@dpdk.org>; Tue, 23 Sep 2014 15:12:39 +0200 (CEST)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by orsmga102.jf.intel.com with ESMTP; 23 Sep 2014 06:12:10 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.04,580,1406617200"; d="scan'208";a="577543218"
Received: from irvmail001.ir.intel.com ([163.33.26.43])
 by orsmga001.jf.intel.com with ESMTP; 23 Sep 2014 06:18:22 -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
 s8NDILFQ001221; Tue, 23 Sep 2014 14:18:21 +0100
Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1])
 by sivswdev02.ir.intel.com with ESMTP id s8NDILMi031269;
 Tue, 23 Sep 2014 14:18:21 +0100
Received: (from dwdohert@localhost)
 by sivswdev02.ir.intel.com with  id s8NDILhi031265;
 Tue, 23 Sep 2014 14:18:21 +0100
From: Declan Doherty <declan.doherty@intel.com>
To: dev@dpdk.org
Date: Tue, 23 Sep 2014 14:18:08 +0100
Message-Id: <1411478290-28807-4-git-send-email-declan.doherty@intel.com>
X-Mailer: git-send-email 1.7.4.1
In-Reply-To: <1411478290-28807-1-git-send-email-declan.doherty@intel.com>
References: <1409560289-29558-5-git-send-email-declan.doherty@intel.com>
 <1411478290-28807-1-git-send-email-declan.doherty@intel.com>
Subject: [dpdk-dev] [PATCH v3 3/5] testpmd: adding parameter to reconfig
	method to set socket_id when adding new port to portlist
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Sep 2014 13:12:40 -0000


Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 app/test-pmd/cmdline.c |    2 +-
 app/test-pmd/testpmd.c |    3 ++-
 app/test-pmd/testpmd.h |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 67321f7..ed76eea 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3614,7 +3614,7 @@ static void cmd_create_bonded_device_parsed(void *parsed_result,
 
 		/* Update number of ports */
 		nb_ports = rte_eth_dev_count();
-		reconfig(port_id);
+		reconfig(port_id, res->socket);
 		rte_eth_promiscuous_enable(port_id);
 	}
 
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 9f6cdc4..66e3c7c 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -628,7 +628,7 @@ init_config(void)
 
 
 void
-reconfig(portid_t new_port_id)
+reconfig(portid_t new_port_id, unsigned socket_id)
 {
 	struct rte_port *port;
 
@@ -647,6 +647,7 @@ reconfig(portid_t new_port_id)
 	/* set flag to initialize port/queue */
 	port->need_reconfig = 1;
 	port->need_reconfig_queues = 1;
+	port->socket_id = socket_id;
 
 	init_port_config();
 }
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 142091d..7b78cc5 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -455,7 +455,7 @@ void fwd_config_display(void);
 void rxtx_config_display(void);
 void fwd_config_setup(void);
 void set_def_fwd_config(void);
-void reconfig(portid_t new_port_id);
+void reconfig(portid_t new_port_id, unsigned socket_id);
 int init_fwd_streams(void);
 
 void port_mtu_set(portid_t port_id, uint16_t mtu);
-- 
1.7.4.1