All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@intel.com>
To: netdev@vger.kernel.org
Subject: [RFC PATCH 0/3] Simplified 16 bit Toeplitz hash algorithm
Date: Fri, 17 Dec 2010 17:00:32 -0800	[thread overview]
Message-ID: <20101218004210.28602.18499.stgit@gitlad.jf.intel.com> (raw)

This patch series is meant to be a proof of concept for simplifying the cost
of Toeplitz hashing by reducing the complexity of the key to a 16 bit
repeating value.  The resultant advantages are that the hash computation
performance is significantly increased, and that the resultant hash is the
same for flows in either direction.

The idea for this occurred to me while working on the ATR hashing algorithms
and improving their performance.  ATR implements a 32 bit repeating key which
results in us being able to XOR everything down to a 32 bit value.  By using a
16 bit key we are able to cut down the 12 to 36 byte input value to only 2
bytes via XOR operations.  This reduces the resultant hash to 16 bits, however
since queue selection only requires 7 bits for RSS that still leaves us with a
large enough resultant key.

I'm currently not planning to do any more work on this in the near future as I
have several other projects in which I am currently engaged.  However I just
wanted to put this code out there in case anyone had a use for it.

Thanks,

Alex

---

Alexander Duyck (3):
      igb: example of how to update igb to make use of in-kernel Toeplitz hashing
      ixgbe: example of how to update ixgbe to make use of in-kernel Toeplitz hash
      net: add simplified 16 bit Toeplitz hash function for transmit side hashing


 drivers/net/igb/igb_main.c     |   22 ++++------
 drivers/net/ixgbe/ixgbe_main.c |   47 ++++++++++++---------
 include/linux/netdevice.h      |    2 +
 include/linux/toeplitz.h       |   89 ++++++++++++++++++++++++++++++++++++++++
 net/core/dev.c                 |   68 +++++++++++++++++++++++++++++++
 5 files changed, 195 insertions(+), 33 deletions(-)
 create mode 100644 include/linux/toeplitz.h

-- 

             reply	other threads:[~2010-12-18  1:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-18  1:00 Alexander Duyck [this message]
2010-12-18  1:00 ` [RFC PATCH 1/3] net: add simplified 16 bit Toeplitz hash function for transmit side hashing Alexander Duyck
2010-12-18  1:00 ` [RFC PATCH 2/3] ixgbe: example of how to update ixgbe to make use of in-kernel Toeplitz hash Alexander Duyck
2010-12-18  1:00 ` [RFC PATCH 3/3] igb: example of how to update igb to make use of in-kernel Toeplitz hashing Alexander Duyck
2010-12-18  5:09   ` David Miller
2010-12-18  6:53     ` Alexander Duyck
2010-12-18  6:59       ` David Miller
2011-01-03 18:47 ` [RFC PATCH 0/3] Simplified 16 bit Toeplitz hash algorithm Tom Herbert
2011-01-03 19:00   ` Alexander Duyck
2011-01-03 19:02   ` David Miller
2011-01-03 19:30     ` Ben Hutchings
2011-01-03 19:52       ` Alexander Duyck
2011-01-03 19:54         ` David Miller
2011-01-03 20:15         ` Ben Hutchings
2011-01-03 21:45           ` Alexander Duyck
2011-01-04  3:25           ` Tom Herbert
2011-01-04 15:43             ` Ben Hutchings

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=20101218004210.28602.18499.stgit@gitlad.jf.intel.com \
    --to=alexander.h.duyck@intel.com \
    --cc=netdev@vger.kernel.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.