From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v7 3/6] EAL support for link bonding device initialization Date: Wed, 25 Jun 2014 18:00:40 +0200 Message-ID: <2511187.jBxQWp3IxM@xps13> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Doherty, Declan" Return-path: In-Reply-To: <345C63BAECC1AD42A2EC8C63AFFC3ADC272FB41C-kPTMFJFq+rF9qrmMLTLiibfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-06-25 14:41, Doherty, Declan: > From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] > > 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