On Fri, Jan 15, 2016 at 11:33 AM, Yuanhan Liu <yuanhan.liu at linux.intel.com> wrote: > 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 <sshukla at mvista.com> >> Signed-off-by: Rizwan Ansari <ransari at mvista.com> >> Signed-off-by: Rakesh Krishnamurthy <rakeshk at mvista.com> >> --- > ... >> +/* 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(....) > { >
ok. >> +{ >> + if (rte_eal_pci_read_bar(pci_dev, (uint8_t *)val, sizeof(uint8_t), reg, > ^^^^^^^^^^^ > > Unnecessary cast; and few more belows. > yes, > --yliu