]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbe: Refactor MAC address configuration code
authorAlexander Duyck <aduyck@mirantis.com>
Thu, 22 Oct 2015 23:26:30 +0000 (16:26 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:40:15 +0000 (16:40 -0700)
commit0884a0d32866b4c0f8ebf3a1c3122e5465549874
treed238e0b58c5a3fa84583e9f3f460297ed0fa43d2
parent0e726f5fd067eb2280c44bda3b2e1342e7f3938d
ixgbe: Refactor MAC address configuration code

Orabug: 23177316

In the process of tracking down a memory leak when adding/removing FDB
entries I had to go through the MAC address configuration code for ixgbe.
In the process of doing so I found a number of issues that impacted
readability and performance.  This change updates the code in general to
clean it up so it becomes clear what each step is doing.  From what I can
tell there a couple of bugs cleaned up in this code.

First is the fact that the MAC addresses were being double counted for the
PF.  As a result once entries up to 63 had been used you could no longer
add additional filters.

A simple test case for this:
  for i in `seq 0 96`
  do
    ip link add link ens8 name mv$i type macvlan
    ip link set dev mv$i up
  done

Test script:
  ethregs -s 0:8.0 | grep -e "RAH" | grep 8000....$

When things are working correctly RAL/H registers 1 - 97 will be consumed.
In the failing case it will stop at 63 and prevent any further filters from
being added.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Darin Miller <darin.j.miller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit c9f53e63c2089d8154900ed06da0aa7be9f74201)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe.h
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c