| 6d7e741b | 16-Jan-2025 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: improve RARP handling in dequeue paths
With previous refactoring, we can now simplify the RARP packet injection handling in both the sync and async dequeue paths.
Signed-off-by: Maxime Coque
vhost: improve RARP handling in dequeue paths
With previous refactoring, we can now simplify the RARP packet injection handling in both the sync and async dequeue paths.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
show more ...
|
| 6ee0cf80 | 16-Jan-2025 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: rework dequeue paths error handling
This patch refactors the error handling in the Vhost dequeue paths to ease its maintenance and readability.
Suggested-by: David Marchand <david.marchand@r
vhost: rework dequeue paths error handling
This patch refactors the error handling in the Vhost dequeue paths to ease its maintenance and readability.
Suggested-by: David Marchand <david.marchand@redhat.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
show more ...
|
| 8b96508a | 16-Jan-2025 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: reset packets count when not ready
This patch fixes the rte_vhost_dequeue_burst return value when the virtqueue is not ready. Without it, a discrepancy between the packet array and its size i
vhost: reset packets count when not ready
This patch fixes the rte_vhost_dequeue_burst return value when the virtqueue is not ready. Without it, a discrepancy between the packet array and its size is faced by the caller of this API when the virtqueue is not ready.
Fixes: 9fc93a1e2320 ("vhost: fix virtqueue access check in datapath") Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Reviewed-by: Chenbo Xia <chenbox@nvidia.com>
show more ...
|
| 27429219 | 09-Jan-2025 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: fix log when setting max queue num
rte_vhost_driver_set_max_queue_num API returns early when called for a Vhost-user device, as this API is intended to limit the maximum number of queue pairs
vhost: fix log when setting max queue num
rte_vhost_driver_set_max_queue_num API returns early when called for a Vhost-user device, as this API is intended to limit the maximum number of queue pairs supported by VDUSE devices. However, a log mentioning the maximum number of queue pairs is being set is emitted unconditionally, which may confuse the end user.
This patch moves this log after the backend type is checked, so that it is only called with VDUSE backends. The check on the requested value is also moved at the same place.
Fixes: e1808999d36b ("vhost: restrict set max queue pair API to VDUSE") Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ilya Maximets <i.maximets@ovn.org> Reviewed-by: Chenbo Xia <chenbox@nvidia.com> Acked-by: Kevin Traynor <ktraynor@redhat.com>
show more ...
|
| 7023f3e5 | 20-Dec-2024 |
Yunjian Wang <wangyunjian@huawei.com> |
vhost: check GSO size validity
The value of tso_segsz cannot be 0, instead check that value of gso_size was set.
Fixes: d0cf91303d73 ("vhost: add Tx offload capabilities") Cc: stable@dpdk.org
Sign
vhost: check GSO size validity
The value of tso_segsz cannot be 0, instead check that value of gso_size was set.
Fixes: d0cf91303d73 ("vhost: add Tx offload capabilities") Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
| 4025e36f | 17-Nov-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
vhost: revert VDUSE uAPI header
The file vduse.h does not have a license that is compatible with current DPDK license policy.
This reverts commit b212c2fc2cd6 ("uapi: import VDUSE header") and co
vhost: revert VDUSE uAPI header
The file vduse.h does not have a license that is compatible with current DPDK license policy.
This reverts commit b212c2fc2cd6 ("uapi: import VDUSE header") and commit 9fec3f056908 ("vhost: use imported VDUSE uAPI header")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
| a2a05e55 | 24-Oct-2024 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: move VDUSE reconnection after device is created
This patch moves the VDUSE reconnection log mapping and setup after the Vhost device is created in order to simplify the device creation and it
vhost: move VDUSE reconnection after device is created
This patch moves the VDUSE reconnection log mapping and setup after the Vhost device is created in order to simplify the device creation and its error path.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| 69d2e256 | 24-Oct-2024 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: fix and refactor VDUSE reconnect log check
This patch fixes missing error handling in checking the reconnect log version, and takes the opportunity to move all the checks into a dedicated fun
vhost: fix and refactor VDUSE reconnect log check
This patch fixes missing error handling in checking the reconnect log version, and takes the opportunity to move all the checks into a dedicated function to simply VDUSE device creation code.
Fixes: da79cc7fda76 ("vhost: add reconnection support to VDUSE")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| 55977694 | 24-Oct-2024 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: refactor VDUSE reconnection log mapping
This patch moves the VDUSE reconnection log mapping, as well as creation if needed, into a dedicated function.
This is a preliminary rework to simplif
vhost: refactor VDUSE reconnection log mapping
This patch moves the VDUSE reconnection log mapping, as well as creation if needed, into a dedicated function.
This is a preliminary rework to simplify VDUSE device creation.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| 952e4945 | 24-Oct-2024 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: fix VDUSE reconnect device start
This patch fixes a FD leak in the VDUSE device reconnect code fails to start the device.
Also take the opportunity to refactor the related code into a dedica
vhost: fix VDUSE reconnect device start
This patch fixes a FD leak in the VDUSE device reconnect code fails to start the device.
Also take the opportunity to refactor the related code into a dedicated function.
Fixes: da79cc7fda76 ("vhost: add reconnection support to VDUSE")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| 29ab97dd | 24-Oct-2024 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: fix possible TOCTOU in VDUSE device creation
This patch fixes a possible TOCTOU on the VDUSE device chardev opening at device creation time.
Coverity issue: 445526 Fixes: da79cc7fda76 ("vhos
vhost: fix possible TOCTOU in VDUSE device creation
This patch fixes a possible TOCTOU on the VDUSE device chardev opening at device creation time.
Coverity issue: 445526 Fixes: da79cc7fda76 ("vhost: add reconnection support to VDUSE")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| e1808999 | 03-Oct-2024 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: restrict set max queue pair API to VDUSE
In order to avoid breaking Vhost-user live-migration, we want the rte_vhost_driver_set_max_queue_num API to only be effective with VDUSE.
Furthermore
vhost: restrict set max queue pair API to VDUSE
In order to avoid breaking Vhost-user live-migration, we want the rte_vhost_driver_set_max_queue_num API to only be effective with VDUSE.
Furthermore, this API is only really needed for VDUSE where the device number of queues is defined by the backend. For Vhost-user, this is defined by the frontend (e.g. QEMU), so the advantages of restricting more the maximum number of queue pairs is limited to a small memory gain (a handful of pointers).
Fixes: 4aa1f88ac13d ("vhost: add API to set max queue pairs") Cc: stable@dpdk.org
Reported-by: Yu Jiang <yux.jiang@intel.com> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| da79cc7f | 23-Sep-2024 |
Maxime Coquelin <maxime.coquelin@redhat.com> |
vhost: add reconnection support to VDUSE
This patch enables VDUSE reconnection support making use of the newly introduced reconnection mechanism in Vhost library.
At DPDK VDUSE device creation time
vhost: add reconnection support to VDUSE
This patch enables VDUSE reconnection support making use of the newly introduced reconnection mechanism in Vhost library.
At DPDK VDUSE device creation time, there are two possibilities: 1. The Kernel VDUSE device does not exist: a. A reconnection file named after the VDUSE device name is created in VDUSE tmpfs. b. The file is truncated to 'struct vhost_reconnect_data' size, and mmapped. c. Negotiated features, Virtio status... are saved for sanity checks at reconnect time. 2. The Kernel VDUSE device already exists: a. Exit with failure if no reconnect file exists for this device. b. Open and mmap the reconnect file. c. Perform sanity check to ensure features are compatible. d. Restore virtqueues' available indexes at startup time.
Then at runtime, the virtqueues' available index are logged by the Vhost reconnection mechanism.
At DPDK VDUSE device destruction time, there are two possibilities: 1. The Kernel VDUSE device destruction succeeded, which means it is no more attached to the vDPA bus. The reconnection file is unmapped and then removed. 2. The Kernel VDUSE device destruction failed, meaning it is no more attached to the vDPA bus. The reconnection file is unmapped but not removed to make possible later reconnection.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Chenbo Xia <chenbox@nvidia.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|