From nobody Mon Feb 9 04:45:02 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677745792; cv=none; d=zohomail.com; s=zohoarc; b=QVBNu4RxwrpY9kfHBTrlPFboGo8ShajUnpg3agYXTexF5nANqwr4+5sSNocjIoeTFhoEl8xTaFOCu0x9Y4LxK1tG7HhKQPm6Ormc4CvaxiiuN5KBv2IGA1IS2e6rm8qHRMdxQeTyVr4V59lLb+ReRlMXaarjEphMYIWuam10e44= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677745792; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fXxj5h0qQ8uhuKbUYFn8UPh6HW6hOOdETJzf90gxJPU=; b=KSRsD8yvsguVyh5xJsn+GYnleR6mMD7Ad/tv+h9V0gAIOjxEV3B9s/xfgl33pYSboN+NcNsiiiu23qprL0WvbzUBkhgt6O7eyMo8MoATdjxNf1kKg+nFgMv+hWotR73tu6fe0LD4uMUt7aHAVt8fOIHESu+KCQfbhAfgMyCPRzE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677745792068235.2720781084397; Thu, 2 Mar 2023 00:29:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXeFr-0002x2-8F; Thu, 02 Mar 2023 03:25:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXeFn-0002ez-Oi for qemu-devel@nongnu.org; Thu, 02 Mar 2023 03:25:31 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXeFl-0002Hm-RE for qemu-devel@nongnu.org; Thu, 02 Mar 2023 03:25:31 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-154-FSCz492VMtWoV4hUn7VWLQ-1; Thu, 02 Mar 2023 03:25:28 -0500 Received: by mail-wm1-f71.google.com with SMTP id s18-20020a7bc392000000b003deaf780ab6so745460wmj.4 for ; Thu, 02 Mar 2023 00:25:28 -0800 (PST) Received: from redhat.com ([2.52.141.194]) by smtp.gmail.com with ESMTPSA id d16-20020adff850000000b002c55306f6edsm14480963wrq.54.2023.03.02.00.25.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 00:25:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677745529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fXxj5h0qQ8uhuKbUYFn8UPh6HW6hOOdETJzf90gxJPU=; b=B0QXzsp/H+AORS4UfDtdmLTdW5RL5+RXFiu3Z4hgspSaIWXu3hG2I0r4bH5LV8HNZ6qBZc zXGZRd6JEdtDhTEtUwmpjIAk9hpO9Pqay5AM98Wc4jsabyXD9yL8MeBGRGg3Z1CMKyGwWX 1Pt+GyKKWze4ciY98JyLzxp+hGbjF3Y= X-MC-Unique: FSCz492VMtWoV4hUn7VWLQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677745526; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fXxj5h0qQ8uhuKbUYFn8UPh6HW6hOOdETJzf90gxJPU=; b=ATH/antQYQocZPcKsffVGC5iIQekOSdSS8axEDfjtOss+sMkHJYwdZ0qJOiEFtHd27 BQRcdHK5yqZ17+LagdF9V9KSEkqCe4qfZpF6HgER70eJnCfbEsC/sazmicJiLoE0Oil8 i0vbjXvNl8oJm1MRuG4Cjy6mqbdiel3S0Yo5T/GiyXT3qI/B2m2wtkmCPpmq/X8tLJD8 r2E8Nnm3kcnyHMsg8dOiF/KyequrthZwgoTum/IUp7qEK2xu23MfsZtwGXTctv8QN0gN iZ6eax0hzBUwQ/gWXNjUv8IArodF6aFFeI3fINh/36Q+Neioi8vrI4Mcy5E6OzEo+WJI /wfw== X-Gm-Message-State: AO0yUKW8azT5KiIWRCd1CoCODCDNIPBkehIXM7Bnnmax7GXG0Jvd1pJj QT0DjJFRxhFsXm1RtkldhOESWkK9UjjS5u1ZY7LmSJ5bV5jw71UHvMjgivcoD6k1yLWB3W0MDNk BTzZEtw1cBIlvz7/STc/SEdB/4SDq4Hb8TmIu67/SI/pajxKau7D/8LXulMvisiDFZQ== X-Received: by 2002:a05:600c:1554:b0:3eb:38b0:e757 with SMTP id f20-20020a05600c155400b003eb38b0e757mr808080wmg.10.1677745526548; Thu, 02 Mar 2023 00:25:26 -0800 (PST) X-Google-Smtp-Source: AK7set8VdPLsZ+irPfrO8AhSnABQ0eilgA+gjXMwoVslHMUEO5pexyK1GvrRapR0swiZZZ4YVuqokg== X-Received: by 2002:a05:600c:1554:b0:3eb:38b0:e757 with SMTP id f20-20020a05600c155400b003eb38b0e757mr808069wmg.10.1677745526310; Thu, 02 Mar 2023 00:25:26 -0800 (PST) Date: Thu, 2 Mar 2023 03:25:23 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Maxime Coquelin , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Subject: [PULL 17/53] libvhost-user: Adopt new backend naming Message-ID: <20230302082343.560446-18-mst@redhat.com> References: <20230302082343.560446-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20230302082343.560446-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677745794203100007 From: Maxime Coquelin The Vhost-user specification changed feature and request naming from _SLAVE_ to _BACKEND_. This patch adopts the new naming convention. Signed-off-by: Maxime Coquelin Message-Id: <20230208203259.381326-3-maxime.coquelin@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- subprojects/libvhost-user/libvhost-user.h | 20 ++++++++++---------- subprojects/libvhost-user/libvhost-user.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.h b/subprojects/libvho= st-user/libvhost-user.h index 8cda9b8f57..8c5a2719e3 100644 --- a/subprojects/libvhost-user/libvhost-user.h +++ b/subprojects/libvhost-user/libvhost-user.h @@ -54,12 +54,12 @@ enum VhostUserProtocolFeature { VHOST_USER_PROTOCOL_F_RARP =3D 2, VHOST_USER_PROTOCOL_F_REPLY_ACK =3D 3, VHOST_USER_PROTOCOL_F_NET_MTU =3D 4, - VHOST_USER_PROTOCOL_F_SLAVE_REQ =3D 5, + VHOST_USER_PROTOCOL_F_BACKEND_REQ =3D 5, VHOST_USER_PROTOCOL_F_CROSS_ENDIAN =3D 6, VHOST_USER_PROTOCOL_F_CRYPTO_SESSION =3D 7, VHOST_USER_PROTOCOL_F_PAGEFAULT =3D 8, VHOST_USER_PROTOCOL_F_CONFIG =3D 9, - VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD =3D 10, + VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD =3D 10, VHOST_USER_PROTOCOL_F_HOST_NOTIFIER =3D 11, VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD =3D 12, VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS =3D 14, @@ -92,7 +92,7 @@ typedef enum VhostUserRequest { VHOST_USER_SET_VRING_ENABLE =3D 18, VHOST_USER_SEND_RARP =3D 19, VHOST_USER_NET_SET_MTU =3D 20, - VHOST_USER_SET_SLAVE_REQ_FD =3D 21, + VHOST_USER_SET_BACKEND_REQ_FD =3D 21, VHOST_USER_IOTLB_MSG =3D 22, VHOST_USER_SET_VRING_ENDIAN =3D 23, VHOST_USER_GET_CONFIG =3D 24, @@ -113,13 +113,13 @@ typedef enum VhostUserRequest { } VhostUserRequest; =20 typedef enum VhostUserSlaveRequest { - VHOST_USER_SLAVE_NONE =3D 0, - VHOST_USER_SLAVE_IOTLB_MSG =3D 1, - VHOST_USER_SLAVE_CONFIG_CHANGE_MSG =3D 2, - VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG =3D 3, - VHOST_USER_SLAVE_VRING_CALL =3D 4, - VHOST_USER_SLAVE_VRING_ERR =3D 5, - VHOST_USER_SLAVE_MAX + VHOST_USER_BACKEND_NONE =3D 0, + VHOST_USER_BACKEND_IOTLB_MSG =3D 1, + VHOST_USER_BACKEND_CONFIG_CHANGE_MSG =3D 2, + VHOST_USER_BACKEND_VRING_HOST_NOTIFIER_MSG =3D 3, + VHOST_USER_BACKEND_VRING_CALL =3D 4, + VHOST_USER_BACKEND_VRING_ERR =3D 5, + VHOST_USER_BACKEND_MAX } VhostUserSlaveRequest; =20 typedef struct VhostUserMemoryRegion { diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvho= st-user/libvhost-user.c index fc69783d2b..f661af7c85 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -140,7 +140,7 @@ vu_request_to_string(unsigned int req) REQ(VHOST_USER_SET_VRING_ENABLE), REQ(VHOST_USER_SEND_RARP), REQ(VHOST_USER_NET_SET_MTU), - REQ(VHOST_USER_SET_SLAVE_REQ_FD), + REQ(VHOST_USER_SET_BACKEND_REQ_FD), REQ(VHOST_USER_IOTLB_MSG), REQ(VHOST_USER_SET_VRING_ENDIAN), REQ(VHOST_USER_GET_CONFIG), @@ -1365,7 +1365,7 @@ bool vu_set_queue_host_notifier(VuDev *dev, VuVirtq *= vq, int fd, int qidx =3D vq - dev->vq; int fd_num =3D 0; VhostUserMsg vmsg =3D { - .request =3D VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG, + .request =3D VHOST_USER_BACKEND_VRING_HOST_NOTIFIER_MSG, .flags =3D VHOST_USER_VERSION | VHOST_USER_NEED_REPLY_MASK, .size =3D sizeof(vmsg.payload.area), .payload.area =3D { @@ -1383,7 +1383,7 @@ bool vu_set_queue_host_notifier(VuDev *dev, VuVirtq *= vq, int fd, =20 vmsg.fd_num =3D fd_num; =20 - if (!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD)= ) { + if (!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_BACKEND_SEND_F= D)) { return false; } =20 @@ -1461,9 +1461,9 @@ vu_get_protocol_features_exec(VuDev *dev, VhostUserMs= g *vmsg) */ uint64_t features =3D 1ULL << VHOST_USER_PROTOCOL_F_MQ | 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD | - 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ | + 1ULL << VHOST_USER_PROTOCOL_F_BACKEND_REQ | 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | - 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD | + 1ULL << VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD | 1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK | 1ULL << VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS; =20 @@ -1494,7 +1494,7 @@ vu_set_protocol_features_exec(VuDev *dev, VhostUserMs= g *vmsg) =20 if (vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS= ) && - (!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_SLAVE_REQ) || + (!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_BACKEND_REQ) = || !vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_REPLY_ACK))) { /* * The use case for using messages for kick/call is simulation, to= make @@ -1507,7 +1507,7 @@ vu_set_protocol_features_exec(VuDev *dev, VhostUserMs= g *vmsg) * that actually enables the simulation case. */ vu_panic(dev, - "F_IN_BAND_NOTIFICATIONS requires F_SLAVE_REQ && F_REPLY_= ACK"); + "F_IN_BAND_NOTIFICATIONS requires F_BACKEND_REQ && F_REPL= Y_ACK"); return false; } =20 @@ -1910,7 +1910,7 @@ vu_process_message(VuDev *dev, VhostUserMsg *vmsg) return vu_get_queue_num_exec(dev, vmsg); case VHOST_USER_SET_VRING_ENABLE: return vu_set_vring_enable_exec(dev, vmsg); - case VHOST_USER_SET_SLAVE_REQ_FD: + case VHOST_USER_SET_BACKEND_REQ_FD: return vu_set_slave_req_fd(dev, vmsg); case VHOST_USER_GET_CONFIG: return vu_get_config(dev, vmsg); @@ -2416,9 +2416,9 @@ static void _vu_queue_notify(VuDev *dev, VuVirtq *vq,= bool sync) if (vq->call_fd < 0 && vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS= ) && - vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_SLAVE_REQ)) { + vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_BACKEND_REQ)) { VhostUserMsg vmsg =3D { - .request =3D VHOST_USER_SLAVE_VRING_CALL, + .request =3D VHOST_USER_BACKEND_VRING_CALL, .flags =3D VHOST_USER_VERSION, .size =3D sizeof(vmsg.payload.state), .payload.state =3D { --=20 MST