[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 1/3] public/io/netif.h: document transmit and receive wire formats separately



On Fri, 2016-01-08 at 15:56 +0000, Paul Durrant wrote:
> > -----Original Message-----
> [snip]
> > > Â * Guest transmit
> > > Â * ==============
> > > Â *
> > > + * This is the 'wire' format for packets:
> > > + *ÂÂFragment 1: netif_tx_request_tÂÂ- flags = NETTXF_*
> > > + *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsize = total packet size
> > > + * [Extra 1: netif_extra_info_t]ÂÂÂÂ- (only if fragment 1 flags
> > > include
> > > + *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂNETTXF_extra_info)
> > > + * [Extra N: netif_extra_info_t]ÂÂÂÂ- (only if extra N-1 flags
> > > include
> > > + *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂXEN_NETIF_EXTRA_MORE)
> > > + *ÂÂ...
> > > + *ÂÂFragment N: netif_tx_request_tÂÂ- (only if fragment N-1 flags
> > > include
> > > + *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂNETTXF_more_data)
> > 
> > For Fragment 2 is it the Flags of Fragment N-1 = 1 which are relevant,
> > or
> > the flags in the optional Extra N which may be in the middle (i.e. the
> > immediately preceding slot)?
> 
> It's Fragment N-1's flags. The flags on the Extras are not relevant.

I think it would be worth saying that explicitly, even though your text is
strictly correct someone might not quite follow.

>  In fact the only Extra flag defined is the one that says there's another
> Extra :-)

As opposed to extra types of which there are several.

> 
> > 
> > Am I correct in remembering that in the presence of NETTXF_more_data the
> > only way to know the actual size of Fragment 1 is to take away the total of
> > all the extras from Frag 1's size?
> 
> That's right.

Can you add a note please?

> > Same Q re which NETRXF_more_data is relevant.
> > 
> 
> Same answer :-)

Same request ;-)

> > In this path there is no indication of the total packet size other than
> > adding everything up?
> > 
> 
> Correct. 

Again perhaps worth a note.

> > Given that they differ in a subtle way would a quick but explicit
> > "NOTE: RX
> > and TX differ" be a useful addition do you think?
> > 
> 
> Yes, that's probably a good plan. I'll stick an extra comment in to that
> effect.

Ta.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.