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 53A5FA0487 for ; Tue, 2 Jul 2019 04:33:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B46B1B99F; Tue, 2 Jul 2019 04:33:31 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B48911B999 for ; Tue, 2 Jul 2019 04:33:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jul 2019 19:33:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,441,1557212400"; d="scan'208";a="171634640" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 01 Jul 2019 19:33:28 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 1 Jul 2019 19:33:28 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 1 Jul 2019 19:33:27 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.3]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.55]) with mapi id 14.03.0439.000; Tue, 2 Jul 2019 10:33:25 +0800 From: "Hu, Jiayu" To: "Richardson, Bruce" , "dev@dpdk.org" CC: "thomas@monjalon.net" , "jerinj@marvell.com" , "Van Haaren, Harry" Thread-Topic: [PATCH v4 6/9] raw/ioat: add device info function Thread-Index: AQHVMCWUGEWnVPqTJEmw6IOIwcaLV6a2mpng Date: Tue, 2 Jul 2019 02:33:25 +0000 Message-ID: References: <20190530212525.40370-1-bruce.richardson@intel.com> <20190701155600.43695-1-bruce.richardson@intel.com> <20190701155600.43695-7-bruce.richardson@intel.com> In-Reply-To: <20190701155600.43695-7-bruce.richardson@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2YxYzVjNWYtODY0Ny00ZTBmLWFmYzQtZDAzMDk0NWZjY2Y4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiR21hZzhFWHNjQ3hYM1FSd2VqUWJ3WSs2NVZSNERLSHpcL0ZZaXBwbjJQT085OXd4Wm1MMmg2ZnNESHowN2ZvdFwvIn0= x-ctpclassification: CTP_NT x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 6/9] raw/ioat: add device info function 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" > -----Original Message----- > From: Richardson, Bruce > Sent: Monday, July 1, 2019 11:56 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; jerinj@marvell.com; Hu, Jiayu > ; Richardson, Bruce ; > Van Haaren, Harry > Subject: [PATCH v4 6/9] raw/ioat: add device info function >=20 > Add in the "info_get" function to the driver, to allow us to query the > device. This allows us to have the unit test pick up the presence of > supported hardware or not. >=20 > Signed-off-by: Bruce Richardson > Tested-by: Harry van Haaren > --- > V4: Use TEST_SUCCESS in place of 0, when returning from test case. > Minor documentation updates. >=20 > V2: Test case is placed in driver self-test routine > --- > app/test/test_rawdev.c | 11 ++++++++++ > doc/guides/rawdevs/ioat_rawdev.rst | 34 > ++++++++++++++++++++++++++++++ > drivers/raw/ioat/ioat_rawdev.c | 11 ++++++++++ > drivers/raw/ioat/rte_ioat_rawdev.h | 11 ++++++++++ > 4 files changed, 67 insertions(+) >=20 > diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawde= v.c > index 86b5b2a77..2bfe2544d 100644 > --- a/drivers/raw/ioat/ioat_rawdev.c > +++ b/drivers/raw/ioat/ioat_rawdev.c > @@ -34,10 +34,21 @@ static struct rte_pci_driver ioat_pmd_drv; > #define IOAT_PMD_ERR(fmt, args...) IOAT_PMD_LOG(ERR, fmt, ## args) > #define IOAT_PMD_WARN(fmt, args...) IOAT_PMD_LOG(WARNING, fmt, ## > args) >=20 > +static void > +ioat_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info) > +{ > + struct rte_ioat_rawdev_config *cfg =3D dev_info; > + struct rte_ioat_rawdev *ioat =3D dev->dev_private; > + > + if (cfg !=3D NULL) > + cfg->ring_size =3D ioat->ring_size; > +} The CBDMA user may want to know the maximum copy length that the device supports and the NUMA location of the device. So can ioat_dev_info_get() return more device information? Thanks, Jiayu