vhost-user: handle message to enable vring
[dpdk.git] / lib / librte_vhost / vhost_user / vhost-net-user.c
index 8675cd4..f681676 100644 (file)
@@ -99,6 +99,7 @@ static const char *vhost_message_str[VHOST_USER_MAX] = {
        [VHOST_USER_GET_PROTOCOL_FEATURES]  = "VHOST_USER_GET_PROTOCOL_FEATURES",
        [VHOST_USER_SET_PROTOCOL_FEATURES]  = "VHOST_USER_SET_PROTOCOL_FEATURES",
        [VHOST_USER_GET_QUEUE_NUM]  = "VHOST_USER_GET_QUEUE_NUM",
+       [VHOST_USER_SET_VRING_ENABLE]  = "VHOST_USER_SET_VRING_ENABLE",
 };
 
 /**
@@ -428,6 +429,10 @@ vserver_message_handler(int connfd, void *dat, int *remove)
                send_vhost_message(connfd, &msg);
                break;
 
+       case VHOST_USER_SET_VRING_ENABLE:
+               user_set_vring_enable(ctx, &msg.payload.state);
+               break;
+
        default:
                break;