[dpdk-dev] [PATCH v7 4/4] eal/linux: vfio: add pci ioport support

2016-02-07 Thread Santosh Shukla
Include vfio map/unmap/rd/wr support for pci ioport. Signed-off-by: Santosh Shukla --- v7: - This is enhancement patch for vfio map/rd/wr, rebased on top of David(s) - "Rework ioport for virtio" patchset. For more information about api, refer patch [1]. [1]

[dpdk-dev] [PATCH v7 3/4] eal/linux: vfio: ignore mapping for ioport region

2016-02-07 Thread Santosh Shukla
vfio_pci_mmap() try to map all pci bars. ioport region are not mapped in vfio/kernel so ignore mmaping for ioport. Signed-off-by: Santosh Shukla --- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 20 1 file changed, 20 insertions(+) diff --git

[dpdk-dev] [PATCH v7 2/4] virtio: Introduce config RTE_VIRTIO_INC_VECTOR

2016-02-07 Thread Santosh Shukla
- virtio_recv_pkts_vec and other virtio vector friend apis are written for sse/avx instructions. For arm64 in particular, virtio vector implementation does not exist(todo). So virtio pmd driver wont build for targets like i686, arm64. By making RTE_VIRTIO_INC_VECTOR=n, Driver can build for

[dpdk-dev] [PATCH v7 1/4] eal/linux: never check iopl for arm

2016-02-07 Thread Santosh Shukla
iopl() syscall not supported in linux-arm/arm64 so always return 0 value. Signed-off-by: Santosh Shukla Suggested-by: Stephen Hemminger Acked-by: Jan Viktorin Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal.c |2 ++ 1 file changed, 2 insertions(+) diff --git

[dpdk-dev] [PATCH v7 0/4] Add virtio support for arm/arm64

2016-02-07 Thread Santosh Shukla
Hi, Patch series to allow access to virtio using vfio interface. Tested for vfio-noiommu mode for x86_64/arm64{thunderX} platform. patch series builds successfully for armv7/v8/x86_64/i686. Note: Rebased on David(s) recent patch series titled "rework virtio for ioport". Step to enable

[dpdk-dev] [PATCH v2 3/5] virtio/vdev: add embeded device emulation

2016-02-07 Thread Michael S. Tsirkin
On Fri, Feb 05, 2016 at 07:20:26PM +0800, Jianfeng Tan wrote: > diff --git a/drivers/net/virtio/vhost.h b/drivers/net/virtio/vhost.h > new file mode 100644 > index 000..73d4f5c > --- /dev/null > +++ b/drivers/net/virtio/vhost.h > @@ -0,0 +1,194 @@ > +/*- > + * BSD LICENSE > + * > + *

[dpdk-dev] [PATCH v2 4/4] virtio: use pci ioport api

2016-02-07 Thread David Marchand
Move all os / arch specifics to eal. Signed-off-by: David Marchand --- drivers/net/virtio/virtio_pci.c | 339 +++- drivers/net/virtio/virtio_pci.h | 38 + 2 files changed, 55 insertions(+), 322 deletions(-) diff --git a/drivers/net/virtio/virtio_pci.c

[dpdk-dev] [PATCH v2 3/4] eal: introduce pci ioport api

2016-02-07 Thread David Marchand
Most of the code is inspired on virtio driver. rte_pci_ioport structure is filled at map time with anything needed for later read / write calls. At the moment, offset field is used to store a x86 ioport (uint16_t) and will be reused for other arches. TODO: check multi process, check intr_handle

[dpdk-dev] [PATCH v2 2/4] virtio: fix incorrect check when mapping pci resources

2016-02-07 Thread David Marchand
According to the api, rte_eal_pci_map_device is only successful when returning 0. Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0") Signed-off-by: David Marchand Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH v2 1/4] virtio/bsd: fix typo

2016-02-07 Thread David Marchand
Fixes: c52afa68d763 ("virtio: move left PCI stuff in the right file") Signed-off-by: David Marchand Acked-by: Yuanhan Liu --- drivers/net/virtio/virtio_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c

[dpdk-dev] [PATCH v2 0/4] rework ioport access for virtio

2016-02-07 Thread David Marchand
Introduce a new pci ioport api in eal to mask all arch / kernel driver specifics. - rte_eal_pci_ioport_map is responsible for initialising an rte_pci_ioport object that is used in subsequent calls, this function must be tweaked per architecture and per kernel driver, - rte_eal_pci_ioport_read