From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [RFC PATCH 01/18] librte_eal: remove type field from rte_driver structure. Date: Fri, 04 Sep 2015 15:08:14 +0200 Message-ID: <3041493.rxMJ2F3EtF@xps13> References: <1441364514-24905-2-git-send-email-bernard.iremonger@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Bernard Iremonger Return-path: Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by dpdk.org (Postfix) with ESMTP id 087028D87 for ; Fri, 4 Sep 2015 15:09:24 +0200 (CEST) Received: by wiclk2 with SMTP id lk2so22205821wic.0 for ; Fri, 04 Sep 2015 06:09:23 -0700 (PDT) In-Reply-To: <1441364514-24905-2-git-send-email-bernard.iremonger@intel.com> 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" 2015-09-04 12:01, Bernard Iremonger: > Signed-off-by: Bernard Iremonger There is no explanation in this patch. > - if (driver->type != PMD_PDEV) > - continue; > - /* PDEV drivers don't get passed any parameters */ > - driver->init(NULL, NULL); > + > + /* PCI drivers don't get passed any parameters */ > + /* > + * Search a virtual driver prefix in device name. > + * It should not be found for PCI devices. > + * Use strncmp to compare. > + */ > + > + if ((driver->name) && > + (strncmp(driver->name, "eth_", strlen("eth_")) != 0)) { > + driver->init(NULL, NULL); > + } You don't need to submit a full patchset with changes in every drivers for a RFC. Having just this patch is enough to have an opinion. Here it is a nack. We need to have a common init path instead of the current VDEV/PDEV branches. And instead of "pmd_type", a bus information would be more meaningful. So just replacing a type by a magical string is worst. Please don't try to fix wrong problems and focus on your goal. We had some discussions about possible PCI EAL refactoring but it probably needs to be done step by step with a clear cleaning motivation at each step. I think other people involved in EAL will have other ideas.