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 6229CA0487 for ; Tue, 2 Jul 2019 11:59:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F0331B993; Tue, 2 Jul 2019 11:59:47 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 8ACAE5B34 for ; Tue, 2 Jul 2019 11:59:45 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 02:59:44 -0700 X-IronPort-AV: E=Sophos;i="5.63,442,1557212400"; d="scan'208";a="168748002" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 02:59:42 -0700 Date: Tue, 2 Jul 2019 10:59:39 +0100 From: Bruce Richardson To: "Burakov, Anatoly" Cc: dev@dpdk.org, thomas@monjalon.net, jerinj@marvell.com, jiayu.hu@intel.com, Harry van Haaren Message-ID: <20190702095939.GA405@bricha3-MOBL.ger.corp.intel.com> References: <20190530212525.40370-1-bruce.richardson@intel.com> <20190701155600.43695-1-bruce.richardson@intel.com> <20190701155600.43695-8-bruce.richardson@intel.com> <71ac9f22-b9df-bc04-6069-af59689a8c01@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <71ac9f22-b9df-bc04-6069-af59689a8c01@intel.com> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH v4 7/9] raw/ioat: add configure, start and stop functions 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 02, 2019 at 10:49:42AM +0100, Burakov, Anatoly wrote: > On 01-Jul-19 4:55 PM, Bruce Richardson wrote: > > Allow initializing a driver instance. Include selftest to validate these > > functions. > > > > Signed-off-by: Bruce Richardson > > Tested-by: Harry van Haaren > > --- > > > > V4: Guarantee correct SUCCESS/FAILURE return values from test function > > Use memzone rather than malloc for ring allocation so we can guarantee > > contiguous memory. > > V3: don't add a new descriptor format struct, reuse from rte_ioat_spec.h > > V2: test cases placed in self-test routine > > --- > > > > > static void > > ioat_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info) > > { > > @@ -44,11 +119,17 @@ ioat_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info) > > cfg->ring_size = ioat->ring_size; > > } > > +int ioat_rawdev_test(uint16_t dev_id); > > + > > static int > > ioat_rawdev_create(const char *name, struct rte_pci_device *dev) > > ...and... > > > + > > +int ioat_rawdev_test(uint16_t dev_id); /* pre-define to keep compiler happy */ > > + > > This looks like you're trying to avoid introducing a header file? (to my > great shame, i don't quite get how would that even work...) > Yes, yes I am. I fail to see the need to create a whole new header file just for a single function prototype, which can be easily stuck in the C file instead. If the scope of internal data or prototypes needed grows beyond this, then we can create an internal header to store it, but I don't foresee that happening any time soon, since things are pretty self-contained apart from these test cases. > Otherwise, > > Acked-by: Anatoly Burakov > > -- > Thanks, > Anatoly