From patchwork Fri Feb 26 11:16:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 387666 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp1108133jap; Fri, 26 Feb 2021 03:17:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKD8cIXJdN3d8J3hWcC2ssqaLs93akJDVGlbkl6YlgrHEyO+w3XroHjk4AIKwJnDRgzdyS X-Received: by 2002:a5e:cb4b:: with SMTP id h11mr2401137iok.108.1614338230636; Fri, 26 Feb 2021 03:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614338230; cv=none; d=google.com; s=arc-20160816; b=kgjg9LGzPQ8ebcdTE0Kk/5rwXFz6tPOao5iw1rVfWDkgscntq+gvyLKeDcBQ9Mas4I sQdyf++bwTj5aXduUubPOx47DDBzAq/Ut7DD7YKtFjTyIeUlG3Zmm0ZDEVF4SbOaGJ+k j8lrv+HMHRfpZGHrCTwnacDDz2cwjlSw8Gc5gkMpL+Vvtuc4zYbvqSU4yI/fwnw1p7y7 ErMlPzO2AYEJaxBqjfFXZrITV+a9jL/YW+NOQOzcplRDzqA049p+XPdFF1UVKbkaJSdt MhKmpsOy1OyUwY5JXkwN9+OE4J9xdDsgGcJbvojknfPZl7PzNzlmYpZ0jOPZ3t1Yn28y xgvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=HHzWegQAun95d3wCnNSfG6kUdobnsd8+Z9JBauUsPWo=; b=w2lcIdqOLdj+Vnf6Z6emoNxskIcS2/+VovWM2GLz7zNwikPxuERFw7G2B6Bs/ulzeD QxzWzfF1WrqhW48fAIDvaHtZk9JGyrkHYGt5hZEiNERllLqYWykQvEXyEXCJNDuiBRbD ETsMuGfCI3qJ8b/kbimKi8B3IjjsRN5dIF7YCHKpB1IaCxTjL0iGmu3/f0D/UxcaaFUT 502AMGzxm98SV8g1pP149eLdrJfl7GUtAwQN9s/eKk2RAcio8VQUAtfcMNybVv/Xa8tu 5y1vjJs9FwBEI0DXu5X9NgHKyPveZhhYUjJPwfRiYAVZXE7C0e4Lnsn5usIZwmp0qnMl +tsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=pmze6lv6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q206si6647783jaq.36.2021.02.26.03.17.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Feb 2021 03:17:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=pmze6lv6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFb7O-0004dd-3G for patch@linaro.org; Fri, 26 Feb 2021 06:17:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFb6q-0004dU-RI for qemu-devel@nongnu.org; Fri, 26 Feb 2021 06:16:36 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:51385) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFb6p-0002uN-2X for qemu-devel@nongnu.org; Fri, 26 Feb 2021 06:16:36 -0500 Received: by mail-wm1-x32b.google.com with SMTP id g11so3386018wmh.1 for ; Fri, 26 Feb 2021 03:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HHzWegQAun95d3wCnNSfG6kUdobnsd8+Z9JBauUsPWo=; b=pmze6lv6H/VulN5K2+XU2bsdRa7RnUi9ACXezq7BJoGRjC8rK01rh+LjpJ5CvuZlnU hNBe+sY6epcsWsg85b2MxeFrG7FwcWYpqbIE6UbrB37b90PDFPr+25Zd442evkxwQ33a yKYqS075/rRau5PLz6EVtpLt7OwrSIiwFA6Ogdc9Z5hst+vWPolr6e6iv1Z2ZtkSMQ/D ZszoE4ZAYvXv18Zb9JKgoFNciDcedAx7VVDMl/3uk5aHBBpS0dVRd1GrNZMw/s4SzGqQ V6laBYPNbL3zS8seLnXNJqe0GBamnfU73tXjP3HeP4IxLT4oiyh4Pp4WRNJ/F7iU8nUX kNBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HHzWegQAun95d3wCnNSfG6kUdobnsd8+Z9JBauUsPWo=; b=aszOYza2XP8fDt5MAed6cnVaaZYiDKToOBvONwFNSBUdiiCz/0JQ46Bswh44HHI04F dLuCD3nJFdJ9JerWDiI2UDIu79k4m2UCTCw+Nld7z5BAsPN+rDQ9sbY6CIvKcHbwzF78 VVTjabWhS/Tz/kZ3BxNCbCXZ0u3m26jD/edBVXCVYoVLiTDdKisDOkIhNw4/+TIUDPiJ 1Dre6Y1wU5ddzZL4Y2khLeeOv4J5rBUQddqehHi5psNlBy9nR7PhdHz41mFnrbpWR6kj pEkDf71ncioUeZuSVViaoYOLIX6SdfeH35UNXsa9P4HWDFzRG3cd29mnhozmVfCNaNA5 KXig== X-Gm-Message-State: AOAM532UZKQA8ev8HZxK8zVuR9qakqJndhYpJhdunp/+blQZY5LpUaUk celfIYzG/Z+S9Vww650T7Cu25w== X-Received: by 2002:a1c:1d14:: with SMTP id d20mr2381554wmd.36.1614338193426; Fri, 26 Feb 2021 03:16:33 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h22sm12574234wmb.36.2021.02.26.03.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Feb 2021 03:16:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 72F5E1FF7E; Fri, 26 Feb 2021 11:16:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org, rust-vmm@lists.opendev.org Subject: [VHOST USER SPEC PATCH] vhost-user.rst: add clarifying language about protocol negotiation Date: Fri, 26 Feb 2021 11:16:19 +0000 Message-Id: <20210226111619.21178-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: virtio-dev@lists.oasis-open.org, "Michael S. Tsirkin" , viresh.kumar@linaro.org, Jiang Liu , =?utf-8?q?Alex_Benn=C3=A9e?= , stratos-dev@op-lists.linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In practice the protocol negotiation between vhost master and slave occurs before the final feature negotiation between backend and frontend. This has lead to an inconsistency between the rust-vmm vhost implementation and the libvhost-user library in their approaches to checking if all the requirements for REPLY_ACK processing were met. As this is purely a function of the protocol negotiation and not of interest to the frontend lets make the language clearer about the requirements for a successfully negotiated protocol feature. Signed-off-by: Alex Bennée Cc: Jiang Liu --- docs/interop/vhost-user.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index d6085f7045..3ac221a8c7 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -301,12 +301,22 @@ If *slave* detects some error such as incompatible features, it may also close the connection. This should only happen in exceptional circumstances. Any protocol extensions are gated by protocol feature bits, which -allows full backwards compatibility on both master and slave. As -older slaves don't support negotiating protocol features, a feature +allows full backwards compatibility on both master and slave. As older +slaves don't support negotiating protocol features, a device feature bit was dedicated for this purpose:: #define VHOST_USER_F_PROTOCOL_FEATURES 30 +However as the protocol negotiation something that only occurs between +parts of the backend implementation it is permissible to for the master +to mask the feature bit from the guest. As noted for the +``VHOST_USER_GET_PROTOCOL_FEATURES`` and +``VHOST_USER_SET_PROTOCOL_FEATURES`` messages this occurs before a +final ``VHOST_USER_SET_FEATURES`` comes from the guest. So the +enabling of protocol features need only require the advertising of the +feature by the slave and the successful get/set protocol features +sequence. + Starting and stopping rings ---------------------------