All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-spec: Document VIRTIO_BLK_T_GET_ID.
@ 2012-12-12 13:11 Alexey Zaytsev
  2012-12-14 10:23 ` Stefan Hajnoczi
  0 siblings, 1 reply; 7+ messages in thread
From: Alexey Zaytsev @ 2012-12-12 13:11 UTC (permalink / raw)
  To: virtualization

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
---

Hi.

This feature has been around for a couple of years, probably time to document it.
Lyx cleaned up some lines I did not touch, is this ok?

 virtio-spec.lyx |   73 ++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 56 insertions(+), 17 deletions(-)

diff --git a/virtio-spec.lyx b/virtio-spec.lyx
index 6c09180..3fe3d0f 100644
--- a/virtio-spec.lyx
+++ b/virtio-spec.lyx
@@ -59,6 +59,7 @@
 \author -608949062 "Rusty Russell,,," 
 \author -385801441 "Cornelia Huck" cornelia.huck@de.ibm.com
 \author 1531152142 "Paolo Bonzini,,," 
+\author 1717892615 "Alexey Zaytsev,,," 
 \author 1986246365 "Michael S. Tsirkin" 
 \end_header
 
@@ -4570,14 +4571,14 @@ status
 
 \change_inserted 1986246365 1354531717
 Only receiveq0, transmitq0 and controlq are used by default.
- To use more queues driver must negotiate the VIRTIO_NET_F_MQ feature;
- initialize up to 
+ To use more queues driver must negotiate the VIRTIO_NET_F_MQ feature; initializ
+e up to 
 \emph on
 max_virtqueue_pairs
 \emph default
- of each of transmit and receive queues; execute_VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SE
-T command specifying the number of the transmit and receive queues that
- is going to be used and wait until the device consumes the controlq buffer
+ of each of transmit and receive queues; execute_VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET
+ command specifying the number of the transmit and receive queues that is
+ going to be used and wait until the device consumes the controlq buffer
  and acks this command.
 \change_unchanged
 
@@ -5008,8 +5009,8 @@ struct virtio_net_hdr
 \begin_layout Standard
 
 \change_inserted 1986246365 1353594638
-If VIRTIO_NET_F_MQ is negotiated, each of receiveq0...receiveqN that will
- be used should be populated with receive buffers.
+If VIRTIO_NET_F_MQ is negotiated, each of receiveq0...receiveqN that will be
+ used should be populated with receive buffers.
 \change_unchanged
 
 \end_layout
@@ -5453,9 +5454,9 @@ Automatic receive steering in multiqueue mode
 \begin_layout Standard
 
 \change_inserted 1986246365 1354528882
-If the driver negotiates the VIRTIO_NET_F_MQ feature bit (depends on VIRTIO_NET
-_F_CTRL_VQ), it can transmit outgoing packets on one of the multiple transmitq0..t
-ransmitqN and ask the device to queue incoming packets into one the multiple
+If the driver negotiates the VIRTIO_NET_F_MQ feature bit (depends on VIRTIO_NET_
+F_CTRL_VQ), it can transmit outgoing packets on one of the multiple transmitq0..tr
+ansmitqN and ask the device to queue incoming packets into one the multiple
  receiveq0..receiveqN depending on the packet flow.
 \change_unchanged
 
@@ -5532,9 +5533,9 @@ struct virtio_net_ctrl_mq {
 
 \change_inserted 1986246365 1354531492
 Multiqueue is disabled by default.
- Driver enables multiqueue by executing the VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command,
- specifying the number of the transmit and receive queues that will be used;
- thus transmitq0..transmitqn and receiveq0..receiveqn where 
+ Driver enables multiqueue by executing the VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET
+ command, specifying the number of the transmit and receive queues that
+ will be used; thus transmitq0..transmitqn and receiveq0..receiveqn where 
 \emph on
 n=virtqueue_pairs-1
 \emph default
@@ -5554,9 +5555,8 @@ max_virtqueue_pairs
 \begin_layout Standard
 
 \change_inserted 1986246365 1353595328
-When multiqueue is enabled, device uses automatic receive
-steering based on packet flow.
-Programming of the receive steering classificator is implicit.
+When multiqueue is enabled, device uses automatic receivesteering based
+ on packet flow.Programming of the receive steering classificator is implicit.
  Transmitting a packet of a specific flow on transmitqX will cause incoming
  packets for this flow to be steered to receiveqX.
  For uni-directional protocols, or where no packets have been transmitted
@@ -6162,7 +6162,11 @@ the SCSI_CMD and SCSI_CMD_OUT types are equivalent, the device does not
 
 \end_inset
 
-) or a flush (VIRTIO_BLK_T_FLUSH or VIRTIO_BLK_T_FLUSH_OUT
+)
+\change_inserted 1717892615 1355313186
+, device ID (serial number) inquiry (VIRTIO_BLK_T_GET_ID)
+\change_unchanged
+ or a flush (VIRTIO_BLK_T_FLUSH or VIRTIO_BLK_T_FLUSH_OUT
 \begin_inset Foot
 status open
 
@@ -6193,6 +6197,19 @@ status open
 
 \begin_layout Plain Layout
 
+\change_inserted 1717892615 1355312081
+
+#define VIRTIO_BLK_ID_BYTES       20
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted 1717892615 1355310507
+
+\end_layout
+
+\begin_layout Plain Layout
+
 #define VIRTIO_BLK_T_IN           0
 \end_layout
 
@@ -6219,6 +6236,17 @@ status open
 \begin_layout Plain Layout
 
 #define VIRTIO_BLK_T_FLUSH_OUT    5
+\change_inserted 1717892615 1355310422
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted 1717892615 1355310087
+
+#define VIRTIO_BLK_T_GET_ID       8
+\change_unchanged
+
 \end_layout
 
 \begin_layout Plain Layout
@@ -6348,6 +6376,17 @@ status open
 \end_layout
 
 \begin_layout Standard
+
+\change_inserted 1717892615 1355312551
+When VIRTIO_BLK_T_GET_ID is issued, the device identifier, up to 20 bytes,
+ is written to the buffer.
+ The identifier should be interpreted as an ascii string.
+ It is terminated with 
+\backslash
+0, unless it is exactly 20 bytes long.
+\end_layout
+
+\begin_layout Standard
 Historically, devices assumed that the fields 
 \emph on
 type
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] virtio-spec: Document VIRTIO_BLK_T_GET_ID.
  2012-12-12 13:11 [PATCH] virtio-spec: Document VIRTIO_BLK_T_GET_ID Alexey Zaytsev
@ 2012-12-14 10:23 ` Stefan Hajnoczi
  2012-12-15 21:32   ` [PATCH 1/2] Auto-fix lines after 67023431 Alexey Zaytsev
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-12-14 10:23 UTC (permalink / raw)
  To: Alexey Zaytsev; +Cc: Linux Virtualization

On Wed, Dec 12, 2012 at 2:11 PM, Alexey Zaytsev
<alexey.zaytsev@gmail.com> wrote:
> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
> ---
>
> Hi.
>
> This feature has been around for a couple of years, probably time to document it.
> Lyx cleaned up some lines I did not touch, is this ok?

Please manually remove those hunks from the patch.  If Lyx will do
this every time it edits the file then these line break changes can be
done in a separate commit just to clean up the Lyx source.

>  virtio-spec.lyx |   73 ++++++++++++++++++++++++++++++++++++++++++-------------
>  1 file changed, 56 insertions(+), 17 deletions(-)

Otherwise looks good.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] Auto-fix lines after 67023431
  2012-12-14 10:23 ` Stefan Hajnoczi
