i40e: properly add VF MAC addresses
authorMitch Williams <mitch.a.williams@intel.com>
Sat, 16 Nov 2013 10:00:41 +0000 (10:00 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 6 Dec 2013 07:13:00 +0000 (23:13 -0800)
The code that added new MAC addresses from the VFs did not, in
fact, work. Due to inverse logic, the only addresses that could
be added were addresses that already had been added.

Change-Id: Idce9169bd2f36e2c5ee10b130587a65705465d31
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index d98cc9b351f928e36fcb603855076351f445c20b..59973012c35de93c26252ba30169852c1ea18a5a 100644 (file)
@@ -1603,7 +1603,7 @@ static int i40e_vc_add_mac_addr_msg(struct i40e_vf *vf, u8 *msg, u16 msglen)
                struct i40e_mac_filter *f;
 
                f = i40e_find_mac(vsi, al->list[i].addr, true, false);
-               if (f) {
+               if (!f) {
                        if (i40e_is_vsi_in_vlan(vsi))
                                f = i40e_put_mac_in_vlan(vsi, al->list[i].addr,
                                                         true, false);