From nobody Sat May 18 23:55:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1590654178; cv=none; d=zohomail.com; s=zohoarc; b=lBf8zdZLbPav9iLTq0Vw9uoeRWlrbB460a2SD3OggRglNtbDytCjrjWm5CZO83eNjfaciyDZBBYpKGXNB/ko2K8ssvsS9PoBJwmdlX/NTebhfYzoZghHYY+uFni+jDXhJ12wgS/UhYBpYImsX0tGc+PwO0esV8SdTEgzWXrNtZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590654178; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=rtMyyv8I71a6lEP1hfwHtAL0fwImMjMlJp8gB+Ikw+s=; b=eh33xuC5sbnBdlcoP1Kj5iJ/oiiD5OlKb+wMjNPx/SG1GldBSC/fC4kr8R0ULzfMioTuAQE37YtcjM8rEo0HHPymhhOBtFMUObesJsv2el2FQVddORW+Ks5X9fyO01BekWcbmAeRH6bgL3e+JaDENdsjPz3MGskT7vOS4/YxLUE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1590654178860366.42842252827654; Thu, 28 May 2020 01:22:58 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeDnz-0006Hc-8A; Thu, 28 May 2020 08:22:23 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeDny-0006HX-Hd for xen-devel@lists.xenproject.org; Thu, 28 May 2020 08:22:22 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 59dcff30-a0bc-11ea-9947-bc764e2007e4; Thu, 28 May 2020 08:22:21 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 76405AF3E; Thu, 28 May 2020 08:22:22 +0000 (UTC) X-Inumbo-ID: 59dcff30-a0bc-11ea-9947-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Subject: [PATCH v2] docs: update xenstore-migration.md Date: Thu, 28 May 2020 10:22:17 +0200 Message-Id: <20200528082217.26057-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Update connection record details: make flags common for sockets and domains, and add pending incoming data. Signed-off-by: Juergen Gross --- V2: - added out-resp-len to connection record --- docs/designs/xenstore-migration.md | 71 +++++++++++++++++------------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/docs/designs/xenstore-migration.md b/docs/designs/xenstore-mig= ration.md index 34a2afd17e..5736bbad94 100644 --- a/docs/designs/xenstore-migration.md +++ b/docs/designs/xenstore-migration.md @@ -147,43 +147,59 @@ the domain being migrated. ``` 0 1 2 3 4 5 6 7 octet +-------+-------+-------+-------+-------+-------+-------+-------+ -| conn-id | conn-type | conn-spec +| conn-id | conn-type | flags | ++-------------------------------+---------------+---------------+ +| conn-spec ... -+-------------------------------+-------------------------------+ -| data-len | data -+-------------------------------+ ++---------------+---------------+-------------------------------+ +| in-data-len | out-resp-len | out-data-len | ++---------------+---------------+-------------------------------+ +| data ... ``` =20 =20 -| Field | Description | -|-------------|-------------------------------------------------| -| `conn-id` | A non-zero number used to identify this | -| | connection in subsequent connection-specific | -| | records | -| | | -| `conn-type` | 0x0000: shared ring | -| | 0x0001: socket | -| | 0x0002 - 0xFFFF: reserved for future use | -| | | -| `conn-spec` | See below | -| | | -| `data-len` | The length (in octets) of any pending data not | -| | yet written to the connection | -| | | -| `data` | Pending data (may be empty) | +| Field | Description | +|----------------|----------------------------------------------| +| `conn-id` | A non-zero number used to identify this | +| | connection in subsequent connection-specific | +| | records | +| | | +| `flags` | A bit-wise OR of: | +| | 0001: read-only | +| | | +| `conn-type` | 0x0000: shared ring | +| | 0x0001: socket | +| | 0x0002 - 0xFFFF: reserved for future use | +| | | +| `conn-spec` | See below | +| | | +| `in-data-len` | The length (in octets) of any data read | +| | from the connection not yet processed | +| | | +| `out-resp-len` | The length (in octets) of a partial response | +| | not yet written to the connection (included | +| | in the following `out-data-len`) | +| | | +| `out-data-len` | The length (in octets) of any pending data | +| | not yet written to the connection | +| | | +| `data` | Pending data, first read data, then written | +| | data (any of both may be empty) | =20 -The format of `conn-spec` is dependent upon `conn-type`. +In case of live update the connection record for the connection via which +the live update command was issued will contain the response for the live +update command in the pending write data. =20 \pagebreak =20 +The format of `conn-spec` is dependent upon `conn-type`. + For `shared ring` connections it is as follows: =20 =20 ``` 0 1 2 3 4 5 6 7 octet - +-------+-------+ - | flags | +---------------+---------------+---------------+---------------+ | domid | tdomid | evtchn | +-------------------------------+-------------------------------+ @@ -198,8 +214,6 @@ For `shared ring` connections it is as follows: | | it has been subject to an SET_TARGET | | | operation [2] or DOMID_INVALID [3] otherwise | | | | -| `flags` | Must be zero | -| | | | `evtchn` | The port number of the interdomain channel used | | | by `domid` to communicate with xenstored | | | | @@ -211,8 +225,6 @@ For `socket` connections it is as follows: =20 =20 ``` - +-------+-------+ - | flags | +---------------+---------------+---------------+---------------+ | socket-fd | pad | +-------------------------------+-------------------------------+ @@ -221,9 +233,6 @@ For `socket` connections it is as follows: =20 | Field | Description | |-------------|-------------------------------------------------| -| `flags` | A bit-wise OR of: | -| | 0001: read-only | -| | | | `socket-fd` | The file descriptor of the connected socket | =20 This type of connection is only relevant for live update, where the xensto= red @@ -398,4 +407,4 @@ explanation of node permissions. =20 [3] See https://xenbits.xen.org/gitweb/?p=3Dxen.git;a=3Dblob;f=3Dxen/inclu= de/public/xen.h;hb=3DHEAD#l612 =20 -[4] https://wiki.xen.org/wiki/XenBus \ No newline at end of file +[4] https://wiki.xen.org/wiki/XenBus --=20 2.26.2