From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f174.google.com (mail-wj0-f174.google.com [209.85.210.174]) by dpdk.org (Postfix) with ESMTP id 85F732C2F for ; Sun, 20 Nov 2016 17:06:20 +0100 (CET) Received: by mail-wj0-f174.google.com with SMTP id xy5so16897139wjc.0 for ; Sun, 20 Nov 2016 08:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=T73dHOh71mahzVz7+MM3Ykzlw1wCSBfIX23h1WJhP5I=; b=EkGMCJsZQBw4TQtrZnNh66dzma3vwQcxFbPXSOk90xAQ4+iIFG5pe1q5acLwii1yII yzLuIo2VIBTiHdsLMbbH8PI+z6fIHZPW1I0HUWSJ45nMGL4UpwproKW5vchwiKM026a/ yWIDLWspBQaNqZAmjaP6wB4OJOZiumIypKue2hQrccfzoyyuB7QDw81DFqKRke6MruOP Zhargr4fGQVLRMb3OHXv0U3UlZ10Bz2FG/fTnkv8NBcm3afBQmq8UEtu4uR4wB9iqVdR Sd71B7eWDgf1xjn/Vb/ykAO5VsLEfSuulla4a5JGJts6jtXFswdh5JhpO0osii3cj+yE T4Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=T73dHOh71mahzVz7+MM3Ykzlw1wCSBfIX23h1WJhP5I=; b=SAG9LtkI94gK2pKQMl3YG+cKDyZ7tf6xgng8wS49tNvv+9Pd4o2wW277CPRmLWmy5E WAjv9K5Jwq7Q5L/uGclz+jY7TsCv5h0arxKaWD0VRUfLY4sAxIRTmwLfwqmoz6aw98ZU DOBlBuK/csDb8q7hHnh7TqjkUz5I4BrCc/uICt9GYtMw843HqryCIw+BZ/P7AL+Yxl7+ ZQIr8ahqPl8F2vLxwSd9LWv++raDxC9FmNq1xJBwLpq/gpzLC1qU/oMunHgPkS+aEgDp 64lHjsKPeK+4tEEQsu/2BhKjvq8FS4pFM41QdBQabCXeIANsBWTI7DwkVTbH1ptqoWef Te8A== X-Gm-Message-State: AKaTC02RnQ9BgxAegUZRU0h0ebuwSDuvcInFrFIQN4HkAQqVYzdgy24KNRPe795uit8xfZgVo3Y8GcF8DdmA7ifR X-Received: by 10.194.115.226 with SMTP id jr2mr5789623wjb.75.1479657980122; Sun, 20 Nov 2016 08:06:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.188.6 with HTTP; Sun, 20 Nov 2016 08:05:59 -0800 (PST) In-Reply-To: <1479628850-27202-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1479628850-27202-1-git-send-email-jerin.jacob@caviumnetworks.com> From: David Marchand Date: Sun, 20 Nov 2016 17:05:59 +0100 Message-ID: To: Jerin Jacob Cc: "dev@dpdk.org" , Declan Doherty , Thomas Monjalon Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH] eal: postpone vdev initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 16:06:20 -0000 On Sun, Nov 20, 2016 at 9:00 AM, Jerin Jacob wrote: > Some platform like octeontx may use pci and > vdev based combined device to represent a logical > dpdk functional device.In such case, postponing the > vdev initialization after pci device > initialization will provide the better view of > the pci device resources in the system in > vdev's probe function, and it allows better > functional subsystem registration in vdev probe > function. > > As a bonus, This patch fixes a bond device > initialization use case. > > example command to reproduce the issue: > ./testpmd -c 0x2 --vdev 'eth_bond0,mode=0, > slave=0000:02:00.0,slave=0000:03:00.0' -- > --port-topology=chained > > root cause: > In existing case(vdev initialization and then pci > initialization), creates three Ethernet ports with > following port ids > 0 - Bond device > 1 - PCI device 0 > 2 - PCI devive 1 > > Since testpmd, calls the configure/start on all the ports on > start up,it will translate to following illegal setup sequence > > 1)bond device configure/start > 1.1) pci device0 stop/configure/start > 1.2) pci device1 stop/configure/start > 2)pci device 0 configure(illegal setup case, > as device in start state) > > The fix changes the initialization sequence and > allow initialization in following valid setup order > 1) pcie device 0 configure/start > 2) pcie device 1 configure/start > 3) bond device 2 configure/start > 3.1) pcie device 0/stop/configure/start > 3.2) pcie device 1/stop/configure/start This patch is fine. It's been a while since I looked at the bonding pmd. I am just wondering if the bonding pmd should really start its slaves ports. -- David Marchand