]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: check multi-bit state correctly
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Wed, 20 Nov 2013 10:02:49 +0000 (10:02 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 7 Dec 2013 00:10:30 +0000 (16:10 -0800)
commita534897b20f839f95613059df50395b7649dc6c1
treedcc8d415d940371c26827cf581834e8ba9bcc8f4
parent2a7c43bf8c2c4d928f47f776bd884c3bc6b244c3
i40e: check multi-bit state correctly

The hash is reported correctly in the rss field if and only if
the filter status is 3.  Other values of filter status mean
different things and we shouldn't depend on a bitwise result.

The issue was that
a & b --> returns true for b={1,2,3}
the fix is
a & b == b

Also refactor this function to use constant operations because we
are in fast path.

Change-Id: I4e29be87439c1cf8b60bc31bea29dff89596c013
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c