All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Paul Durrant <paul.durrant@citrix.com>, xen-devel@lists.xenproject.org
Cc: Keir Fraser <keir@xen.org>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH v7 2/2] public/io/netif.h: document control ring and toeplitz hashing
Date: Mon, 18 Jan 2016 16:07:36 +0000	[thread overview]
Message-ID: <1453133256.6020.175.camel@citrix.com> (raw)
In-Reply-To: <1452592736-6463-3-git-send-email-paul.durrant@citrix.com>

On Tue, 2016-01-12 at 09:58 +0000, Paul Durrant wrote:
> This patch documents a new shared ring between frontend and backend that
> can be used to pass bulk out-of-band data, such as that required to
> implement toeplitz hashing in the backend such that it is configurable by
> the frontend (which is needed to support NDIS RSS for Windows guests).
> 
> The patch then goes on to document the messages passed over the control
> ring that can be used to configure toeplitz hashing and a new extra info
> fragment that can be used to pass hash values between frontend and
> backend for both transmit and receive packets.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Tim Deegan <tim@xen.org>
> ---
> v7:
>  - s/feature-control-ring/feature-ctrl-ring/g for consistency
> 
> v5:
>  - Clarify the control API for toeplitz hashing in many places.
>  - Add messages for getting and setting mapping table order to allow
>    for a table that is larger than can be mapped by a single grant
>    reference.
>  - Fold in the definition of the new extra info type for passing
>    hash values and make it toeplitz specific.
> 
> v4:
>  - Fix netif_ctrl_response_t definition to match specification.
> 
> v3:
>  - Fix commit comment.
> 
> v2:
>  - Use a balanced fix-sized message ring for the control ring
>    (bulk data now passed by grant reference).
> ---
>  xen/include/public/io/netif.h | 380
> +++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 379 insertions(+), 1 deletion(-)

I noticed (after trimming the quotes unfortunately) that the request gained
a data[2] in v5 (as part of handling the table differently), so the req +
rsp are no longer the same size.

I'm not sure if that is worth worrying about. I don't think it would
simplify anything to include a padding bit, but it might be nice?

> 
> + * NETIF_CTRL_TYPE_SET_TOEPLITZ_MAPPING
> + * ------------------------------------
> + *
> + * This is sent by the frontend to set the content of the table mapping
> + * toeplitz hash value to queue number. The backend should calculate the
> + * hash from the packet header, use it as an index into the table (modulo
> + * the size of the table) and then steer the packet to the queue number
> + * found at that index.
> + *
> + * Request:
> + *
> + *  type    = NETIF_CTRL_TYPE_SET_TOEPLITZ_MAPPING
> + *  data[0] = grant reference of page containing the mapping (sub-)table
> + *            (assumed to start at beginning of grant)
> + *  data[1] = size of (sub-)table in entries
> + *  data[2] = offset, in entries, of sub-table within overall table

Adding data[2] seems reasonable to me, but if you wanted to avoid adding it
then saying data[1][8:0] == size and data[1][31:9] == offset would allow a
size of 512 (biggest possible in a single gref) and 8.3M for the offset.

Do the updates tend to come in large batches, or is setting single entries
or small runs of contiguous entries the norm? I suspect you are trying to
avoid copying 4K worth of data ofr each update when only a couple of
entries have changed, is that right?

All the above are just suggestions, which you are free to ignore, so if you
prefer things as they are that's fine by me:

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


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

  reply	other threads:[~2016-01-18 16:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12  9:58 [PATCH v7 0/2] public/io/netif.h: support for toeplitz hashing Paul Durrant
2016-01-12  9:58 ` [PATCH v7 1/2] public/io/netif.h: clarifications to wire formats Paul Durrant
2016-01-18 14:55   ` Ian Campbell
2016-01-12  9:58 ` [PATCH v7 2/2] public/io/netif.h: document control ring and toeplitz hashing Paul Durrant
2016-01-18 16:07   ` Ian Campbell [this message]
2016-01-18 16:35     ` Jan Beulich
2016-01-18 16:57       ` Ian Campbell
     [not found]     ` <56dc5108a3054e5884b217357b73a3bc@AMSPEX02CL03.citrite.net>
2016-01-19 11:34       ` Ian Campbell
2016-01-18 10:15 ` [PATCH v7 0/2] public/io/netif.h: support for " Paul Durrant
2016-02-02  5:02 ` Bob Liu
2016-02-02  9:33   ` Paul Durrant
2016-02-02 11:05     ` Bob Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453133256.6020.175.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=paul.durrant@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.