From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 4E5001B6B6 for ; Mon, 23 Oct 2017 21:24:53 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 23 Oct 2017 12:24:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,424,1503385200"; d="scan'208";a="1234264548" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.225.136]) ([10.241.225.136]) by fmsmga002.fm.intel.com with ESMTP; 23 Oct 2017 12:24:52 -0700 To: Raslan Darawsheh , gaetan.rivet@6wind.com Cc: dev@dpdk.org, thomas@monjalon.net References: <1508447700-11394-1-git-send-email-rasland@mellanox.com> From: Ferruh Yigit Message-ID: <67d65316-c34a-bf22-1b6b-3c2c0ceac51b@intel.com> Date: Mon, 23 Oct 2017 12:24:52 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1508447700-11394-1-git-send-email-rasland@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] net/failsafe: fix PCI devices init 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: Mon, 23 Oct 2017 19:24:53 -0000 On 10/19/2017 2:15 PM, Raslan Darawsheh wrote: > When trying to attach a port as a sub-device, the ethdev port > was compared with devargs. > In the case of a PCI device, the name in devargs is the PCI address. > And since DPDK 17.08, the devargs name of the underlying device was > used to match an ethdev port: > a1e7c17555e8 ("ethdev: use device name from device structure") > > But the recent commit 72e3efb149cc has reverted this wrong matching > to use the ethdev port name as identifier of the port. > It impacts functions like rte_eth_dev_allocated() used in failsafe > for matching ports with given devargs. > The fix is to search for matching devargs in underlying device of > all ethdev ports. > If many ports match the same PCI device, only the first one is matched. > > This limitation was already present in previous implementation of > rte_eth_dev_allocated(), and must be adressed later with a better > devargs syntax. > > Fixes: 72e3efb149cc ("ethdev: revert use port name from device structure") > > Signed-off-by: Raslan Darawsheh > Acked-by: Gaetan Rivet Applied to dpdk-next-net/master, thanks.