@ 2012-12-15 21:32   ` Alexey Zaytsev
  2012-12-15 21:32     ` [PATCH 2/2] Document VIRTIO_BLK_T_GET_ID Alexey Zaytsev
  2012-12-17  8:45     ` [PATCH 1/2] Auto-fix lines after 67023431 Stefan Hajnoczi
  0 siblings, 2 replies; 7+ messages in thread
From: Alexey Zaytsev @ 2012-12-15 21:32 UTC (permalink / raw)
  To: Linux Virtualization; +Cc: Michael S. Tsirkin

Looks like commit 67023431 was partially hand-edited, so lyx changes some
lines automatically.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>

---
 virtio-spec.lyx |   31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/virtio-spec.lyx b/virtio-spec.lyx
index 6c09180..a20aa77 100644
--- a/virtio-spec.lyx
+++ b/virtio-spec.lyx
@@ -4570,14 +4570,14 @@ status
 
 \change_inserted 1986246365 1354531717
 Only receiveq0, transmitq0 and controlq are used by default.
- To use more queues driver must negotiate the VIRTIO_NET_F_MQ feature;
- initialize up to 
+ To use more queues driver must negotiate the VIRTIO_NET_F_MQ feature; initializ
+e up to 
 \emph on
 max_virtqueue_pairs
 \emph default
- of each of transmit and receive queues; execute_VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SE
-T command specifying the number of the transmit and receive queues that
- is going to be used and wait until the device consumes the controlq buffer
+ of each of transmit and receive queues; execute_VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET
+ command specifying the number of the transmit and receive queues that is
+ going to be used and wait until the device consumes the controlq buffer
  and acks this command.
 \change_unchanged
 
@@ -5008,8 +5008,8 @@ struct virtio_net_hdr
 \begin_layout Standard
 
 \change_inserted 1986246365 1353594638
-If VIRTIO_NET_F_MQ is negotiated, each of receiveq0...receiveqN that will
- be used should be populated with receive buffers.
+If VIRTIO_NET_F_MQ is negotiated, each of receiveq0...receiveqN that will be
+ used should be populated with receive buffers.
 \change_unchanged
 
 \end_layout
@@ -5453,9 +5453,9 @@ Automatic receive steering in multiqueue mode
 \begin_layout Standard
 
 \change_inserted 1986246365 1354528882
-If the driver negotiates the VIRTIO_NET_F_MQ feature bit (depends on VIRTIO_NET
-_F_CTRL_VQ), it can transmit outgoing packets on one of the multiple transmitq0..t
-ransmitqN and ask the device to queue incoming packets into one the multiple
+If the driver negotiates the VIRTIO_NET_F_MQ feature bit (depends on VIRTIO_NET_
+F_CTRL_VQ), it can transmit outgoing packets on one of the multiple transmitq0..tr
+ansmitqN and ask the device to queue incoming packets into one the multiple
  receiveq0..receiveqN depending on the packet flow.
 \change_unchanged
 
@@ -5532,9 +5532,9 @@ struct virtio_net_ctrl_mq {
 
 \change_inserted 1986246365 1354531492
 Multiqueue is disabled by default.
- Driver enables multiqueue by executing the VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command,
- specifying the number of the transmit and receive queues that will be used;
- thus transmitq0..transmitqn and receiveq0..receiveqn where 
+ Driver enables multiqueue by executing the VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET
+ command, specifying the number of the transmit and receive queues that
+ will be used; thus transmitq0..transmitqn and receiveq0..receiveqn where 
 \emph on
 n=virtqueue_pairs-1
 \emph default
@@ -5554,9 +5554,8 @@ max_virtqueue_pairs
 \begin_layout Standard
 
 \change_inserted 1986246365 1353595328
-When multiqueue is enabled, device uses automatic receive
-steering based on packet flow.
-Programming of the receive steering classificator is implicit.
+When multiqueue is enabled, device uses automatic receivesteering based
+ on packet flow.Programming of the receive steering classificator is implicit.
  Transmitting a packet of a specific flow on transmitqX will cause incoming
  packets for this flow to be steered to receiveqX.
  For uni-directional protocols, or where no packets have been transmitted
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] Document VIRTIO_BLK_T_GET_ID
  2012-12-15 21:32   ` [PATCH 1/2] Auto-fix lines after 67023431 Alexey Zaytsev
