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 06F4EA04C5; Fri, 4 Sep 2020 16:16:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F6B21C0C6; Fri, 4 Sep 2020 16:16:50 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C56D31C0C0 for ; Fri, 4 Sep 2020 16:16:48 +0200 (CEST) IronPort-SDR: AYESMVpSh6cXvgNLRMSpGiJBErL6pgJHFu1HLekSwNR6VwamEcC5g2v7FWoE6EX9j9NE0HgKQf acRLQh/8mFMA== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="157008697" X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="157008697" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2020 07:16:47 -0700 IronPort-SDR: 6UnOQ6cMUdFM9Q5kWrKYHRoaLQzkLLRH3XCPg3v6ax9vLzKsw3wWKUSFiP4swfAQubylRs2t4s QULHolRr50IA== X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="447334295" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.4.76]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 04 Sep 2020 07:16:45 -0700 Date: Fri, 4 Sep 2020 15:16:42 +0100 From: Bruce Richardson To: Nipun Gupta , Hemant Agrawal Cc: dev@dpdk.org, Rosen Xu , John McNamara , Marko Kovacevic , Satha Rao , Mahipal Challa , Tianfei zhang , Xiaoyun Li , Jingjing Wu Message-ID: <20200904141642.GA305@bricha3-MOBL.ger.corp.intel.com> References: <20200709152047.167730-1-bruce.richardson@intel.com> <20200813112806.164578-1-bruce.richardson@intel.com> <20200813112806.164578-4-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200813112806.164578-4-bruce.richardson@intel.com> Subject: Re: [dpdk-dev] [PATCH v2 3/7] rawdev: add private data length parameter to config fn 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 Thu, Aug 13, 2020 at 12:28:01PM +0100, Bruce Richardson wrote: > Currently with the rawdev API there is no way to check that the structure > passed in via the dev_private pointer in the structure passed to configure > API is of the correct type - it's just checked that it is non-NULL. Adding > in the length of the expected structure provides a measure of typechecking, > and can also be used for ABI compatibility in future, since ABI changes > involving structs almost always involve a change in size. > > Signed-off-by: Bruce Richardson > Reviewed-by: Rosen Xu > --- > doc/guides/rawdevs/ioat.rst | 2 +- > doc/guides/rawdevs/octeontx2_dma.rst | 2 +- > doc/guides/rawdevs/octeontx2_ep.rst | 3 ++- > doc/guides/sample_app_ug/ioat.rst | 2 +- > drivers/raw/ifpga/ifpga_rawdev.c | 3 ++- > drivers/raw/ioat/ioat_rawdev.c | 5 +++-- > drivers/raw/ioat/ioat_rawdev_test.c | 2 +- > drivers/raw/ntb/ntb.c | 6 +++++- > drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 7 ++++--- > drivers/raw/octeontx2_dma/otx2_dpi_test.c | 3 ++- > drivers/raw/octeontx2_ep/otx2_ep_rawdev.c | 7 ++++--- > drivers/raw/octeontx2_ep/otx2_ep_test.c | 2 +- > drivers/raw/skeleton/skeleton_rawdev.c | 5 +++-- > drivers/raw/skeleton/skeleton_rawdev_test.c | 5 +++-- > examples/ioat/ioatfwd.c | 2 +- > examples/ntb/ntb_fwd.c | 2 +- > lib/librte_rawdev/rte_rawdev.c | 6 ++++-- > lib/librte_rawdev/rte_rawdev.h | 8 +++++++- > lib/librte_rawdev/rte_rawdev_pmd.h | 3 ++- > 19 files changed, 48 insertions(+), 27 deletions(-) > > diff --git a/lib/librte_rawdev/rte_rawdev.h b/lib/librte_rawdev/rte_rawdev.h > index cf6acfd261..73e3bd5aea 100644 > --- a/lib/librte_rawdev/rte_rawdev.h > +++ b/lib/librte_rawdev/rte_rawdev.h > @@ -116,13 +116,19 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info, > * driver/implementation can use to configure the device. It is also assumed > * that once the configuration is done, a `queue_id` type field can be used > * to refer to some arbitrary internal representation of a queue. > + * @dev_private_size Small mistake here I just spotted. This should be "@param dev_private_size", otherwise we get doc build warnings. Will fix in V3 if one is needed, otherwise I'd ask that this just be fixed on apply. Thanks, /Bruce