From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: [PATCH] ethdev: The users could get device types now Date: Sun, 28 Sep 2014 08:36:40 -0400 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 Cc: dev-VfR2kkLFssw@public.gmane.org To: Ding Heng Return-path: Content-Disposition: inline In-Reply-To: <1411874836-3274-1-git-send-email-hengx.ding-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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