@ 2012-12-15 21:32     ` Alexey Zaytsev
  2012-12-17  8:45       ` Stefan Hajnoczi
  2013-01-02  4:49       ` Rusty Russell
  2012-12-17  8:45     ` [PATCH 1/2] Auto-fix lines after 67023431 Stefan Hajnoczi
  1 sibling, 2 replies; 7+ messages in thread
From: Alexey Zaytsev @ 2012-12-15 21:32 UTC (permalink / raw)
  To: Linux Virtualization; +Cc: Michael S. Tsirkin

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 virtio-spec.lyx |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/virtio-spec.lyx b/virtio-spec.lyx
index a20aa77..3fe3d0f 100644
--- a/virtio-spec.lyx
+++ b/virtio-spec.lyx
@@ -59,6 +59,7 @@
 \author -608949062 "Rusty Russell,,," 
 \author -385801441 "Cornelia Huck" cornelia.huck@de.ibm.com
 \author 1531152142 "Paolo Bonzini,,," 
+\author 1717892615 "Alexey Zaytsev,,," 
 \author 1986246365 "Michael S. Tsirkin" 
 \end_header
 
@@ -6161,7 +6162,11 @@ the SCSI_CMD and SCSI_CMD_OUT types are equivalent, the device does not
 
 \end_inset
 
