From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id 8F6C4AFCF for ; Wed, 25 Jun 2014 18:00:29 +0200 (CEST) Received: by mail-wi0-f174.google.com with SMTP id bs8so8223448wib.1 for ; Wed, 25 Jun 2014 09:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=nQ7J7gKIPWC/sXxwQjFxTvZu9Oebp6UkSSqzmsIGN1o=; b=hrf7KFFLFxL016h2ayWhDwHtAXb+ExyMKSlZg1XcdmagaEzvBoPNz0ftb0l3PMr7c/ k3x52v3wwOqkd1singP/N34xTdx0dtvSi5GgfNbxZVu/KTf9o+uU1oVj0F/H7YqmKGEx IenP/T7uH5U8YgC0aoV0Ksegtw2wdEmwToqLlsKHGzpDE9xXSTSMlnRKp+MA5+6i/za+ i+or7RHQ3Uy3a5lH4vBsw/JbULZ7K80hBFnmvVLXteHFAW4BZ9EGInG6quEW8Lh7Xru1 WB70CO5cNOZGEJncPinkXFlHXoLSIw8eFJ3/VztqcE+plUqzt3nVnMBN+9orWLP047D/ 1A1A== X-Gm-Message-State: ALoCoQl9mHweo/AwTv6J/Gyuno0a3tEs0tSpJi4Pdo9obqJWc9TGr25A9aRU3MbXDweufCpRWdJ6 X-Received: by 10.195.11.34 with SMTP id ef2mr4510962wjd.123.1403712047650; Wed, 25 Jun 2014 09:00:47 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id gi8sm13763323wib.8.2014.06.25.09.00.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jun 2014 09:00:46 -0700 (PDT) From: Thomas Monjalon To: "Doherty, Declan" Date: Wed, 25 Jun 2014 18:00:40 +0200 Message-ID: <2511187.jBxQWp3IxM@xps13> Organization: 6WIND User-Agent: KMail/4.13.1 (Linux/3.14.6-1-ARCH; KDE/4.13.1; x86_64; ; ) In-Reply-To: <345C63BAECC1AD42A2EC8C63AFFC3ADC272FB41C@IRSMSX101.ger.corp.intel.com> References: <1403621531-30487-1-git-send-email-declan.doherty@intel.com> <6725316.vIZR3J0FYH@xps13> <345C63BAECC1AD42A2EC8C63AFFC3ADC272FB41C@IRSMSX101.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v7 3/6] EAL support for link bonding device 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: Wed, 25 Jun 2014 16:00:29 -0000 2014-06-25 14:41, Doherty, Declan: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > Not sure to understand why you need to split rte_eal_dev_init() in 2 > > steps. > > Should it be possible to keep existing rte_eal_dev_init() > > behaviour and makes further initialization when calling > > rte_eth_dev_configure()? > > I've seen it's empty for bonding device: > > Hi Thomas, that need to split rte_eal_dev_init into 2 steps doesn't come > explicitly from the bonded device itself, as a bonded device could be > created at any time during initialization, the issue arises from the fact > that none of physical devices are allocated/initialized until after > pci_probe_all_drivers() is called, this puts an explicit constraint on when > it is possible to create a bonded device which has physical devices as > slaves, as the phyiscal devices don't exist at the initial call to > rte_eal_dev_init() and therefore can't be added as slaves to the bonded > device. > It isn't possible to keep the rte_eal_dev_init() behavior and use > rte_eth_dev_configure() to complete initialization without radically > changing the behavior of the bonding library, and the current > functionality of rte_eth_bond_slave_add(), as this would need to no longer > actually add a slave, but to save the name of a slave to be retrieved at > some point in the future to be added as a slave to the bonded device. I'm sure it would be much cleaner if you split rte_eth_bond_slave_add() instead of splitting rte_eal_dev_init(). If I understand well, you should first save kvargs for slaves and add them at configure time. Then you could remove PMD_BDEV type and use PMD_VDEV. I know it's an additional work but API cleaning really deserves it. Thanks -- Thomas