qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] vhost-user: Skip unnecessary duplicated VHOST_USER_ADD/REM_MEM_REG requests
@ 2023-01-01 21:45 Minghao Yuan
  2023-01-17 14:56 ` Raphael Norwitz
  0 siblings, 1 reply; 4+ messages in thread
From: Minghao Yuan @ 2023-01-01 21:45 UTC (permalink / raw)
  To: raphael.norwitz, swapnil.ingle, peter.turschm; +Cc: mst, qemu-devel

The VHOST_USER_ADD/REM_MEM_REG requests should be categorized into
non-vring specific messages, and should be sent only once.

Signed-off-by: Minghao Yuan <yuanmh12@chinatelecom.cn>
---
 configure              | 2 +-
 hw/virtio/vhost-user.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 9e407ce2e3..8b4deca342 100755
--- a/configure
+++ b/configure
@@ -1147,7 +1147,7 @@ cat > $TMPC << EOF
 #  endif
 # endif
 #elif defined(__GNUC__) && defined(__GNUC_MINOR__)
-# if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 4)
+# if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 3)
 #  error You need at least GCC v7.4.0 to compile QEMU
 # endif
 #else
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index d9ce0501b2..3f2a8c3bdd 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -459,6 +459,8 @@ static bool vhost_user_one_time_request(VhostUserRequest request)
     case VHOST_USER_SET_MEM_TABLE:
     case VHOST_USER_GET_QUEUE_NUM:
     case VHOST_USER_NET_SET_MTU:
+    case VHOST_USER_ADD_MEM_REG:
+    case VHOST_USER_REM_MEM_REG:
         return true;
     default:
         return false;
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH 1/1] vhost-user: Skip unnecessary duplicated VHOST_USER_ADD/REM_MEM_REG requests
@ 2023-01-23 12:21 Minghao Yuan
  0 siblings, 0 replies; 4+ messages in thread
From: Minghao Yuan @ 2023-01-23 12:21 UTC (permalink / raw)
  To: raphael.norwitz, swapnil.ingle, peter.turschm; +Cc: mst, qemu-devel

The VHOST_USER_ADD/REM_MEM_REG requests should be categorized into
non-vring specific messages, and should be sent only once.

Signed-off-by: Minghao Yuan <yuanmh12@chinatelecom.cn>
---
 hw/virtio/vhost-user.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index d9ce0501b2..3f2a8c3bdd 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -459,6 +459,8 @@ static bool vhost_user_one_time_request(VhostUserRequest request)
     case VHOST_USER_SET_MEM_TABLE:
     case VHOST_USER_GET_QUEUE_NUM:
     case VHOST_USER_NET_SET_MTU:
+    case VHOST_USER_ADD_MEM_REG:
+    case VHOST_USER_REM_MEM_REG:
         return true;
     default:
         return false;
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-27 13:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-01 21:45 [PATCH 1/1] vhost-user: Skip unnecessary duplicated VHOST_USER_ADD/REM_MEM_REG requests Minghao Yuan
2023-01-17 14:56 ` Raphael Norwitz
2023-01-27 13:33   ` Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2023-01-23 12:21 Minghao Yuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).