Thomas Monjalon
f8e9cbe2aa
mk: fix internal dependencies
...
Some libraries were missing their dependency on eal, mbuf, mempool,
ring and kvargs.
It is revealed by the linker option "-z defs".
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-29 13:33:01 +02:00
Jianfeng Tan
e9efa4d938
net/virtio-user: add new virtual PCI driver
...
This patch implements another new instance of struct virtio_pci_ops to
drive the virtio-user virtual device. Instead of rd/wr ioport or PCI
configuration space, this virtual pci driver will rd/wr the virtual
device struct virtio_user_hw, and when necessary, invokes APIs provided
by device emulation later to start/stop the device.
----------------------
| ------------------ |
| | virtio driver | |----> (virtio_user_ethdev.c)
| ------------------ |
| | |
| ------------------ | ------> virtio-user PMD
| | device emulate | |
| | | |
| | vhost adapter | |
| ------------------ |
----------------------
|
|
|
------------------
| vhost backend |
------------------
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-06-22 09:47:12 +02:00
Jianfeng Tan
37a7eb2ae8
net/virtio-user: add device emulation layer
...
Few device emulation layer functions are added for virtio driver to
call:
- virtio_user_start_device()
- virtio_user_stop_device()
- virtio_user_dev_init()
- virtio_user_dev_uninit()
These functions will get called by virtio driver, and they call vhost
adapter layer functions to implement the functionality.
All stats related to virtual user device as logged in virtio_user_dev
structure.
----------------------
| ------------------ |
| | virtio driver | |
| ------------------ |
| | |
| ------------------ | ------> virtio-user PMD
| | device emulate |-|----> (virtio_user_dev.c, virtio_user_dev.h)
| | | |
| | vhost adapter | |
| ------------------ |
----------------------
|
|
|
------------------
| vhost backend |
------------------
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-06-22 09:47:12 +02:00
Jianfeng Tan
6a84c37e39
net/virtio-user: add vhost-user adapter layer
...
This patch provides vhost adapter layer implementation. Two main
help functions are provided to upper layer (device emulation):
- vhost_user_setup(), to set up vhost user backend;
- vhost_user_sock(), to talk with vhost user backend.
----------------------
| ------------------ |
| | virtio driver | |
| ------------------ |
| | |
| ------------------ | ------> virtio-user PMD
| | device emulate | |
| | | |
| | vhost adapter |-|----> (vhost_user.c)
| ------------------ |
----------------------
|
| -------------- --> (vhost-user protocol)
|
------------------
| vhost backend |
------------------
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-06-22 09:47:12 +02:00
Santosh Shukla
69d308e1c0
virtio: restrict vector Rx/Tx to x86 SSSE3
...
Temporary implementation to let virtio operate in non-vec mode for archs
which doesn't support _ssse_ cpuflag.
todo:
1) Move virtio_recv_pkts_vec() implementation to
drivers/virtio/virtio_vec_<arch>.h file.
2) Remove use_simple_rxtx flag, so that virtio/virtio_vec_<arch>.h
files to provide vectored/non-vectored rx/tx apis.
Fixes: fc3d66212fed ("virtio: add vector Rx")
Fixes: c121c8d6d31a ("virtio: add simple Tx")
Fixes: 8d8393fb1861 ("virtio: pick simple Rx/Tx")
Signed-off-by: Santosh Shukla <sshukla@mvista.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-03-03 14:00:28 +01:00
Huawei Xie
cab0461234
virtio: fill Rx avail ring with blank mbufs
...
Add software RX ring in virtqueue.
Add fake_mbuf in virtqueue for wraparound processing.
Fill avail ring with blank mbufs in virtio_dev_vring_start
Add virtio_rxtx.h header file for RTE_VIRTIO_PMD_MAX_BURST.
Would move all rx/tx related declarations into this header file in future.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
2015-11-02 15:32:19 +01:00
Sergio Gonzalez Monroy
2f9d47013e
mem: move librte_malloc to eal/common
...
Move malloc inside eal and create a new section in MAINTAINERS file for
Memory Allocation in EAL.
Create a dummy malloc library to avoid breaking applications that have
librte_malloc in their DT_NEEDED entries.
This is the first step towards using malloc to allocate memory directly
from memsegs. Thus, memzones would allocate memory through malloc,
allowing to free memzones.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-07-16 13:44:48 +02:00
Bruce Richardson
6c3169a3dc
virtio: move to drivers/net/
...
Move virtio PMD to drivers/net directory
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2015-05-22 16:06:23 +02:00