From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v2 12/12] drivers: update PMDs to use rte_driver probe and remove Date: Mon, 26 Dec 2016 14:44:07 +0530 Message-ID: References: <1480846288-2517-1-git-send-email-shreyansh.jain@nxp.com> <1481636232-2300-1-git-send-email-shreyansh.jain@nxp.com> <1481636232-2300-13-git-send-email-shreyansh.jain@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , David Marchand , Thomas Monjalon , Ferruh Yigit , , Thomas Monjalon To: Jan Blunck Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0088.outbound.protection.outlook.com [104.47.42.88]) by dpdk.org (Postfix) with ESMTP id AAA8E2952 for ; Mon, 26 Dec 2016 10:10:37 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Friday 16 December 2016 03:06 AM, Jan Blunck wrote: > On Wed, Dec 14, 2016 at 10:49 AM, Shreyansh Jain wrote: >> On Tuesday 13 December 2016 07:07 PM, Shreyansh Jain wrote: >>> >>> These callbacks now act as first layer of PCI interfaces from the Bus. >>> Bus probe would enter the PMDs through the rte_driver->probe/remove >>> callbacks, falling to rte_xxx_driver->probe/remove (Currently, all the >>> drivers are rte_pci_driver). >>> >>> Signed-off-by: Shreyansh Jain >>> --- >>> drivers/net/bnx2x/bnx2x_ethdev.c | 8 ++++++++ >>> drivers/net/bnxt/bnxt_ethdev.c | 4 ++++ >>> drivers/net/cxgbe/cxgbe_ethdev.c | 4 ++++ >>> drivers/net/e1000/em_ethdev.c | 4 ++++ >>> drivers/net/e1000/igb_ethdev.c | 8 ++++++++ >>> drivers/net/ena/ena_ethdev.c | 4 ++++ >>> drivers/net/enic/enic_ethdev.c | 4 ++++ >>> drivers/net/fm10k/fm10k_ethdev.c | 4 ++++ >>> drivers/net/i40e/i40e_ethdev.c | 4 ++++ >>> drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++ >>> drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++ >>> drivers/net/mlx4/mlx4.c | 4 +++- >>> drivers/net/mlx5/mlx5.c | 1 + >>> drivers/net/nfp/nfp_net.c | 4 ++++ >>> drivers/net/qede/qede_ethdev.c | 8 ++++++++ >>> drivers/net/szedata2/rte_eth_szedata2.c | 4 ++++ >>> drivers/net/thunderx/nicvf_ethdev.c | 4 ++++ >>> drivers/net/virtio/virtio_ethdev.c | 2 ++ >>> drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++++ >>> 19 files changed, 86 insertions(+), 1 deletion(-) >>> >> >> >> drivers/crypto/qat/rte_qat_cryptodev.c should also be changed for this. It >> seems to be only PCI registered PMD. All others are VDEV. >> >> I will send a v3 soon to fix this. >> >> @Jan, would you be looking in the VDEV part or should I start with that? [1] >> > > Yes, I am doing that. Will send out early next week. Do you think following model will help you for VDEV devices? --->8-- Each bus has following methods: .probe(...) .remove(...) .attach(const char *name) .detach(const char *name) --->8--- Each bus, in this case VDEV bus, would implement these (attach/detach being optional). - For rte_eal_dev_attach, 'attach()' of each bus would be called and name of the devices passed to it. - Bus->attach() would search for the device name (in case of PCI, BDF) and call appropriate initialization routine. - Search over bus stops as soon as any bus confirms a successful attach This is what I was thinking for VDEV: 1. Expose the attach/detach functions in eal_common_bus 2. Define VDEV bus 3. Rather than probe/remove, VDEV implements attach/detach. Rationale for this is that VDEV don't really have a bus and neither is a probe/remove natural for them. They are 'attached'/'detached'. Let me know if this helps. I can provide you base patches over bus series to enable this (I have it ready without much testing). > > Thx, > Jan > >> [1] http://dpdk.org/ml/archives/dev/2016-November/050443.html >> > - Shreyansh