From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 8C82FAB08 for ; Fri, 20 Jan 2017 16:27:46 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP; 20 Jan 2017 07:27:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,258,1477983600"; d="scan'208";a="50798276" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga004.jf.intel.com with ESMTP; 20 Jan 2017 07:27:44 -0800 To: Yuanhan Liu , dev@dpdk.org References: <1484899493-11051-1-git-send-email-yuanhan.liu@linux.intel.com> <6e706e07-455f-de57-4f85-eb4e506528f1@intel.com> Cc: Thomas Monjalon , Remy Horton From: Ferruh Yigit Message-ID: <4d897cf9-f1f4-d924-10cd-63e95b12b411@intel.com> Date: Fri, 20 Jan 2017 15:27:43 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <6e706e07-455f-de57-4f85-eb4e506528f1@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [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: , X-List-Received-Date: Fri, 20 Jan 2017 15:27:47 -0000 On 1/20/2017 11:21 AM, Ferruh Yigit wrote: > On 1/20/2017 8:04 AM, Yuanhan Liu wrote: >> 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)); > > Not directly related to the this issue, but, after fix, this may have > issues with secondary process. > > There were patches sent to fix this. I mean this one: http://dpdk.org/ml/archives/dev/2017-January/054422.html > > >> 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; >> >