From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 4948D7E0F for ; Sun, 28 Sep 2014 14:30:18 +0200 (CEST) Received: from [2001:470:8:a08:215:ff:fecc:4872] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1XYDiU-00050u-Nr; Sun, 28 Sep 2014 08:36:48 -0400 Date: Sun, 28 Sep 2014 08:36:40 -0400 From: Neil Horman To: Ding Heng Message-ID: <20140928123640.GC30445@localhost.localdomain> References: <1411874836-3274-1-git-send-email-hengx.ding@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1411874836-3274-1-git-send-email-hengx.ding@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] ethdev: The users could get device types now 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: Sun, 28 Sep 2014 12:30:18 -0000 On Sun, Sep 28, 2014 at 11:27:16AM +0800, Ding Heng wrote: > As different PMDs support different features, application may want > to know the NIC type of a port, then decide how to use that port. > Add a new field in struct rte_eth_dev, users are able to get > device type now. > > Signed-off-by: Ding Heng Nack. This patch embodies PMD specific information in a common library, which really isn't necessecary. It implies that developers who maintain PMDs outside of the core dpdk still need to do some maintenence in the core for all the dpdk features to work. Its also a layering violation. The core shouldn't have to know any specifics about a driver to initalize it, even its name. If an application wants to know what type of driver a NIC is, the application can just interrogate the pci drivers name field directly. Neil