]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Refactor EF10 stat mask code to allow for more conditional stats
authorEdward Cree <ecree@solarflare.com>
Fri, 27 Sep 2013 17:52:49 +0000 (18:52 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 4 Oct 2013 22:31:51 +0000 (23:31 +0100)
commit9212f598864d71f82f43a18c0fb430f2c655a54f
tree182cf2705eb6349cb1fea0cc69dd2cd446b0be64
parentc9a663c97862d81303f27c2b547c5ec7436ed100
sfc: Refactor EF10 stat mask code to allow for more conditional stats

Previously, efx_ef10_stat_mask returned a static const unsigned long[], which
meant that each possible mask had to be declared statically with
STAT_MASK_BITMAP.  Since adding a condition would double the size of the
decision tree, we now create the bitmask dynamically.

To do this, we have two functions efx_ef10_raw_stat_mask, which returns a u64,
and efx_ef10_get_stat_mask, which fills in an unsigned long * argument.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/ef10.c