Skip to contentSkip to conversation

vhost: remove async dma map status

PATCH Superseded Xuan Ding 2 participants 5 messages Oct 27, 2021 – Oct 30, 2021

lore
Share & tools
lore

Xuan Ding

author
#0 lore raw

PATCH 1/1 vhost: remove async dma map status

Async dma map status flag was added to prevent the unnecessary unmap when DMA devices bound to kernel driver. This brings maintenance cost for a lot of code. This patch removes the dma map status by using rte_errno instead.

This patch relies on the following patch to fix a partial unmap check in vfio unmaping API.
[1] https://www.mail-archive.com/[email protected]/msg226464.html

---
 lib/vhost/vhost.h      |  3 --
 lib/vhost/vhost_user.c | 70 ++++++++----------------------------------
 2 files changed, 13 insertions(+), 60 deletions(-)
lib/vhost/vhost.h +0 -3
index 6c6a2da2c9..71fddf3592 100644
@@ -370,9 +370,6 @@ struct virtio_net {
 	uint32_t		nr_vring;
 	int			async_copy;
 
-	/* Record the dma map status for each region. */
-	bool			*async_map_status;
-
 	int			extbuf;
 	int			linearbuf;
 	struct vhost_virtqueue	*virtqueue[VHOST_MAX_QUEUE_PAIRS * 2];
lib/vhost/vhost_user.c +13 -57

159 lines not on this page · raw message

Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 1/1 vhost: remove async dma map status

Async dma map status flag was added to prevent the unnecessary unmap when DMA devices bound to kernel driver. This brings maintenance cost for a lot of code. This patch removes the dma map status by using rte_errno instead.

This patch relies on the following patch to fix a partial unmap check in vfio unmapping API.
[1] https://www.mail-archive.com/[email protected]/msg226464.html

---
v2:
* Fix a typo in commit log.

---
 lib/vhost/vhost.h      |  3 --
 lib/vhost/vhost_user.c | 70 ++++++++----------------------------------
 2 files changed, 13 insertions(+), 60 deletions(-)
lib/vhost/vhost.h +0 -3
index 6c6a2da2c9..71fddf3592 100644
@@ -370,9 +370,6 @@ struct virtio_net {
 	uint32_t		nr_vring;
 	int			async_copy;
 
-	/* Record the dma map status for each region. */
-	bool			*async_map_status;
-
 	int			extbuf;
 	int			linearbuf;
 	struct vhost_virtqueue	*virtqueue[VHOST_MAX_QUEUE_PAIRS * 2];
lib/vhost/vhost_user.c +13 -57

159 lines not on this page · raw message

Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#2 lore raw
Quoted 11 lines · Xuan Ding

Async dma map status flag was added to prevent the unnecessary unmap when DMA devices bound to kernel driver. This brings maintenance cost for a lot of code. This patch removes the dma map status by using rte_errno instead.

This patch relies on the following patch to fix a partial unmap check in vfio unmapping API.
[1] https://www.mail-archive.com/[email protected]/msg226464.html

Quoted 9 lines

---
v2:
* Fix a typo in commit log.

---
  lib/vhost/vhost.h      |  3 --
  lib/vhost/vhost_user.c | 70 ++++++++----------------------------------
  2 files changed, 13 insertions(+), 60 deletions(-)

Thanks,
Maxime

#3 lore raw
In reply to Xuan Ding
Quoted 11 lines · Xuan Ding

Async dma map status flag was added to prevent the unnecessary unmap when DMA devices bound to kernel driver. This brings maintenance cost for a lot of code. This patch removes the dma map status by using rte_errno instead.

This patch relies on the following patch to fix a partial unmap check in vfio unmapping API.
[1] https://www.mail-archive.com/[email protected]/msg226464.html

Quoted 9 lines

---
v2:
* Fix a typo in commit log.

---
  lib/vhost/vhost.h      |  3 --
  lib/vhost/vhost_user.c | 70 ++++++++----------------------------------
  2 files changed, 13 insertions(+), 60 deletions(-)

Applied to dpdk-next-virtio/main with title fixed. Please run check-git-log script next time.

Thanks,
Maxime

author
#4 lore raw

Hi Maxime,

Quoted 34 lines

-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: Friday, October 29, 2021 6:36 PM
To: Ding, Xuan <[email protected]>; [email protected]; Xia, Chenbo <[email protected]>
Cc: Hu, Jiayu <[email protected]>; Burakov, Anatoly <[email protected]>
Subject: Re: [PATCH v2] vhost: remove async dma map status

Quoted 11 lines · Xuan Ding

Async dma map status flag was added to prevent the unnecessary unmap when DMA devices bound to kernel driver. This brings maintenance cost for a lot of code. This patch removes the dma map status by using rte_errno instead.

This patch relies on the following patch to fix a partial unmap check in vfio unmapping API.
[1] https://www.mail-archive.com/[email protected]/msg226464.html

Quoted 9 lines

---
v2:
* Fix a typo in commit log.

---
  lib/vhost/vhost.h      |  3 --
  lib/vhost/vhost_user.c | 70 ++++++++----------------------------------
  2 files changed, 13 insertions(+), 60 deletions(-)
Quoted 2 lines

Applied to dpdk-next-virtio/main with title fixed. Please run check-git-log script next time.

Thanks for your fix. I ran the script first but got no warning... I will be more careful to check the format next time.

BTW, should the CC be removed in the commit log?

Regards,
Xuan

Quoted 3 lines

Thanks,
Maxime