RE: [PATCH v3] docs: update xenstore-migration.md

2020-05-29 Thread Ian Jackson
Paul Durrant writes ("RE: [PATCH v3] docs: update xenstore-migration.md"):
> > -Original Message-
> > From: Xen-devel  On Behalf Of 
> > Juergen Gross
> > Sent: 29 May 2020 12:37
> > To: xen-devel@lists.xenproject.org
> > Cc: Juergen Gross ; Stefano Stabellini 
> > ; Julien Grall
> > ; Wei Liu ; Andrew Cooper 
> > ; Ian Jackson
> > ; George Dunlap ; Jan 
> > Beulich 
> > Subject: [PATCH v3] docs: update xenstore-migration.md
> > 
> > Update connection record details:
> > 
> > - make flags common for sockets and domains (makes it easier to have a
> >   C union for conn-spec)
> > - add pending incoming data (needed for handling partially read
> >   requests when doing live update)
> > - add partial response length (needed for proper split to individual
> >   responses after live update)
> > 
> > Signed-off-by: Juergen Gross 
> 
> LGTM
> 
> Reviewed-by: Paul Durrant 

Thanks, committed.

Ian.



Re: [PATCH v3] docs: update xenstore-migration.md

2020-05-29 Thread Julien Grall

Hi,

On 29/05/2020 12:37, Juergen Gross wrote:

Update connection record details:

- make flags common for sockets and domains (makes it easier to have a
   C union for conn-spec)
- add pending incoming data (needed for handling partially read
   requests when doing live update)
- add partial response length (needed for proper split to individual
   responses after live update)

Signed-off-by: Juergen Gross 


Acked-by: Julien Grall 

Cheers,


---
V2:
- added out-resp-len to connection record

V3:
- better commit message (Julien Grall)
- same sequence for fields and detailed descriptions (Julien Grall)
- some wording corrected (Paul Durrant)

Signed-off-by: Juergen Gross 
---
  docs/designs/xenstore-migration.md | 72 +-
  1 file changed, 41 insertions(+), 31 deletions(-)

diff --git a/docs/designs/xenstore-migration.md 
b/docs/designs/xenstore-migration.md
index 34a2afd17e..2ce2c836f5 100644
--- a/docs/designs/xenstore-migration.md
+++ b/docs/designs/xenstore-migration.md
@@ -147,43 +147,60 @@ the domain being migrated.
  ```
  0   1   2   3   4   5   6   7octet
  +---+---+---+---+---+---+---+---+
-| 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
  ...
  ```
  
  
-| Field   | Description |

