OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] Re: [PATCH v8 08/16] packed virtqueues: more efficient virtqueue layout


On Sun, Feb 25, 2018 at 08:49:10PM +0200, Michael S. Tsirkin wrote:
> On Sat, Feb 24, 2018 at 01:17:08PM +0800, Tiwei Bie wrote:
> > On Fri, Feb 16, 2018 at 09:24:12AM +0200, Michael S. Tsirkin wrote:
[...]
> > > +\subsection{Event Suppression Structure Format}\label{sec:Basic
> > > +Facilities of a Virtio Device / Packed Virtqueues / Event Suppression Structure
> > > +Format}
> > > +
> > > +The following structure is used to reduce the number of
> > > +notifications sent between driver and device.
> > > +
> > > +\begin{lstlisting}
> > > +__le16 desc_event_off : 15; /* Descriptor Event Offset */
> > > +int    desc_event_wrap : 1; /* Descriptor Event Wrap Counter */
> > 
> > Is this `int` a typo?
> 
> It's a single bit so I think it does not matter.
> What type would you like me to use instead?

It looks a bit strange to use different types here, and
that's why I asked. If there is no particular reason to
use `int` here, maybe it's better to keep using __le16.

Besides, just for fun. For C language, I checked gcc and
clang. It seems that `int desc_event_wrap:1;` is a signed
type. So, e.g. `p->desc_event_wrap == 1` is always false.

Best regards,
Tiwei Bie

> 
> > > +__le16 desc_event_flags : 2; /* Descriptor Event Flags */
> > > +\end{lstlisting}
[...]


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]