[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [PATCH v5] virtio-net: Fix and update VIRTIO_NET_F_NOTF_COAL feature
> From: Alvaro Karsz <alvaro.karsz@solid-run.com> > Sent: Thursday, February 16, 2023 9:56 AM [..] > +When the device has \field{max_usecs} = 0 or \field{max_packets} = 0, the > notification conditions are met after every packet received/sent. > + > +\subparagraph{RX Example}\label{sec:Device Types / Network Device / > +Device Operation / Control Virtqueue / Notifications Coalescing / RX > +Example} > > If, for example: > \begin{itemize} > -\item \field{rx_usecs} = 10. > -\item \field{rx_max_packets} = 15. > +\item \field{max_usecs} = 10. > +\item \field{max_packets} = 15. > \end{itemize} > - > -The device will operate as follows: > - > +then a device with a single receive virtqueue will operate as follows: > \begin{itemize} > \item The device will count received packets until it accumulates 15, or until 10 > usecs elapsed since the first one was received. > \item If the notifications are not suppressed by the driver, the device will send > an used buffer notification, otherwise, the device will not send an used buffer > notification as long as the notifications are suppressed. > \end{itemize} > > -\subparagraph{TX Notifications}\label{sec:Device Types / Network Device / > Device Operation / Control Virtqueue / Notifications Coalescing / TX > Notifications} > +\subparagraph{TX Example}\label{sec:Device Types / Network Device / > +Device Operation / Control Virtqueue / Notifications Coalescing / TX > +Example} > > If, for example: > \begin{itemize} > -\item \field{tx_usecs} = 10. > -\item \field{tx_max_packets} = 15. > +\item \field{max_usecs} = 10. > +\item \field{max_packets} = 15. > \end{itemize} > - > -The device will operate as follows: > - > +then a device with a single transmit virtqueue will operate as follows: > \begin{itemize} > \item The device will count sent packets until it accumulates 15, or until 10 > usecs elapsed since the first one was sent. > \item If the notifications are not suppressed by the driver, the device will send > an used buffer notification, otherwise, the device will not send an used buffer > notification as long as the notifications are suppressed. > \end{itemize} > > +\subparagraph{Notifications When Coalescing Parameters > +Change}\label{sec:Device Types / Network Device / Device Operation / > +Control Virtqueue / Notifications Coalescing / Notifications When > +Coalescing Parameters Change} > + > +When the coalescing parameters of a device change, the device needs to > check if the new notification conditions are met and send a used buffer > notification if so. > + > +For example, \field{max_packets} = 15 for a device with a single > +transmit virtqueue: if the device sends 10 packets and afterwards > +receives a VIRTIO_NET_CTRL_NOTF_COAL_TX_SET command with > \field{max_packets} = 8, then the notification condition is immediately > considered to be met; the device needs to immediately send a used buffer > notification, if the notifications are not suppressed by the driver. > + > \drivernormative{\subparagraph}{Notifications Coalescing}{Device Types / > Network Device / Device Operation / Control Virtqueue / Notifications > Coalescing} > > If the VIRTIO_NET_F_NOTF_COAL feature has not been negotiated, the driver > MUST NOT issue VIRTIO_NET_CTRL_NOTF_COAL commands. > @@ -1583,7 +1596,7 @@ \subsubsection{Control Virtqueue}\label{sec:Device > Types / Network Device / Devi > > A device SHOULD respond to the VIRTIO_NET_CTRL_NOTF_COAL commands > with VIRTIO_NET_ERR if it was not able to change the parameters. > > -A device SHOULD NOT send used buffer notifications to the driver, if the > notifications are suppressed as explained in \ref{sec:Basic Facilities of a Virtio > Device / Virtqueues / Used Buffer Notification Suppression}, even if the > coalescing counters expired. > +A device SHOULD NOT send used buffer notifications to the driver if the > notifications are suppressed, even if the notification conditions are met. > > Upon reset, a device MUST initialize all coalescing parameters to 0. > > -- > 2.34.1 Reviewed-by: Parav Pandit <parav@nvidia.com>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]