-) or a flush (VIRTIO_BLK_T_FLUSH or VIRTIO_BLK_T_FLUSH_OUT
+)
+\change_inserted 1717892615 1355313186
+, device ID (serial number) inquiry (VIRTIO_BLK_T_GET_ID)
+\change_unchanged
+ or a flush (VIRTIO_BLK_T_FLUSH or VIRTIO_BLK_T_FLUSH_OUT
 \begin_inset Foot
 status open
 
@@ -6192,6 +6197,19 @@ status open
 
 \begin_layout Plain Layout
 
+\change_inserted 1717892615 1355312081
+
+#define VIRTIO_BLK_ID_BYTES       20
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted 1717892615 1355310507
+
+\end_layout
+
+\begin_layout Plain Layout
+
 #define VIRTIO_BLK_T_IN           0
 \end_layout
 
@@ -6218,6 +6236,17 @@ status open
 \begin_layout Plain Layout
 
 #define VIRTIO_BLK_T_FLUSH_OUT    5
+\change_inserted 1717892615 1355310422
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\change_inserted 1717892615 1355310087
+
+#define VIRTIO_BLK_T_GET_ID       8
+\change_unchanged
+
 \end_layout
 
 \begin_layout Plain Layout
@@ -6347,6 +6376,17 @@ status open
 \end_layout
 
 \begin_layout Standard
+
+\change_inserted 1717892615 1355312551
+When VIRTIO_BLK_T_GET_ID is issued, the device identifier, up to 20 bytes,
+ is written to the buffer.
+ The identifier should be interpreted as an ascii string.
+ It is terminated with 
+\backslash
+0, unless it is exactly 20 bytes long.
+\end_layout
+
+\begin_layout Standard
 Historically, devices assumed that the fields 
 \emph on
 type
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Auto-fix lines after 67023431
  2012-12-15 21:32   ` [PATCH 1/2] Auto-fix lines after 67023431 Alexey Zaytsev
  2012-12-15 21:32     ` [PATCH 2/2] Document VIRTIO_BLK_T_GET_ID Alexey Zaytsev
@ 2012-12-17  8:45     ` Stefan Hajnoczi
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-12-17  8:45 UTC (permalink / raw)
  To: Alexey Zaytsev; +Cc: Michael S. Tsirkin, Linux Virtualization

On Sat, Dec 15, 2012 at 10:32 PM, Alexey Zaytsev
<alexey.zaytsev@gmail.com> wrote:
> Looks like commit 67023431 was partially hand-edited, so lyx changes some
> lines automatically.
>
> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
>
> ---
>  virtio-spec.lyx |   31 +++++++++++++++----------------
>  1 file changed, 15 insertions(+), 16 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] Document VIRTIO_BLK_T_GET_ID
  2012-12-15 21:32     ` [PATCH 2/2] Document VIRTIO_BLK_T_GET_ID Alexey Zaytsev
@ 2012-12-17  8:45       ` Stefan Hajnoczi
  2013-01-02  4:49       ` Rusty Russell
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-12-17  8:45 UTC (permalink / raw)
  To: Alexey Zaytsev; +Cc: Michael S. Tsirkin, Linux Virtualization

On Sat, Dec 15, 2012 at 10:32 PM, Alexey Zaytsev
<alexey.zaytsev@gmail.com> wrote:
> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  virtio-spec.lyx |   42 +++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 41 insertions(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] Document VIRTIO_BLK_T_GET_ID
  2012-12-15 21:32     ` [PATCH 2/2] Document VIRTIO_BLK_T_GET_ID Alexey Zaytsev
  2012-12-17  8:45       ` Stefan Hajnoczi
@ 2013-01-02  4:49       ` Rusty Russell
  1 sibling, 0 replies; 7+ messages in thread
From: Rusty Russell @ 2013-01-02  4:49 UTC (permalink / raw)
  To: Alexey Zaytsev, Linux Virtualization; +Cc: Michael S. Tsirkin

Alexey Zaytsev <alexey.zaytsev@gmail.com> writes:
> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

Thanks, applied.

Cheers,
Rusty.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-01-02  4:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-12 13:11 [PATCH] virtio-spec: Document VIRTIO_BLK_T_GET_ID Alexey Zaytsev
2012-12-14 10:23 ` Stefan Hajnoczi
2012-12-15 21:32   ` [PATCH 1/2] Auto-fix lines after 67023431 Alexey Zaytsev
2012-12-15 21:32     ` [PATCH 2/2] Document VIRTIO_BLK_T_GET_ID Alexey Zaytsev
2012-12-17  8:45       ` Stefan Hajnoczi
2013-01-02  4:49       ` Rusty Russell
2012-12-17  8:45     ` [PATCH 1/2] Auto-fix lines after 67023431 Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.