[dpdk-dev] [PATCH v3 0/5] add LSC and Rxq interrupt for virtio-user
Jianfeng Tan
jianfeng.tan at intel.com
Fri Mar 31 21:44:53 CEST 2017
v3:
- Move NET_STATUS addition into device layer.
- Drop original 2nd patch.
- Add a patch to move open/close of eventfds to init/uninit.
- As we initialize intr_handle in each vdev driver, in
rte_intr_efd_enable(), skip vdev when initialize intr_handle.
- After commit 26bbd3e7dc51("net/virtio: disable LSC interrupt if
MSIX not enabled"), we requier msix to support LSC.
v2:
- Drop the support of LSC for virtio-user + vhost-kernel as the backend.
- Rearrange the sequence of intr config and DRIVER_OK.
- Address comments from yuanhan.
- Update doc.
This is an attempt to add LSC and Rxq interrupt for a virtual device,
virtio-user (with the backend of both vhost-user and vhost-kernel).
We need to support:
Case 1. Rxq interrupt for virtio-user + vhost-user as the backend.
Case 2. LSC interrupt for virtio-user + vhost-user as the backend.
Case 3. Rxq interrupt for virtio-user + vhost-kernel as the backend.
Another case is not supported now as we did not find a way to monitor
tap device up/down events:
- LSC interrupt for virtio-user + vhost-kernel as the backend.
HOW TO TEST:
Step 1: start testpmd with a virtual vhost device:
$ testpmd -c 0x3 -n 4 --socket-mem 1024 --no-pci \
--vdev 'eth_vhost0,iface=/tmp/sock0' -- -i
Step 2: start l3fwd-power with a virtio-user device:
$ l3fwd-power -c 0xc -n 4 --socket-mem 1024 --no-pci \
--file-prefix=l3fwd-pwd \
--vdev=virtio_user0,path=/tmp/sock0 \
-- -p 1 -P --config="(0,0,1)" \
--no-numa --parse-ptype
Step 3: start burst in testpmd
(testpmd)> start tx_first
Packets will be received and forwarded back by l3fwd-power.
And l3fwd-power will keep in polling mode.
Step 4: stop burst in testpmd
(testpmd)> stop
l3fwd-power will change to interrupt mode with few CPU
consumption.
Step 5: kill testpmd
$ kill -p `pidof testpmd`
The link status will be changed to down in l3fwd-power.
Signed-off-by: Jianfeng Tan <jianfeng.tan at intel.com>
Jianfeng Tan (5):
eal/linux: add interrupt type for vdev
net/virtio-user: move eventfd open/close into init/uninit
net/virtio-user: add rxq interrupt mode support
net/virtio-user: support to report net status
net/virtio-user: add lsc support
doc/guides/rel_notes/release_17_05.rst | 12 +++
drivers/net/virtio/virtio_ethdev.c | 2 +-
drivers/net/virtio/virtio_ethdev.h | 2 +
drivers/net/virtio/virtio_user/virtio_user_dev.c | 114 +++++++++++++++------
drivers/net/virtio/virtio_user/virtio_user_dev.h | 1 +
drivers/net/virtio/virtio_user_ethdev.c | 71 +++++++++++--
lib/librte_eal/linuxapp/eal/eal_interrupts.c | 32 +++++-
.../linuxapp/eal/include/exec-env/rte_interrupts.h | 5 +-
8 files changed, 197 insertions(+), 42 deletions(-)
--
2.7.4
More information about the dev
mailing list