[dpdk-dev] [dpdk-stable] [PATCH v5] net/virtio-user: fix packed ring server mode

Ferruh Yigit ferruh.yigit at intel.com
Wed Jan 15 16:40:40 CET 2020


On 1/15/2020 11:16 AM, Maxime Coquelin wrote:
> 
> 
> On 1/15/20 7:13 AM, Xuan Ding wrote:
>> This patch fixes the situation where data path does not work properly when
>> vhost reconnects to virtio in server mode with packed ring.
>>
>> Currently, virtio and vhost share memory of vring. For split ring, vhost
>> can read the status of descriptors directly from the available ring and
>> the used ring during reconnection. Therefore, the data path can continue.
>>
>> But for packed ring, when reconnecting to virtio, vhost cannot get the
>> status of descriptors via the descriptor ring. By resetting Tx
>> and Rx queues, the data path can restart from the beginning.
>>
>> Fixes: 4c3f5822eb214 ("net/virtio: add packed virtqueue defines")
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Xuan Ding <xuan.ding at intel.com>
>> ---
>>
>> v5:
>> * Fixed two spelling mistakes in the commit log.
>> * Added notice message when resetting vring.
>>
>> v4:
>> * Moved change log below '---' marker.
>>
>> v3:
>> * Removed an extra asterisk from a comment.
>> * Renamed device reset function and moved it to virtio_user_ethdev.c.
>>
>> v2:
>> * Renamed queue reset functions and moved them to virtqueue.c.
>> ---
>>  drivers/net/virtio/virtio_ethdev.c      |  4 +-
>>  drivers/net/virtio/virtio_user_ethdev.c | 42 +++++++++++++++
>>  drivers/net/virtio/virtqueue.c          | 71 +++++++++++++++++++++++++
>>  drivers/net/virtio/virtqueue.h          |  4 ++
>>  4 files changed, 119 insertions(+), 2 deletions(-)
> 
> Applied to dpdk-next-virtio/master
> 

This was causing build error [1] on cross compilation [2], I am fixing it while
merging [3], please double check in next-net.

[1]
.../drivers/net/virtio/virtio_user_ethdev.c:44:2: error: implicit declaration of
function ‘rte_delay_ms’; did you mean ‘rte_realloc’?
[-Werror=implicit-function-declaration]

  rte_delay_ms(1);


[2]
CROSS=/opt/aarch64/bin/aarch64-buildroot-linux-gnu- make -j64


[3]
diff --git a/drivers/net/virtio/virtio_user_ethdev.c
b/drivers/net/virtio/virtio_user_ethdev.c
index 9c9d3407f..f3b35d1bd 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -13,6 +13,7 @@
 #include <rte_ethdev_vdev.h>
 #include <rte_bus_vdev.h>
 #include <rte_alarm.h>
+#include <rte_cycles.h>

 #include "virtio_ethdev.h"
 #include "virtio_logs.h"


More information about the dev mailing list