]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Allow FDB entries access to more RAR filters
authorAlexander Duyck <aduyck@mirantis.com>
Thu, 22 Oct 2015 23:26:42 +0000 (16:26 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:40:17 +0000 (16:40 -0700)
Orabug: 23177316

This change makes it so that we allow the PF to make use of all free RAR
entries for FDB use if needed.

Previously the code limited us to 16 unicast entries, however this was
shared between MACVLAN which wasn't limited and the FDB code which was.  So
instead of treating the FDB code as a second class citizen I have updated
it so that it has access to just as many entries as the MACVLAN filters.

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 2f9be1665585a3757a00a6d1b8201d0ede937a34)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index b8ad73e1e962d390c44df2ce6416ae65937ae851..cc571a36bc48ad60e1e71e666d9d8874615a665a 100644 (file)
@@ -8194,7 +8194,10 @@ static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
 {
        /* guarantee we can provide a unique filter for the unicast address */
        if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr)) {
-               if (IXGBE_MAX_PF_MACVLANS <= netdev_uc_count(dev))
+               struct ixgbe_adapter *adapter = netdev_priv(dev);
+               u16 pool = VMDQ_P(0);
+
+               if (netdev_uc_count(dev) >= ixgbe_available_rars(adapter, pool))
                        return -ENOMEM;
        }