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

Re: [Xen-devel] [PATCH v7 1/2] public/io/netif.h: clarifications to wire formats



On Tue, 2016-01-12 at 09:58 +0000, Paul Durrant wrote:
> My previous patch 03809ae7 "document transmit and receive wire formats
> separately" improved documentation of the receive and transmit wire
> formats but further clarifications were requested.
> 
> This patch adds those clarifications.
> 
> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Keir Fraser <keir@xxxxxxx>
> Cc: Tim Deegan <tim@xxxxxxx>
> ---
> 
> v6:
> Â- v4 of the original patch was committed so this is an
> ÂÂÂincremental version of the patch in v5.
> 
> v5:
> Â- Add extra clarifications.
> ---
> Âxen/include/public/io/netif.h | 28 ++++++++++++++++++++++++----
> Â1 file changed, 24 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/include/public/io/netif.h
> b/xen/include/public/io/netif.h
> index 1790ea0..0a3272f 100644
> --- a/xen/include/public/io/netif.h
> +++ b/xen/include/public/io/netif.h
> @@ -154,19 +154,29 @@
> Â * Guest transmit
> Â * ==============
> Â *
> - * This is the 'wire' format for packets:
> + * This is the 'wire' format for transmit (frontend -> backend) 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)
> + *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂNETTXF_more_data - flags on
> preceding
> + *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂextras are not relevent here)
> Â *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂflags = 0
> Â *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsize = fragment size
> Â *
> + * NOTE:
> + *
> + * This format slightly is different from that used for receive
> + * (backend -> frontend) packets. Specifically, in a multi-fragment
> + * packet the actual size of fragment 1 can only be determined by
> + * subtracting the sizes of fragments 2..N from the total packet size.
> + *
> Â * Ring slot size is 12 octets, however not all request/response
> Â * structs use the full size.
> Â *
> @@ -202,19 +212,29 @@
> Â * Guest receive
> Â * =============
> Â *
> - * This is the 'wire' format for packets:
> + * This is the 'wire' format for receive (backend -> frontend) packets:
> + *
> Â *ÂÂFragment 1: netif_rx_request_tÂÂ- flags = NETRXF_*
> Â *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsize = fragment size
> Â * [Extra 1: netif_extra_info_t]ÂÂÂÂ- (only if fragment 1 flags include
> Â *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂNETRXF_extra_info)
> + *ÂÂ...
> Â * [Extra N: netif_extra_info_t]ÂÂÂÂ- (only if extra N-1 flags include
> Â *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂXEN_NETIF_EXTRA_MORE)
> Â *ÂÂ...
> Â *ÂÂFragment N: netif_rx_request_tÂÂ- (only if fragment N-1 flags
> include
> - *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂNETRXF_more_data)
> + *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂNETRXF_more_data - flags on
> preceding
> + *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂextras are not relevent here)
> Â *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂflags = 0
> Â *ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂsize = fragment size
> Â *
> + * NOTE:
> + *
> + * This format slightly is different from that used for transmit
> + * (frontend -> backend) packets. Specifically, in a multi-fragment
> + * packet the size of the packet can only be determined by summing the
> + * sizes of fragments 1..N.
> + *
> Â * Ring slot size is 8 octets.
> Â *
> Â * rx request (netif_rx_request_t)
_______________________________________________
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®.