netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] net/ethtool, mlx4_en: RSS hash function setting fixes
@ 2015-04-26 14:36 Amir Vadai
  2015-04-26 14:36 ` [PATCH net 1/2] ethtool: Use values instead of bit flags for RSS hash function Amir Vadai
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Amir Vadai @ 2015-04-26 14:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Or Gerlitz, Tal Alon, Ben Hutchings, Amir Vadai

Hi Dave,

This small patchset fixes a small issue in the ethtool User/kernel API.

Hash function is represented as an eight bit field, every bit represents a
function.  Currently possible values are: 1 for Toeplitz and 2 for XOR.
This commit changes the representation from bit flags into a value. Because
only one hash function will be used at a time, there is no sense using bit
flags for it.
Since today only 2 functions are supported, and there is no user space ethtool
that supports this feature, we can switch into values without causing any
backward compatibility issues.

After this patchset is applied, I will send the user space patch.

In this occasion I added a missing validation to the hash function value.

This patchset was applied and tested over commit 2ea2f62 ("net: fix crash in build_skb()")

Please push this patchset to stable 3.19.y in which those two issues were introduced.

Thanks,
Amir

Amir Vadai (2):
  ethtool: Use values instead of bit flags for RSS hash function
  net/mlx4_en: Prevent setting invalid RSS hash function

 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 29 ++++++++++++++-----------
 include/linux/ethtool.h                         |  9 ++------
 net/core/ethtool.c                              |  4 ++--
 3 files changed, 20 insertions(+), 22 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-27 10:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-26 14:36 [PATCH net 0/2] net/ethtool, mlx4_en: RSS hash function setting fixes Amir Vadai
2015-04-26 14:36 ` [PATCH net 1/2] ethtool: Use values instead of bit flags for RSS hash function Amir Vadai
2015-04-26 14:36 ` [PATCH net 2/2] net/mlx4_en: Prevent setting invalid " Amir Vadai
2015-04-26 17:18 ` [PATCH net 0/2] net/ethtool, mlx4_en: RSS hash function setting fixes Or Gerlitz
2015-04-27  3:02 ` David Miller
2015-04-27 10:34   ` Amir Vadai

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).