From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v4 07/14] virtio: vfio: add api support to rd/wr ioport bar Date: Fri, 15 Jan 2016 14:03:48 +0800 Message-ID: <20160115060348.GR19531@yliu-dev.sh.intel.com> References: <1452778117-30178-1-git-send-email-sshukla@mvista.com> <1452778117-30178-8-git-send-email-sshukla@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Rakesh Krishnamurthy , Rizwan Ansari To: Santosh Shukla Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 31386E62 for ; Fri, 15 Jan 2016 07:02:23 +0100 (CET) Content-Disposition: inline In-Reply-To: <1452778117-30178-8-git-send-email-sshukla@mvista.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Jan 14, 2016 at 06:58:30PM +0530, Santosh Shukla wrote: > For vfio case - Use pread/pwrite api to access virtio > ioport space. > > Signed-off-by: Santosh Shukla > Signed-off-by: Rizwan Ansari > Signed-off-by: Rakesh Krishnamurthy > --- ... > +/* vfio rd/rw virtio apis */ > +static inline void ioport_inb(const struct rte_pci_device *pci_dev, > + uint8_t reg, uint8_t *val) Minor nit: dpdk perfers to seperate return type and function name in different line: static inline void ioport_inb(....) { > +{ > + if (rte_eal_pci_read_bar(pci_dev, (uint8_t *)val, sizeof(uint8_t), reg, ^^^^^^^^^^^ Unnecessary cast; and few more belows. --yliu