From patchwork Fri Jan 20 08:04:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuanhan Liu X-Patchwork-Id: 19822 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id B45A92C06; Fri, 20 Jan 2017 09:02:45 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1ADCD2BA7 for ; Fri, 20 Jan 2017 09:02:42 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 20 Jan 2017 00:02:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.33,257,1477983600"; d="scan'208"; a="1085198818" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga001.jf.intel.com with ESMTP; 20 Jan 2017 00:02:40 -0800 From: Yuanhan Liu To: dev@dpdk.org Cc: Ferruh Yigit , Thomas Monjalon , Yuanhan Liu Date: Fri, 20 Jan 2017 16:04:53 +0800 Message-Id: <1484899493-11051-1-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 Subject: [dpdk-dev] [PATCH] ethdev: fix wrong memset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fix an silly error by auto-complete while managing the merge conflicts. It's the eth_dev_data (but not eth_dev) entry should be memset. Fixes: d948f596fee2 ("ethdev: fix port data mismatched in multiple process model") Reported-by: Ferruh Yigit Signed-off-by: Yuanhan Liu --- lib/librte_ether/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 4790faf..61f44e2 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -225,7 +225,7 @@ struct rte_eth_dev * return NULL; } - memset(&rte_eth_devices[port_id], 0, sizeof(*eth_dev->data)); + memset(&rte_eth_dev_data[port_id], 0, sizeof(struct rte_eth_dev_data)); eth_dev = eth_dev_get(port_id); snprintf(eth_dev->data->name, sizeof(eth_dev->data->name), "%s", name); eth_dev->data->port_id = port_id;