xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <Ian.Jackson@citrix.com>,
	"Keir (Xen.org)" <keir@xen.org>, Jan Beulich <jbeulich@suse.com>,
	"Tim (Xen.org)" <tim@xen.org>
Subject: Re: [PATCH v2] public/io/netif.h: make control ring hash protocol more general
Date: Tue, 16 Feb 2016 14:17:10 +0000	[thread overview]
Message-ID: <2dca0eae478c4f99a0e929c7745ecff7@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <1455631965.814.89.camel@citrix.com>

> -----Original Message-----
> From: Ian Campbell [mailto:ian.campbell@citrix.com]
> Sent: 16 February 2016 14:13
> To: Paul Durrant; xen-devel@lists.xenproject.org
> Cc: Ian Jackson; Jan Beulich; Keir (Xen.org); Tim (Xen.org)
> Subject: Re: [PATCH v2] public/io/netif.h: make control ring hash protocol
> more general
> 
> On Tue, 2016-02-16 at 14:02 +0000, Paul Durrant wrote:
> > > -----Original Message-----
> > [snip]
> > > >
> > > > > >   *
> > > > > > - * NETIF_CTRL_TYPE_SET_TOEPLITZ_MAPPING_ORDER
> > > > > > - * ------------------------------------------
> > > > > > + * NETIF_CTRL_TYPE_SET_HASH_MAPPING_ORDER
> > > > >
> > > > > This one needs a similar "if the hash algorithm requires it"
> > > > > wording
> > > > > like the setting the key one had.
> > > > >
> > > >
> > > > Why? Is there any point of doing hashing at all if the backend is not
> > > > going to map it to a queue via a mapping table?
> > >
> > > But will all hashing algorithms work via a table with a variable order?
> > >
> >
> > My view is that the algorithm used to generate the hash (which is after
> > all just a number) and then mapping that hash to a queue via a table are
> > pretty separate. Do you have an example in mind where these things are
> > more intertwined? (Maybe my view is too simplistic).
> 
> I don't know of a specific example, but was just trying to generalise along
> the lines this was already heading in order to avoid future headaches when
> trying to add new (perhaps not yet invented) schemes, e.g. to algorithms
> with fixed numbers of queues, which support non-power of two table sizes
> or
> which take the hash output mod N as the queue number without passing via
> a
> table lookup phase etc.

I could change things to allow for a non power-of-two hash table now, so I'll do that so as not to rule it out. And with that, of course, you can provide a table to give a simple hash-mod-N mapping.

  Paul

> 
> I was concerned about retro fitting such things, but now I think about it
> that would involve adding a new hash type and perhaps new ops for the
> parameters of that hash, at which point the table size op could become
> optional based on the hash type at that point too, without causing any
> forward/backward compatibility concerns.
> 
> Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-02-16 14:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15 11:14 [PATCH v2] public/io/netif.h: make control ring hash protocol more general Paul Durrant
2016-02-16 10:22 ` Ian Campbell
2016-02-16 11:02   ` Paul Durrant
2016-02-16 11:10     ` Jan Beulich
2016-02-16 11:14       ` Paul Durrant
2016-02-16 11:18         ` Jan Beulich
2016-02-16 11:20           ` Paul Durrant
2016-02-16 13:51     ` Ian Campbell
2016-02-16 14:02       ` Paul Durrant
2016-02-16 14:12         ` Ian Campbell
2016-02-16 14:17           ` Paul Durrant [this message]
2016-02-16 14:25             ` Ian Campbell

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=2dca0eae478c4f99a0e929c7745ecff7@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).