[dpdk-dev] [PATCH v4 07/14] virtio: vfio: add api support to rd/wr ioport bar

Yuanhan Liu yuanhan.liu at linux.intel.com
Fri Jan 15 07:03:48 CET 2016


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(....)
  {

> +{
> +	if (rte_eal_pci_read_bar(pci_dev, (uint8_t *)val, sizeof(uint8_t), reg,
                                          ^^^^^^^^^^^

Unnecessary cast; and few more belows.

	--yliu


More information about the dev mailing list