[dpdk-dev] [RFC PATCH 3/5] virtio: Add a new layer to abstract pci access method

2016-01-22 Thread Tetsuya Mukawa
On 2016/01/22 16:26, Xie, Huawei wrote: > On 1/21/2016 7:08 PM, Tetsuya Mukawa wrote: >> +static void >> +phys_legacy_write16(struct virtio_hw *hw, uint16_t *addr, uint16_t val) >> +{ >> +return outb_p((unsigned short)val, >> +(unsigned short)(hw->io_base + (uint64_t)addr));

[dpdk-dev] [RFC PATCH 3/5] virtio: Add a new layer to abstract pci access method

2016-01-22 Thread Xie, Huawei
On 1/21/2016 7:08 PM, Tetsuya Mukawa wrote: > +static void > +phys_legacy_write16(struct virtio_hw *hw, uint16_t *addr, uint16_t val) > +{ > + return outb_p((unsigned short)val, > + (unsigned short)(hw->io_base + (uint64_t)addr)); outb_p -> outw_p > +} > + > +static void >

[dpdk-dev] [RFC PATCH 3/5] virtio: Add a new layer to abstract pci access method

2016-01-21 Thread Tetsuya Mukawa
This patch addss function pointers to abstract pci access method. This abstraction layer will be used when virtio-net PMD supports container extension. The below functions abstract how to access to pci configuration space. struct virtio_pci_cfg_ops { int (*map)(...); void (*unm