-|-|-|
-| `conn-id`   | A non-zero number used to identify this |
-| | connection in subsequent connection-specific|
-| | records |
-| | |
-| `conn-type` | 0x: shared ring |
-| | 0x0001: socket  |
-| | 0x0002 - 0x: 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  |
+||  |
+| `conn-type`| 0x: shared ring  |
+|| 0x0001: socket   |
+|| 0x0002 - 0x: reserved for future use |
+||  |
+| `flags`| A bit-wise OR of:|
+|| 0001: read-only  |
+||  |
+| `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|
+||  |
+| `out-data-len` | The length (in octets) of any pending data   |
+|| not yet written to the connection, including |
+|| a partial response (see `out-resp-len`)  |
+||  |
+| `data` | Pending data: first in-data-len octets of|
+|| read data, then out-data-len octets of   |
+|| written data (any of both may be empty)  |
  
-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 not yet 

RE: [PATCH v3] docs: update xenstore-migration.md

2020-05-29 Thread Paul Durrant
> -Original Message-
> From: Xen-devel  On Behalf Of Juergen 
> Gross
> Sent: 29 May 2020 12:37
> To: xen-devel@lists.xenproject.org
> Cc: Juergen Gross ; Stefano Stabellini 
> ; Julien Grall
> ; Wei Liu ; Andrew Cooper 
> ; Ian Jackson
> ; George Dunlap ; Jan 
> Beulich 
> Subject: [PATCH v3] docs: update xenstore-migration.md
> 
> Update connection record details:
> 
> - make flags common for sockets and domains (makes it easier to have a
>   C union for conn-spec)
> - add pending incoming data (needed for handling partially read
>   requests when doing live update)
> - add partial response length (needed for proper split to individual
>   responses after live update)
> 
> Signed-off-by: Juergen Gross 

LGTM

Reviewed-by: Paul Durrant 

> ---
> V2:
> - added out-resp-len to connection record
> 
> V3:
> - better commit message (Julien Grall)
> - same sequence for fields and detailed descriptions (Julien Grall)
> - some wording corrected (Paul Durrant)
> 
> Signed-off-by: Juergen Gross 
> ---
>  docs/designs/xenstore-migration.md | 72 +-
>  1 file changed, 41 insertions(+), 31 deletions(-)
> 
> diff --git a/docs/designs/xenstore-migration.md 
> b/docs/designs/xenstore-migration.md
> index 34a2afd17e..2ce2c836f5 100644
> --- a/docs/designs/xenstore-migration.md
> +++ b/docs/designs/xenstore-migration.md
> @@ -147,43 +147,60 @@ the domain being migrated.
>  ```
>  0   1   2   3   4   5   6   7octet
>  +---+---+---+---+---+---+---+---+
> -| 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
>  ...
>  ```
> 
> 
> -| Field   | Description |
> -|-|-|
> -| `conn-id`   | A non-zero number used to identify this |
> -| | connection in subsequent connection-specific|
> -| | records |
> -| | |
> -| `conn-type` | 0x: shared ring |
> -| | 0x0001: socket  |
> -| | 0x0002 - 0x: 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  |
> +||  |
> +| `conn-type`| 0x: shared ring  |
> +|| 0x0001: socket   |
> +|| 0x0002 - 0x: reserved for future use |
> +||  |
> +| `flags`| A bit-wise OR of:|
> +|| 0001: read-only  |
> +||  |
> +| `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 

[PATCH v3] docs: update xenstore-migration.md

2020-05-29 Thread Juergen Gross
Update connection record details:

- make flags common for sockets and domains (makes it easier to have a
  C union for conn-spec)
- add pending incoming data (needed for handling partially read
  requests when doing live update)
- add partial response length (needed for proper split to individual
  responses after live update)

Signed-off-by: Juergen Gross 
---
V2:
- added out-resp-len to connection record

V3:
- better commit message (Julien Grall)
- same sequence for fields and detailed descriptions (Julien Grall)
- some wording corrected (Paul Durrant)

Signed-off-by: Juergen Gross 
---
 docs/designs/xenstore-migration.md | 72 +-
 1 file changed, 41 insertions(+), 31 deletions(-)

diff --git a/docs/designs/xenstore-migration.md 
b/docs/designs/xenstore-migration.md
index 34a2afd17e..2ce2c836f5 100644
--- a/docs/designs/xenstore-migration.md
+++ b/docs/designs/xenstore-migration.md
@@ -147,43 +147,60 @@ the domain being migrated.
 ```
 0   1   2   3   4   5   6   7octet
 +---+---+---+---+---+---+---+---+
-| 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
 ...
 ```
 
 
-| Field   | Description |
-|-|-|
-| `conn-id`   | A non-zero number used to identify this |
-| | connection in subsequent connection-specific|
-| | records |
-| | |
-| `conn-type` | 0x: shared ring |
-| | 0x0001: socket  |
-| | 0x0002 - 0x: 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  |
+||  |
+| `conn-type`| 0x: shared ring  |
+|| 0x0001: socket   |
+|| 0x0002 - 0x: reserved for future use |
+||  |
+| `flags`| A bit-wise OR of:|
+|| 0001: read-only  |
+||  |
+| `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|
+||  |
+| `out-data-len` | The length (in octets) of any pending data   |
+|| not yet written to the connection, including |
+|| a partial response (see `out-resp-len`)  |
+||  |
+| `data` | Pending data: first in-data-len octets of|
+|| read data, then out-data-len octets of   |
+|| written data (any of both may be empty)  |
 
-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 not yet written data.
 
 \pagebreak
 
+The format of `conn-spec` is dependent upon `conn-type`.
+
 For `shared