lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 4 Nov 2015 23:01:37 +0000 From: "Nelson, Shannon" <shannon.nelson@...el.com> To: Sowmini Varadhan <sowmini.varadhan@...cle.com>, "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> CC: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>, "Brandeburg, Jesse" <jesse.brandeburg@...el.com>, "Wyborny, Carolyn" <carolyn.wyborny@...el.com>, "Skidmore, Donald C" <donald.c.skidmore@...el.com>, "Vick, Matthew" <matthew.vick@...el.com>, "Ronciak, John" <john.ronciak@...el.com>, "Williams, Mitch A" <mitch.a.williams@...el.com>, "andy.shevchenko@...il.com" <andy.shevchenko@...il.com> Subject: RE: [PATCH v5] i40e: Look up MAC address in Open Firmware or IDPROM > From: Sowmini Varadhan [mailto:sowmini.varadhan@...cle.com] > Sent: Wednesday, November 04, 2015 11:40 AM > > > 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. > > Reviewed-by: Martin K. Petersen <martin.petersen@...cle.com> > Signed-off-by: Sowmini Varadhan <sowmini.varadhan@...cle.com> > --- > v2, v3: Andy Shevchenko comments > v4: Shannon Nelson review: explicitly set up mac filters before > register_netdev > v5: Shannon Nelson code style comments > > drivers/net/ethernet/intel/i40e/i40e_main.c | 84 > ++++++++++++++++++++++++++- > 1 files changed, 83 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c > b/drivers/net/ethernet/intel/i40e/i40e_main.c > index b825f97..a3883cf 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c > @@ -24,6 +24,15 @@ > * > > ************************************************************************** > ****/ > > +#include <linux/etherdevice.h> > +#include <linux/of_net.h> > +#include <linux/pci.h> > + > +#ifdef CONFIG_SPARC > +#include <asm/idprom.h> > +#include <asm/prom.h> > +#endif > + > /* Local includes */ > #include "i40e.h" > #include "i40e_diag.h" > @@ -9213,6 +9222,44 @@ static struct i40e_vsi > *i40e_vsi_reinit_setup(struct i40e_vsi *vsi) > } > > /** > + * i40e_macaddr_init - explicitly write the mac address filters. This > + * is needed when the macaddr has been obtained by other means than > + * the default, e.g., from Open Firmware or IDPROM. Note that this should be a simple single line, function name and short summary; anything more detailed goes into a description after the variables. [...] > > /** > + * i40e_get_platform_mac_addr - get mac address from Open Firmware > + * or IDPROM if supported by the platform Again, single line. Thanks for your work on this, Sowmini. If you can do a quick repost with these little function header comment bits tweaked, I'm willing to ACK this patch and I think we'll be ready for Jeff to include it into his tree. sln -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists