From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <yuanhan.liu@linux.intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 29E1D108D
 for <dev@dpdk.org>; Sun, 22 Jan 2017 03:43:09 +0100 (CET)
Received: from fmsmga005.fm.intel.com ([10.253.24.32])
 by fmsmga102.fm.intel.com with ESMTP; 21 Jan 2017 18:43:08 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.33,267,1477983600"; d="scan'208";a="56089537"
Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162])
 by fmsmga005.fm.intel.com with ESMTP; 21 Jan 2017 18:43:07 -0800
Date: Sun, 22 Jan 2017 10:45:29 +0800
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas.monjalon@6wind.com>,
 Remy Horton <remy.horton@intel.com>
Message-ID: <20170122024529.GZ10293@yliu-dev.sh.intel.com>
References: <1484899493-11051-1-git-send-email-yuanhan.liu@linux.intel.com>
 <6e706e07-455f-de57-4f85-eb4e506528f1@intel.com>
 <4d897cf9-f1f4-d924-10cd-63e95b12b411@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4d897cf9-f1f4-d924-10cd-63e95b12b411@intel.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
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 <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: Sun, 22 Jan 2017 02:43:10 -0000

On Fri, Jan 20, 2017 at 03:27:43PM +0000, Ferruh Yigit wrote:
> 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 <ferruh.yigit@intel.com>
> >> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> >> ---
> >>  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

d948f596fee2 ("ethdev: fix port data mismatched in multiple process
model") should have fixed it.

	--yliu