]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: fix RAR entry counting for generic and fdb_add()
authorJohn Fastabend <john.r.fastabend@intel.com>
Thu, 31 May 2012 12:42:26 +0000 (12:42 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 21 Jul 2012 23:05:59 +0000 (16:05 -0700)
commit1be6ec8eb4849b081822af8f8428b35ff87e3008
tree66288cc983efed26cf494915470dda8c80dbb6df
parent660d391b5a6e36e96c7953e80132a216f60351af
ixgbe: fix RAR entry counting for generic and fdb_add()

Do RAR entry accounting correctly so that errors are reported and
promisc mode is set correctly when the number of entries exceeds
the hardware limits.

This can happen with many macvlan devices attached to the PF or
by adding many fdb entries in SR-IOV modes.

Also this includes a small refactor to fdb_add() to avoid having so
many nested if/else statements after adding a check for the number
or RAR entries.

The max entries for the PF is currently 16 we allow 15 additional
entries to account for the defined MAC.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c