Skip to contentSkip to conversation

bar

PATCH Sowmini Varadhan 1 participant 1 message Dec 4, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

This is the i40e equivalent of commit c762dff24c06 ("ixgbe: Look up MAC address in Open Firmware or IDPROM").

As with that fix, attempt to look up the MAC address in Open Firmware on systems that support it, and use IDPROM on SPARC if no OF address is found.

In the case of the i40e there is an assumption that the default mac address has already been set up as the primary mac filter on probe, so if this filter is obtained from the Open Firmware or IDPROM, an explicit write is needed via i40e_aq_mac_address_write() and i40e_aq_add_macvlan() invocation.

The is_default_mac field in the platform-private i40e_pf structure tracks whether the mac address was default or not, and in the latter case, will trigger the calls to i40e_aq_mac_address_write() and i40e_aq_add_macvlan().

---
v2, v3: Andy Shevchenko comments
v4: Shannon Nelson review: explicitly set up mac filters before register_netdev
v5: Shannon Nelson code style comments
v6: Shannon Nelson code style comments
v7: Ensure that i40e_macaddr_init() is called only for VSI_MAIN, and only
if the mac address is not the default. Some additional code-refactoring based on comments from Shannon Nelson

 drivers/net/ethernet/intel/i40e/i40e.h      |    2 +
 drivers/net/ethernet/intel/i40e/i40e_main.c |   87 +++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 0 deletions(-)
drivers/net/ethernet/intel/i40e/i40e.h +2 -0
index 0b9537b..6d41757 100644
@@ -420,6 +420,8 @@ struct i40e_pf {
 
 	u32 ioremap_len;
 	u32 fd_inv;
+
+	u32 is_default_mac:1;
 };
 
 struct i40e_mac_filter {
drivers/net/ethernet/intel/i40e/i40e_main.c +87 -0

117 lines not on this page · raw message

Signature · 1 line
1.7.1