From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC032A00BE; Tue, 7 Jul 2020 14:31:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 51D221DACB; Tue, 7 Jul 2020 14:31:11 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 506E81D8E6; Tue, 7 Jul 2020 14:31:09 +0200 (CEST) IronPort-SDR: MkyJEVyk0tG2aytLRYjNDrxOdk8DaxC5bGgLdxy95aCNqel472rxMqpO2H09muk4eVYWnct8IN xzBqSFR7mABg== X-IronPort-AV: E=McAfee;i="6000,8403,9674"; a="212548200" X-IronPort-AV: E=Sophos;i="5.75,323,1589266800"; d="scan'208";a="212548200" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2020 05:31:07 -0700 IronPort-SDR: RPnGL+PWsNWhkxoFD/51uA4y3sMqGsbJfFbG1sfo/oFVXvc9/lGvhHhmH0nPkyTRbz02F8rQLE SLtKSqh89BrA== X-IronPort-AV: E=Sophos;i="5.75,323,1589266800"; d="scan'208";a="483498711" Received: from bricha3-mobl.ger.corp.intel.com ([10.251.82.195]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 07 Jul 2020 05:31:06 -0700 Date: Tue, 7 Jul 2020 13:31:03 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: nipun.gupta@nxp.com, hemant.agrawal@nxp.com, dev@dpdk.org, stable@dpdk.org, bluca@debian.org, ktraynor@redhat.com Message-ID: <20200707123103.GA651@bricha3-MOBL.ger.corp.intel.com> References: <20200706103132.7691-1-bruce.richardson@intel.com> <20200706103132.7691-2-bruce.richardson@intel.com> <227734353.nfkpUBtnmh@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <227734353.nfkpUBtnmh@thomas> Subject: Re: [dpdk-dev] [PATCH 1/3] rawdev: allow calling info function for unknown rawdevs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Jul 07, 2020 at 02:18:31PM +0200, Thomas Monjalon wrote: > 06/07/2020 12:31, Bruce Richardson: > > To call the rte_rawdev_info_get() function, the user currently has to > > know the underlying type of the device in order to pass an appropriate > > structure or buffer as the dev_private pointer in the info structure. > > By allowing a NULL value for this field, we can skip getting the > > device-specific info and just return the generic info - including the > > device name and driver, which can be used to determine the device type > > - to the user. > > > > This ensures that basic info can be get for all rawdevs, without > > knowing the type, and even if the info driver API call has not been > > implemented for the device. > > > > Cc: stable@dpdk.org > > This is a new feature. Why should it be backported? > I'd largely leave it up to the stable maintainers, but IMHO it should be backported as its not a big change and I don't see the existing rawdev APIs as very usable without it. I think the current API leaves the user in a bit of a catch 22, since info_get() is the API you'd expect to call to find out the actual type of a rawdev, but unfortunately, to call the info_get API you need to know the type to pass in the appropriate type-specific structure parameter. Therefore I see this as fixing a usability bug. :-) Regards, /Bruce