在 2023/3/7 上午6:57, Michael S. Tsirkin 写道:
On Thu, Mar 02, 2023 at 11:36:18AM +0000, David Edmondson wrote:
+                                        for an enabled transmit/receive 
virtqueue whose number is \field{vqn}.
Should this now be "whose index is \field{vqn}"?
Ugh.  I guess we'll have to fix the number/index mess in the spec
first. Parav you said you are looking into it?



# Where virtqueue number and virtqueue index are used.
  1. In the Virtqueue Configuration Section, use the virtqueue index: "Write the **virtqueue index** (first queue is 0) to queue_select."
  2. Both descriptions are used separately in the Notification Section.
      2.1 Here vqn is called virtqueue index:
            "When VIRTIO_F_NOTIFICATION_DATA has not been negotiated, the driver sends an available buffer notification               to the device by writing the **16-bit virtqueue index** of this virtqueue to the Queue Notify address.
              ...

              le32 {
                     vqn: 16;
                     next_off : 15;
                     next_wrap: 1;
             };
             ...

             If VIRTIO_F_NOTIFICATION_DATA has not been negotiated, the driver MUST use the queue_notify_data value instead of the **virtqueue index**."

      2.2 Here vqn is called virtqueue number:
            "When VIRTIO_F_NOTIFICATION_DATA has not been negotiated, the Notification data contains the **Virtqueue number**.
            ...

            be32 {
                    vqn: 16;
                    next_off : 15;
                    next_wrap: 1;
             };
            ...

            When VIRTIO_F_NOTIFICATION_DATA has not been negotiated, this notification involves sending the **virtqueue number** to the device (method depending on the transport).
            ...

            vqn -- **VQ number** to be notified."

# 0-based index and 0-based number are used respectively in the RSS Section:
1. "Field unclassified_queue contains the **0-based index** of the receive virtqueue to place unclassified packets in. Index 0 corresponds to receiveq1." 2. "use the result as the index in the indirection table to get **0-based number** of destination receiveq (value of 0 corresponds to receiveq1)."



\field{vqn} has been called '0-based virtqueue index' or '0-based virtqueue number',
I think both seem to be friendly to readers, so what are your options?

Thanks.




---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org

Reply via email to