]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ethtool: add CRC32 as an RSS hash function
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 8 Mar 2017 16:57:00 +0000 (08:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 00:39:58 +0000 (16:39 -0800)
CRC32 engines are usually easily available in hardware and generate
OK spread for RSS hash.  Add CRC32 RSS hash function to ethtool API.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ethtool.h
net/core/ethtool.c

index 9ded8c6d8176b909cf68da0e125eef4441b7c9a9..83cc9863444b078765255b9010b015578768be09 100644 (file)
@@ -60,6 +60,7 @@ enum ethtool_phys_id_state {
 enum {
        ETH_RSS_HASH_TOP_BIT, /* Configurable RSS hash function - Toeplitz */
        ETH_RSS_HASH_XOR_BIT, /* Configurable RSS hash function - Xor */
+       ETH_RSS_HASH_CRC32_BIT, /* Configurable RSS hash function - Crc32 */
 
        /*
         * Add your fresh new hash function bits above and remember to update
@@ -73,6 +74,7 @@ enum {
 
 #define ETH_RSS_HASH_TOP       __ETH_RSS_HASH(TOP)
 #define ETH_RSS_HASH_XOR       __ETH_RSS_HASH(XOR)
+#define ETH_RSS_HASH_CRC32     __ETH_RSS_HASH(CRC32)
 
 #define ETH_RSS_HASH_UNKNOWN   0
 #define ETH_RSS_HASH_NO_CHANGE 0
index aecb2c7241b697e79628fdb79467f5087b2bbf9f..905a88ad28e096d57289eba7f966629336382032 100644 (file)
@@ -109,6 +109,7 @@ static const char
 rss_hash_func_strings[ETH_RSS_HASH_FUNCS_COUNT][ETH_GSTRING_LEN] = {
        [ETH_RSS_HASH_TOP_BIT] =        "toeplitz",
        [ETH_RSS_HASH_XOR_BIT] =        "xor",
+       [ETH_RSS_HASH_CRC32_BIT] =      "crc32",
 };
 
 static const char