OSDN Git Service

i40e: Able to add up to 16 MAC filters on an untrusted VF
authorAdam Ludkiewicz <adam.ludkiewicz@intel.com>
Wed, 6 Feb 2019 23:08:25 +0000 (15:08 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 16 Apr 2019 22:11:08 +0000 (15:11 -0700)
This patch fixes the problem with the driver being able to add only 7
multicast MAC address filters instead of 16. The problem is fixed by
changing the maximum number of MAC address filters to 16+1+1 (two extra
are needed because the driver uses 1 for unicast MAC address and 1 for
broadcast).

Signed-off-by: Adam Ludkiewicz <adam.ludkiewicz@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 831d52b..71cd159 100644 (file)
@@ -2454,8 +2454,10 @@ error_param:
                                      (u8 *)&stats, sizeof(stats));
 }
 
-/* If the VF is not trusted restrict the number of MAC/VLAN it can program */
-#define I40E_VC_MAX_MAC_ADDR_PER_VF 12
+/* If the VF is not trusted restrict the number of MAC/VLAN it can program
+ * MAC filters: 16 for multicast, 1 for MAC, 1 for broadcast
+ */
+#define I40E_VC_MAX_MAC_ADDR_PER_VF (16 + 1 + 1)
 #define I40E_VC_MAX_VLAN_PER_VF 8
 
 /**