From: Ian Campbell <ian.campbell@citrix.com>
To: Paul Durrant <Paul.Durrant@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:25:35 +0000 [thread overview]
Message-ID: <1455632735.814.95.camel@citrix.com> (raw)
In-Reply-To: <2dca0eae478c4f99a0e929c7745ecff7@AMSPEX02CL03.citrite.net>
On Tue, 2016-02-16 at 14:17 +0000, Paul Durrant wrote:
> > -----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.
I was envisaging something the other way round i.e. a hash which hardcoded
that hash-mod-N mapping, i.e. where it would be an error to try and set
some other table or arguably to permit setting any table at all even if it
happened to be 1:1 (since making the b/e for such an algorithm check seems
like unnecessary overhead/complexity).
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-02-16 14:25 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
2016-02-16 14:25 ` Ian Campbell [this message]
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=1455632735.814.95.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@citrix.com \
--cc=Paul.Durrant@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 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.