|
Revision tags: v22.03, v22.03-rc4, v22.03-rc3 |
|
| #
666ff776 |
| 02-Mar-2022 |
Harold Huang <[email protected]> |
net/virtio: support NAPI when using vhost-net backend
In patch [1], NAPI has been supported in kernel tun driver to accelerate packet processing received from vhost-net. This will greatly improve th
net/virtio: support NAPI when using vhost-net backend
In patch [1], NAPI has been supported in kernel tun driver to accelerate packet processing received from vhost-net. This will greatly improve the throughput of the tap device in the vhost-net backend.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=fb3f903769e8
Signed-off-by: Harold Huang <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
|
Revision tags: v22.03-rc2, v22.03-rc1, v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1 |
|
| #
b72099be |
| 28-Sep-2021 |
David Marchand <[email protected]> |
net/virtio-user: fix init when using existing tap
When attaching to an existing mono queue tap, the virtio-user was not reporting that the virtio device was not properly initialised which prevented
net/virtio-user: fix init when using existing tap
When attaching to an existing mono queue tap, the virtio-user was not reporting that the virtio device was not properly initialised which prevented from starting the port later.
$ ip tuntap add test mode tap $ dpdk-testpmd --vdev \ net_virtio_user0,iface=test,path=/dev/vhost-net,queues=2 -- -i
... virtio_user_dev_init_mac(): (/dev/vhost-net) No valid MAC in devargs or device, use random vhost_kernel_open_tap(): TUNSETIFF failed: Invalid argument vhost_kernel_enable_queue_pair(): fail to open tap for vhost kernel virtio_user_start_device(): (/dev/vhost-net) Failed to start device ... Configuring Port 0 (socket 0) vhost_kernel_open_tap(): TUNSETIFF failed: Invalid argument vhost_kernel_enable_queue_pair(): fail to open tap for vhost kernel virtio_set_multiple_queues(): Multiqueue configured but send command failed, this is too late now... Fail to start port 0: Invalid argument Please stop the ports first Done
The virtio-user with vhost-kernel backend was going through a lot of complications to initialise tap fds only when using them.
For each qp enabled for the first time, a tapfd was created via TUNSETIFF with unneeded additional steps (see below) and then mapped to the right qp in the vhost-net backend. Unneeded steps (as long as it has been done once for the port): - tap features were queried while this is a constant on a running system, - the device name in DPDK was updated, - the mac address of the tap was set,
On subsequent qps state change, the vhost-net backend fd mapping was updated and the associated queue/tapfd were disabled/enabled via TUNSETQUEUE.
Now, this patch simplifies the whole logic by keeping all tapfds opened and in enabled state (from the tap point of view) at all time.
Unused ioctl defines are removed.
Tap features are validated earlier to fail initialisation asap. Tap name discovery and mac address configuration are moved when configuring qp 0.
To support attaching to mono queue tap, the virtio-user driver now tries to attach in multi queue first, then fallbacks to mono queue.
Finally (but this is more for consistency), VIRTIO_NET_F_MQ feature is exposed only if the underlying tap supports multi queue.
Signed-off-by: David Marchand <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
| #
f3854eba |
| 16-Sep-2021 |
Thomas Monjalon <[email protected]> |
net/virtio: remove blank lines in log
The macros PMD_*_LOG already include the line feed character. Redundant \n are removed.
Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: David
net/virtio: remove blank lines in log
The macros PMD_*_LOG already include the line feed character. Redundant \n are removed.
Signed-off-by: Thomas Monjalon <[email protected]> Reviewed-by: David Marchand <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
|
Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1, v21.02, v21.02-rc4, v21.02-rc3, v21.02-rc2 |
|
| #
cc0151b3 |
| 26-Jan-2021 |
Maxime Coquelin <[email protected]> |
net/virtio: add virtio-user features ops
This patch introduces new callbacks for getting and setting Virtio features, and implements them for the different backend types.
Signed-off-by: Maxime Coqu
net/virtio: add virtio-user features ops
This patch introduces new callbacks for getting and setting Virtio features, and implements them for the different backend types.
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
| #
b4f9a45a |
| 26-Jan-2021 |
Maxime Coquelin <[email protected]> |
net/virtio: move features definition to generic header
This patch moves all the Virtio definition to the generic header. It also renames some helpers to no more reference PCI.
Signed-off-by: Maxime
net/virtio: move features definition to generic header
This patch moves all the Virtio definition to the generic header. It also renames some helpers to no more reference PCI.
Signed-off-by: Maxime Coquelin <[email protected]> Reviewed-by: Chenbo Xia <[email protected]>
show more ...
|
|
Revision tags: v21.02-rc1, v20.11, v20.11-rc5, v20.11-rc4, v20.11-rc3, v20.11-rc2 |
|
| #
e8cff614 |
| 29-Oct-2020 |
Luca Boccassi <[email protected]> |
fix spellings that Lintian complains about
Fixes: 103809d032cd ("app/test-fib: add test application for FIB") Fixes: 1265b5372d9d ("net/hns3: add some definitions for data structure and macro") Fixe
fix spellings that Lintian complains about
Fixes: 103809d032cd ("app/test-fib: add test application for FIB") Fixes: 1265b5372d9d ("net/hns3: add some definitions for data structure and macro") Fixes: a85e378cc606 ("net/ixgbe/base: add debug traces") Fixes: 4861cde46116 ("i40e: new poll mode driver") Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Fixes: 86a2265e59d7 ("qede: add SRIOV support") Fixes: 1db4d2330bc8 ("net/virtio-user: check negotiated features before set") Cc: [email protected]
Signed-off-by: Luca Boccassi <[email protected]>
show more ...
|
|
Revision tags: v20.11-rc1, v20.08, v20.08-rc4, v20.08-rc3 |
|
| #
570ee256 |
| 29-Jul-2020 |
Chenbo Xia <[email protected]> |
net/virtio-user: check tap system call setting
Setting the flags of tapfd may fail and the return value should be checked.
Coverity issue: 140739 Fixes: e3b434818bbb ("net/virtio-user: support kern
net/virtio-user: check tap system call setting
Setting the flags of tapfd may fail and the return value should be checked.
Coverity issue: 140739 Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost") Cc: [email protected]
Signed-off-by: Chenbo Xia <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
|
Revision tags: v20.08-rc2, v20.08-rc1, v20.05, v20.05-rc4, v20.05-rc3, v20.05-rc2, v20.05-rc1, v20.02, v20.02-rc4, v20.02-rc3, v20.02-rc2, v20.02-rc1 |
|
| #
1ad2f882 |
| 13-Jan-2020 |
Yunjian Wang <[email protected]> |
net/virtio-user: check tap offload setting failure
The function vhost_kernel_tap_set_offload() could return errors, the return value need to be checked. And there is no need to fail when error is -E
net/virtio-user: check tap offload setting failure
The function vhost_kernel_tap_set_offload() could return errors, the return value need to be checked. And there is no need to fail when error is -ENOTSUP.
Fixes: 1db4d2330bc8 ("net/virtio-user: check negotiated features before set") Cc: [email protected]
Signed-off-by: Yunjian Wang <[email protected]> Reviewed-by: Tiwei Bie <[email protected]>
show more ...
|
|
Revision tags: v19.11, v19.11-rc4 |
|
| #
47ac9661 |
| 25-Nov-2019 |
Tiwei Bie <[email protected]> |
net/virtio-user: do not close tap when disabling queue pairs
Do not close the tap fds when disabling queue pairs, instead, we just need to unbind the backend. Otherwise, tap port can be destroyed un
net/virtio-user: do not close tap when disabling queue pairs
Do not close the tap fds when disabling queue pairs, instead, we just need to unbind the backend. Otherwise, tap port can be destroyed unexpectedly.
Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost") Cc: [email protected]
Reported-by: Stephen Hemminger <[email protected]> Signed-off-by: Tiwei Bie <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]>
show more ...
|
|
Revision tags: v19.11-rc3, v19.11-rc2, v19.11-rc1, v19.08, v19.08-rc4, v19.08-rc3, v19.08-rc2, v19.08-rc1 |
|
| #
35b2d13f |
| 21-May-2019 |
Olivier Matz <[email protected]> |
net: add rte prefix to ether defines
Add 'RTE_' prefix to defines: - rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN. - rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN. - rename ETHER_CRC_LEN as RTE_ETHER_C
net: add rte prefix to ether defines
Add 'RTE_' prefix to defines: - rename ETHER_ADDR_LEN as RTE_ETHER_ADDR_LEN. - rename ETHER_TYPE_LEN as RTE_ETHER_TYPE_LEN. - rename ETHER_CRC_LEN as RTE_ETHER_CRC_LEN. - rename ETHER_HDR_LEN as RTE_ETHER_HDR_LEN. - rename ETHER_MIN_LEN as RTE_ETHER_MIN_LEN. - rename ETHER_MAX_LEN as RTE_ETHER_MAX_LEN. - rename ETHER_MTU as RTE_ETHER_MTU. - rename ETHER_MAX_VLAN_FRAME_LEN as RTE_ETHER_MAX_VLAN_FRAME_LEN. - rename ETHER_MAX_VLAN_ID as RTE_ETHER_MAX_VLAN_ID. - rename ETHER_MAX_JUMBO_FRAME_LEN as RTE_ETHER_MAX_JUMBO_FRAME_LEN. - rename ETHER_MIN_MTU as RTE_ETHER_MIN_MTU. - rename ETHER_LOCAL_ADMIN_ADDR as RTE_ETHER_LOCAL_ADMIN_ADDR. - rename ETHER_GROUP_ADDR as RTE_ETHER_GROUP_ADDR. - rename ETHER_TYPE_IPv4 as RTE_ETHER_TYPE_IPv4. - rename ETHER_TYPE_IPv6 as RTE_ETHER_TYPE_IPv6. - rename ETHER_TYPE_ARP as RTE_ETHER_TYPE_ARP. - rename ETHER_TYPE_VLAN as RTE_ETHER_TYPE_VLAN. - rename ETHER_TYPE_RARP as RTE_ETHER_TYPE_RARP. - rename ETHER_TYPE_QINQ as RTE_ETHER_TYPE_QINQ. - rename ETHER_TYPE_ETAG as RTE_ETHER_TYPE_ETAG. - rename ETHER_TYPE_1588 as RTE_ETHER_TYPE_1588. - rename ETHER_TYPE_SLOW as RTE_ETHER_TYPE_SLOW. - rename ETHER_TYPE_TEB as RTE_ETHER_TYPE_TEB. - rename ETHER_TYPE_LLDP as RTE_ETHER_TYPE_LLDP. - rename ETHER_TYPE_MPLS as RTE_ETHER_TYPE_MPLS. - rename ETHER_TYPE_MPLSM as RTE_ETHER_TYPE_MPLSM. - rename ETHER_VXLAN_HLEN as RTE_ETHER_VXLAN_HLEN. - rename ETHER_ADDR_FMT_SIZE as RTE_ETHER_ADDR_FMT_SIZE. - rename VXLAN_GPE_TYPE_IPV4 as RTE_VXLAN_GPE_TYPE_IPV4. - rename VXLAN_GPE_TYPE_IPV6 as RTE_VXLAN_GPE_TYPE_IPV6. - rename VXLAN_GPE_TYPE_ETH as RTE_VXLAN_GPE_TYPE_ETH. - rename VXLAN_GPE_TYPE_NSH as RTE_VXLAN_GPE_TYPE_NSH. - rename VXLAN_GPE_TYPE_MPLS as RTE_VXLAN_GPE_TYPE_MPLS. - rename VXLAN_GPE_TYPE_GBP as RTE_VXLAN_GPE_TYPE_GBP. - rename VXLAN_GPE_TYPE_VBNG as RTE_VXLAN_GPE_TYPE_VBNG. - rename ETHER_VXLAN_GPE_HLEN as RTE_ETHER_VXLAN_GPE_HLEN.
Do not update the command line library to avoid adding a dependency to librte_net.
Signed-off-by: Olivier Matz <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Reviewed-by: Ferruh Yigit <[email protected]>
show more ...
|
|
Revision tags: v19.05, v19.05-rc4, v19.05-rc3, v19.05-rc2, v19.05-rc1 |
|
| #
bad78b4b |
| 12-Mar-2019 |
Tiwei Bie <[email protected]> |
net/virtio-user: fix multiqueue with vhost kernel
The multiqueue support in virtio-user with vhost kernel backend is broken when tap name isn't specified by users explicitly, because the tap name re
net/virtio-user: fix multiqueue with vhost kernel
The multiqueue support in virtio-user with vhost kernel backend is broken when tap name isn't specified by users explicitly, because the tap name returned by ioctl(TUNSETIFF) isn't saved properly, and multiple tap interfaces will be created in this case. Fix this by saving the dynamically allocated tap name first before reusing the ifr structure. Besides, also make it possible to support the format string in tap name (e.g. foo%d) specified by users explicitly.
Fixes: 791b43e08842 ("net/virtio-user: specify MAC of the tap") Cc: [email protected]
Reported-by: Stephen Hemminger <[email protected]> Signed-off-by: Tiwei Bie <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]>
show more ...
|
|
Revision tags: v19.02, v19.02-rc4, v19.02-rc3, v19.02-rc2, v19.02-rc1, v18.11, v18.11-rc5, v18.11-rc4, v18.11-rc3, v18.11-rc2, v18.11-rc1 |
|
| #
1db4d233 |
| 29-Aug-2018 |
Eric Zhang <[email protected]> |
net/virtio-user: check negotiated features before set
This patch checks negotiated features to see if necessary to offload before set the tap device offload capabilities. It also checks if kernel su
net/virtio-user: check negotiated features before set
This patch checks negotiated features to see if necessary to offload before set the tap device offload capabilities. It also checks if kernel support the TUNSETOFFLOAD operation.
Fixes: 5e97e4202563 ("net/virtio-user: enable offloading") Cc: [email protected]
Signed-off-by: Eric Zhang <[email protected]> Reviewed-by: Tiwei Bie <[email protected]>
show more ...
|
|
Revision tags: v18.08, v18.08-rc3, v18.08-rc2, v18.08-rc1, v18.05, v18.05-rc6, v18.05-rc5, v18.05-rc4, v18.05-rc3, v18.05-rc2, v18.05-rc1, v18.02, v18.02-rc4, v18.02-rc3, v18.02-rc2, v18.02-rc1 |
|
| #
791b43e0 |
| 29-Dec-2017 |
Ning Li <[email protected]> |
net/virtio-user: specify MAC of the tap
When using virtio-user with vhost-kernel to exchange packet with kernel networking stack, application can set the MAC of the tap interface via parameter.
Sig
net/virtio-user: specify MAC of the tap
When using virtio-user with vhost-kernel to exchange packet with kernel networking stack, application can set the MAC of the tap interface via parameter.
Signed-off-by: Ning Li <[email protected]> Reviewed-by: Seán Harte <[email protected]> Tested-by: Seán Harte <[email protected]> Reviewed-by: Jianfeng Tan <[email protected]>
show more ...
|
| #
5566a3e3 |
| 19-Dec-2017 |
Bruce Richardson <[email protected]> |
drivers: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them.
Signed-off-by: Bruce Richardson <bruce.richardson@in
drivers: use SPDX tag for Intel copyright files
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them.
Signed-off-by: Bruce Richardson <[email protected]>
show more ...
|
|
Revision tags: v17.11, v17.11-rc4, v17.11-rc3, v17.11-rc2, v17.11-rc1 |
|
| #
907d125e |
| 19-Sep-2017 |
Sebastian Basierski <[email protected]> |
net/virtio-user: fix TAP name string termination
Fix calling strncpy with the a maximum size equal of destination array size.
Coverity issue: 140732 Fixes: e3b434818bbb ("net/virtio-user: support k
net/virtio-user: fix TAP name string termination
Fix calling strncpy with the a maximum size equal of destination array size.
Coverity issue: 140732 Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost") Cc: [email protected]
Signed-off-by: Sebastian Basierski <[email protected]> Acked-by: Jianfeng Tan <[email protected]> Acked-by: Yuanhan Liu <[email protected]>
show more ...
|
|
Revision tags: v17.08, v17.08-rc4, v17.08-rc3, v17.08-rc2, v17.08-rc1, v17.05, v17.05-rc4, v17.05-rc3, v17.05-rc2, v17.05-rc1, v17.02, v17.02-rc3, v17.02-rc2, v17.02-rc1 |
|
| #
be7a4707 |
| 13-Jan-2017 |
Jianfeng Tan <[email protected]> |
net/virtio-user: enable multiqueue with kernel vhost
With vhost kernel, to enable multiqueue, we need backend device in kernel support multiqueue feature. Specifically, with tap as the backend, as l
net/virtio-user: enable multiqueue with kernel vhost
With vhost kernel, to enable multiqueue, we need backend device in kernel support multiqueue feature. Specifically, with tap as the backend, as linux/Documentation/networking/tuntap.txt shows, we check if tap supports IFF_MULTI_QUEUE feature.
And for vhost kernel, each queue pair has a vhost fd, and with a tap fd binding this vhost fd. All tap fds are set with the same tap interface name.
Signed-off-by: Jianfeng Tan <[email protected]> Acked-by: Yuanhan Liu <[email protected]>
show more ...
|
| #
5e97e420 |
| 13-Jan-2017 |
Jianfeng Tan <[email protected]> |
net/virtio-user: enable offloading
When used with vhost kernel backend, we can offload at both directions. - From vhost kernel to virtio_user, the offload is enabled so that DPDK app can trust
net/virtio-user: enable offloading
When used with vhost kernel backend, we can offload at both directions. - From vhost kernel to virtio_user, the offload is enabled so that DPDK app can trust the flow is checksum-correct; and if DPDK app sends it through another port, the checksum needs to be recalculated or offloaded. It also applies to TSO. - From virtio_user to vhost_kernel, the offload is enabled so that kernel can trust the flow is L4-checksum-correct, no need to verify it; if kernel will consume it, DPDK app should make sure the l3-checksum is correctly set.
Signed-off-by: Jianfeng Tan <[email protected]> Acked-by: Yuanhan Liu <[email protected]>
show more ...
|
| #
e3b43481 |
| 13-Jan-2017 |
Jianfeng Tan <[email protected]> |
net/virtio-user: support kernel vhost
This patch add support vhost kernel as the backend for virtio_user. Three main hook functions are added: - vhost_kernel_setup() to open char device, each vq p
net/virtio-user: support kernel vhost
This patch add support vhost kernel as the backend for virtio_user. Three main hook functions are added: - vhost_kernel_setup() to open char device, each vq pair needs one vhostfd; - vhost_kernel_ioctl() to communicate control messages with vhost kernel module; - vhost_kernel_enable_queue_pair() to open tap device and set it as the backend of corresonding vhost fd (that is to say, vq pair).
Signed-off-by: Jianfeng Tan <[email protected]> Acked-by: Yuanhan Liu <[email protected]>
show more ...
|