From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 629192C8 for ; Thu, 10 Nov 2016 09:17:12 +0100 (CET) Received: by mail-wm0-f47.google.com with SMTP id g23so25300427wme.1 for ; Thu, 10 Nov 2016 00:17:12 -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=A0M4GRDIFmlet9XY/++27B//FhCxe7bLioFaIAD5MHw=; b=B+GWZTUALD4EA6EqxWbHzRbYLwpN6j8gAvvdH01jHZ3h7K/kuParciHRdgOiMgu9FB ib3+RoBYlCP0KCe7VP/kdQxC0ZccmSGitRKjVhYgDvURoksxID2Hlpzm94F/KyWBalFS aVV60qZzT/Fa1mFTgzTnxMzm/T8YFNNx+aE38YYm6KYF7aqUVaMxlcbT8D0kEINm+K3r 87W9qbwvUJFPVlwgTQtwWPcc92H/SkOWVF1/JYi9rzBofhRTxJFwdAKItiSxJLqdPis+ vO/fRhJ8X2Am4ZzyUBogLq78DUiTr8JJJuFwzBrHrWQxeJiB8x61JYGJl0ID2LXZSMAm XM+A== 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=A0M4GRDIFmlet9XY/++27B//FhCxe7bLioFaIAD5MHw=; b=Kcg5opGLKGM4EKvpNnsWhujYr/iDRwwJYKWuSjLqFN/uB+O/HE924aCnhTIstTjFyI OuXjZg1EUT8WGir0cpqgnHDxJyWwngOUB0zEWmxQNZUMbXmYOMhLLomlafy527S/oRdQ FCURrS3L4L4JSbC6Wy5X4yBxtk81Qjkk+acEDsvM3FlmgvYSxJ7hgXM8q3zeyAwKtwGD ND0b6aKFVVp0RYLKtghZqXapfJvnpskAih5S33b9IU4OlrCTn+mi0xxyPWCxdGdAbOnM EEQ+1+E7km9d5x/7BunfRHozTPbR2emkw0yetVPfHSb87KLNdW+1CeXee3tPkcspsrkI ENAw== X-Gm-Message-State: ABUngveZCXy0957UnKKkohGyN3eC+C4CLyiV/sVHL6r8Smfe1SdHoBtD47D2B4JcveQ/btZ+27qxijCSYkVok9FL X-Received: by 10.194.126.38 with SMTP id mv6mr3139161wjb.142.1478765831891; Thu, 10 Nov 2016 00:17:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.188.6 with HTTP; Thu, 10 Nov 2016 00:16:51 -0800 (PST) In-Reply-To: References: From: David Marchand Date: Thu, 10 Nov 2016 09:16:51 +0100 Message-ID: To: Shreyansh Jain Cc: "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] Clarification for eth_driver changes 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: Thu, 10 Nov 2016 08:17:12 -0000 Hello Shreyansh, On Thu, Nov 10, 2016 at 8:26 AM, Shreyansh Jain wrote: > I need some help and clarification regarding some changes I am doing to > cleanup the EAL code. > > There are some changes which should be done for eth_driver/rte_eth_device > structures: > > 1. most obvious, eth_driver should be renamed to rte_eth_driver. > 2. eth_driver currently has rte_pci_driver embedded in it > - there can be ethernet devices which are _not_ PCI > - in which case, this structure should be removed. Do we really need to keep a eth_driver ? As far as I can see, it is only a convenient wrapper for existing pci drivers, but in the end it is just a pci_driver with ethdev context in it that could be pushed to each existing driver. In my initial description http://dpdk.org/ml/archives/dev/2016-January/031390.html, what I had in mind was only having a rte_eth_device pointing to a generic rte_device. If we need to invoke some generic driver ops from ethdev (I can only see the ethdev hotplug api, maybe I missed something), then we would go through rte_eth_device -> rte_device -> rte_driver. The rte_driver keeps its own bus/private logic in its code, and no need to expose a type. > 3. Similarly, rte_eth_dev has rte_pci_device which should be replaced with > rte_device. Yes, that's the main change for me. Thanks. -- David Marchand