OASIS Virtual I/O Device (VIRTIO) TC

 View Only
  • 1.  [PATCH] virtio-scsi: define VIRTIO_SCSI_F_FC_HOST

    Posted 11-29-2016 13:56
    Add a new feature and the related configuration fields. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- content.tex 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/content.tex b/content.tex index ab3d7b4..28f0527 100644 --- a/content.tex +++ b/content.tex @@ -5095,6 +5095,12 @@ This section relies on definitions from hyperref[intro:SAM]{SAM}. item[VIRTIO_SCSI_F_T10_PI (3)] The extended fields for T10 protection information (DIF/DIX) are included in the SCSI request header. + +item[VIRTIO_SCSI_F_FC_HOST (4)] The host reports the Fibre Channel + WWNN and WWPN information for the adapter in configuration space. + After negotiating this feature, the guest SHOULD handle configuration + change interrupts to detect a switch from primary WWNN and WWPN + to secondary, or vice versa. end{description} subsection{Device configuration layout}label{sec:Device Types / SCSI Host Device / Device configuration layout} @@ -5113,6 +5119,11 @@ struct virtio_scsi_config { le16 max_channel; le16 max_target; le32 max_lun; + u8 primary_wwpn[8]; + u8 primary_wwnn[8]; + u8 secondary_wwpn[8]; + u8 secondary_wwnn[8]; + u8 primary_active; }; end{lstlisting} @@ -5158,6 +5169,17 @@ struct virtio_scsi_config { or equal to the value of the fields. field{max_channel} SHOULD be zero. field{max_target} SHOULD be less than or equal to 255. field{max_lun} SHOULD be less than or equal to 16383. + +item[field{primary_wwpn}, field{primary_wwnn}, field{secondary_wwpn} + and field{secondary_wwnn}] are only valid if VIRTIO_SCSI_F_FC_HOST + have been negotiated, and MUST NOT change. They provide two pairs + of Fibre Channel addresses, each consisting of a World Wide Port Name + and a World Wide Node Name. One of the pairs is the active one. + +item[field{primary_active}] is also only valid if VIRTIO_SCSI_F_FC_HOST + is negotiated. If 1, the active Fibre Channel address is the primary; + if 0, the active Fibre Channel address is the secondary. This field + MAY change whenever the device triggers a configuration change interrupt. end{description} drivernormative{subsubsection}{Device configuration layout}{Device Types / SCSI Host Device / Device configuration layout} -- 2.9.3


  • 2.  Re: [PATCH] virtio-scsi: define VIRTIO_SCSI_F_FC_HOST

    Posted 11-30-2016 11:10
    On Tue, Nov 29, 2016 at 02:56:07PM +0100, Paolo Bonzini wrote: > Add a new feature and the related configuration fields. > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > content.tex 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) Hi Paolo, Can you elaborate a bit on how this feature can be used? It's not clear to me why having exactly two addresses is useful rather than having just one or allowing the inactive address to change. Stefan > diff --git a/content.tex b/content.tex > index ab3d7b4..28f0527 100644 > --- a/content.tex > +++ b/content.tex > @@ -5095,6 +5095,12 @@ This section relies on definitions from hyperref[intro:SAM]{SAM}. > > item[VIRTIO_SCSI_F_T10_PI (3)] The extended fields for T10 protection > information (DIF/DIX) are included in the SCSI request header. > + > +item[VIRTIO_SCSI_F_FC_HOST (4)] The host reports the Fibre Channel > + WWNN and WWPN information for the adapter in configuration space. > + After negotiating this feature, the guest SHOULD handle configuration > + change interrupts to detect a switch from primary WWNN and WWPN > + to secondary, or vice versa. > end{description} > > subsection{Device configuration layout}label{sec:Device Types / SCSI Host Device / Device configuration layout} > @@ -5113,6 +5119,11 @@ struct virtio_scsi_config { > le16 max_channel; > le16 max_target; > le32 max_lun; > + u8 primary_wwpn[8]; > + u8 primary_wwnn[8]; > + u8 secondary_wwpn[8]; > + u8 secondary_wwnn[8]; > + u8 primary_active; > }; > end{lstlisting} > > @@ -5158,6 +5169,17 @@ struct virtio_scsi_config { > or equal to the value of the fields. field{max_channel} SHOULD > be zero. field{max_target} SHOULD be less than or equal to 255. > field{max_lun} SHOULD be less than or equal to 16383. > + > +item[field{primary_wwpn}, field{primary_wwnn}, field{secondary_wwpn} > + and field{secondary_wwnn}] are only valid if VIRTIO_SCSI_F_FC_HOST > + have been negotiated, and MUST NOT change. They provide two pairs > + of Fibre Channel addresses, each consisting of a World Wide Port Name > + and a World Wide Node Name. One of the pairs is the active one. > + > +item[field{primary_active}] is also only valid if VIRTIO_SCSI_F_FC_HOST > + is negotiated. If 1, the active Fibre Channel address is the primary; > + if 0, the active Fibre Channel address is the secondary. This field > + MAY change whenever the device triggers a configuration change interrupt. > end{description} > > drivernormative{subsubsection}{Device configuration layout}{Device Types / SCSI Host Device / Device configuration layout} > -- > 2.9.3 > Attachment: signature.asc Description: PGP signature


  • 3.  Re: [PATCH] virtio-scsi: define VIRTIO_SCSI_F_FC_HOST

    Posted 11-30-2016 12:09
    On 30/11/2016 11:43, Stefan Hajnoczi wrote: > On Tue, Nov 29, 2016 at 02:56:07PM +0100, Paolo Bonzini wrote: >> Add a new feature and the related configuration fields. >> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> >> --- >> content.tex 22 ++++++++++++++++++++++ >> 1 file changed, 22 insertions(+) > > Hi Paolo, > Can you elaborate a bit on how this feature can be used? > > It's not clear to me why having exactly two addresses is useful rather > than having just one or allowing the inactive address to change. Because the WWNN and WWPN in the virtio-scsi configuration must be used when creating the NPIV virtual HBA in the host, you do not want two hosts to use the same WWNN and WWPN. That would be the same as using the same MAC address on two machines. The switch from primary to secondary or vice versa then happens on migration. This is the same scheme used by Hyper-V. (BTW, I need to move the normative "MUST"s into the normative section so I need to send out v2). Paolo > Stefan > >> diff --git a/content.tex b/content.tex >> index ab3d7b4..28f0527 100644 >> --- a/content.tex >> +++ b/content.tex >> @@ -5095,6 +5095,12 @@ This section relies on definitions from hyperref[intro:SAM]{SAM}. >> >> item[VIRTIO_SCSI_F_T10_PI (3)] The extended fields for T10 protection >> information (DIF/DIX) are included in the SCSI request header. >> + >> +item[VIRTIO_SCSI_F_FC_HOST (4)] The host reports the Fibre Channel >> + WWNN and WWPN information for the adapter in configuration space. >> + After negotiating this feature, the guest SHOULD handle configuration >> + change interrupts to detect a switch from primary WWNN and WWPN >> + to secondary, or vice versa. >> end{description} >> >> subsection{Device configuration layout}label{sec:Device Types / SCSI Host Device / Device configuration layout} >> @@ -5113,6 +5119,11 @@ struct virtio_scsi_config { >> le16 max_channel; >> le16 max_target; >> le32 max_lun; >> + u8 primary_wwpn[8]; >> + u8 primary_wwnn[8]; >> + u8 secondary_wwpn[8]; >> + u8 secondary_wwnn[8]; >> + u8 primary_active; >> }; >> end{lstlisting} >> >> @@ -5158,6 +5169,17 @@ struct virtio_scsi_config { >> or equal to the value of the fields. field{max_channel} SHOULD >> be zero. field{max_target} SHOULD be less than or equal to 255. >> field{max_lun} SHOULD be less than or equal to 16383. >> + >> +item[field{primary_wwpn}, field{primary_wwnn}, field{secondary_wwpn} >> + and field{secondary_wwnn}] are only valid if VIRTIO_SCSI_F_FC_HOST >> + have been negotiated, and MUST NOT change. They provide two pairs >> + of Fibre Channel addresses, each consisting of a World Wide Port Name >> + and a World Wide Node Name. One of the pairs is the active one. >> + >> +item[field{primary_active}] is also only valid if VIRTIO_SCSI_F_FC_HOST >> + is negotiated. If 1, the active Fibre Channel address is the primary; >> + if 0, the active Fibre Channel address is the secondary. This field >> + MAY change whenever the device triggers a configuration change interrupt. >> end{description} >> >> drivernormative{subsubsection}{Device configuration layout}{Device Types / SCSI Host Device / Device configuration layout} >> -- >> 2.9.3 >> Attachment: signature.asc Description: OpenPGP digital signature


  • 4.  Re: [PATCH] virtio-scsi: define VIRTIO_SCSI_F_FC_HOST

    Posted 11-30-2016 15:00
    On Wed, Nov 30, 2016 at 01:08:44PM +0100, Paolo Bonzini wrote: > > > On 30/11/2016 11:43, Stefan Hajnoczi wrote: > > On Tue, Nov 29, 2016 at 02:56:07PM +0100, Paolo Bonzini wrote: > >> Add a new feature and the related configuration fields. > >> > >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > >> --- > >> content.tex 22 ++++++++++++++++++++++ > >> 1 file changed, 22 insertions(+) > > > > Hi Paolo, > > Can you elaborate a bit on how this feature can be used? > > > > It's not clear to me why having exactly two addresses is useful rather > > than having just one or allowing the inactive address to change. > > Because the WWNN and WWPN in the virtio-scsi configuration must be used > when creating the NPIV virtual HBA in the host, you do not want two > hosts to use the same WWNN and WWPN. That would be the same as using > the same MAC address on two machines. The switch from primary to > secondary or vice versa then happens on migration. This is the same > scheme used by Hyper-V. Ah, I see. So each guest has not one but two assigned addresses and only one of them is in use at any given time. When doing multiple migrations you keep flipping between the two allocated addresses. It would be useful to describe the purpose in the spec. The usage wasn't obvious to me although it makes sense after you explained it. Stefan Attachment: signature.asc Description: PGP signature