From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=h+2zhxt9Q642wPKcllzIBAvjrl2Fy8AngFhSp/jkaXw=; b=YdlP6c8PEv/MK2XLHoCgA1PVm/YWpmzkS5Xm5pWDhlR1lS4pUdfTuaHulpaAjD++RD p+8j3iZnOvS1O+KJBcqUsi5Cs0a0jgRzR18l3HHlIGRthbA5a6CCfOQRPxYNWG2mciBR ZAlaBgNKmbBu/a+2CEnZbEP8tPD6Fk1glbUhu6ws5O7xlcgyNkQ9Ehe9CJ9PK+5u2yAw EK0I1EEVBoZWdtiPwRU42g2x7dnm61UitlRCn/jYIY+mIFjUYgaqThNoS1HDs5/5pZbh FgqmcAF5hc1s9zb+Mi6AUtdme7PWENgz9cLOSRJGBqmKJFdSvc/546OYetu5l+2EuZnd VxTw== X-Gm-Message-State: ALoCoQkL5U50RXp43NA2dyhRvtngApV+nNZavKhBAiLYxqb1PWBrsyM+aGOSLnV8k4Z8EFhs12yE X-Received: by 10.194.85.130 with SMTP id h2mr7547828wjz.2.1441372163874; Fri, 04 Sep 2015 06:09:23 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id e8sm4326041wiz.0.2015.09.04.06.09.23 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Sep 2015 06:09:23 -0700 (PDT) From: Thomas Monjalon To: Bernard Iremonger Date: Fri, 04 Sep 2015 15:08:14 +0200 Message-ID: <3041493.rxMJ2F3EtF@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1441364514-24905-2-git-send-email-bernard.iremonger@intel.com> References: <1441364514-24905-2-git-send-email-bernard.iremonger@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [RFC PATCH 01/18] librte_eal: remove type field from rte_driver structure. 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: Fri, 04 Sep 2015 13:09:24 -0000 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.