From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v1 0/4] Generalize PCI specific EAL function/structures Date: Thu, 13 Oct 2016 12:17:39 +0530 Message-ID: <8dc0386a-f8c0-5c4f-9ffd-2eddaa68cfdf@nxp.com> References: <1472704915-13112-1-git-send-email-shreyansh.jain@nxp.com> <1474985551-14219-1-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: "dev@dpdk.org" , Jan Viktorin , Thomas Monjalon To: David Marchand Return-path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0066.outbound.protection.outlook.com [104.47.32.66]) by dpdk.org (Postfix) with ESMTP id CF4412C0C for ; Thu, 13 Oct 2016 08:46:16 +0200 (CEST) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi David, On Friday 30 September 2016 09:01 PM, David Marchand wrote: > On Tue, Sep 27, 2016 at 4:12 PM, Shreyansh Jain wrote: >> (I rebased these over HEAD 7b3c4f3) >> >> These patches were initially part of Jan's original series on SoC >> Framework ([1],[2]). An update to that series, without these patches, >> was posted here [3]. >> >> Main motivation for these is aim of introducing a non-PCI centric >> subsystem in EAL. As of now the first usecase is SoC, but not limited to >> it. >> >> 4 patches in this series are independent of each other, as well as SoC >> framework. All these focus on generalizing some structure or functions >> present with the PCI specific code to EAL Common area (or splitting a >> function to be more userful). > > Those patches move linux specifics (binding pci devices using sysfs) > to common infrastucture. > We have no proper hotplug support on bsd, but if we had some common > code we should at least try to make the apis generic. > rte_eal_unbind_kernel_driver() defined in the patch is essentially a wrapper which can be implemented for Linux as well as BSD. Just that in this patch a ENOTSUP implementation of this was not given for BSD. I can think of two options: 1. Implement a ENOTSUPP code for BSD and allow rte_eal_unbind_kernel_driver() as part of common/eal_private header. implement rte_eal_unbind_kernel_driver in BSD as not supported. 2. That we keep this contained within Linux area: linux_unbind_kernel_driver <-- pci_unbind_kernel_driver ^ `-- xxx_unbind_kernel_driver bsd_unbind_kernel_driver <-- pci_unbind_kernel_driver `-> this returns ENOTSUPP @Jan: any additions/suggestions? - Shreyansh