Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-11-04 Thread Sowmini Varadhan
On (11/02/15 14:57), Sowmini Varadhan wrote: > On (11/02/15 17:26), Nelson, Shannon wrote: > > > I assume you mean .1q > > > > Yes, this is what I had in mind. > > I dont think we're quite there yet, even without vlans. > Ok finally got all the .1q stuff verified (took a bit longer than it

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-11-02 Thread Sowmini Varadhan
On (11/02/15 17:26), Nelson, Shannon wrote: > > I assume you mean .1q > > Yes, this is what I had in mind. I dont think we're quite there yet, even without vlans. If I turn on/off tcpdump, there's something about the way that the link is bounced that leaves the device down while tcpdump is

RE: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-11-02 Thread Nelson, Shannon
> -Original Message- > From: Sowmini Varadhan [mailto:sowmini.varad...@oracle.com] > Sent: Sunday, November 01, 2015 4:07 PM > > On (11/01/15 21:03), Nelson, Shannon wrote: > > .. In the meantime, be sure to test what happens over a reset, such as > what > > happens when the MTU is

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-11-01 Thread Sowmini Varadhan
On (10/30/15 19:13), Sowmini Varadhan wrote: > > In looking at a couple other drivers, I see the difference being that > > they typically are writing the primary mac filter on probe (and any > > other reset), whereas the i40e "knows" that the default mac address is > > already set up as the filter

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-11-01 Thread Sowmini Varadhan
On (11/01/15 21:03), Nelson, Shannon wrote: > .. In the meantime, be sure to test what happens over a reset, such as what > happens when the MTU is changed. This will make sure that the replay > of mac and vlan filters happens correctly. You'll want to test this > with and without vlans. I

RE: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-11-01 Thread Nelson, Shannon
> -Original Message- > From: Sowmini Varadhan [mailto:sowmini.varad...@oracle.com] > Sent: Sunday, November 01, 2015 8:24 AM > [...] > So I figured out why it all "seemed to work" - my test env had another > obscure init process that was marking the link promiscuous. I guess > that was

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Sowmini Varadhan
On (10/30/15 22:03), Nelson, Shannon wrote: > The more common idiom in our driver would be > > err = i40e_get_platform_mac_addr(..); > if (err) { Ok. > Have you tested this beyond a compile? > Do you have a DT model to try this against? yes. > In looking at a couple other drivers,

[PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Sowmini Varadhan
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. Reviewed-by: Martin K. Petersen

RE: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Nelson, Shannon
> -Original Message- > From: Sowmini Varadhan [mailto:sowmini.varad...@oracle.com] > Sent: Friday, October 30, 2015 12:25 PM > > On (10/30/15 18:57), Nelson, Shannon wrote: > > > > > > > > Going along with this being the equivalent of the ixgbe patch, I'd > > > > prefer the new code to

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Sowmini Varadhan
On (10/30/15 18:57), Nelson, Shannon wrote: > > > > > > Going along with this being the equivalent of the ixgbe patch, I'd > > > prefer the new code to be in i40e_main.c, rather than in i40e_common.c. > > > In the design of our drivers, the common file is essentially a device > > > specific layer,

RE: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Nelson, Shannon
> -Original Message- > From: Sowmini Varadhan [mailto:sowmini.varad...@oracle.com] > Sent: Friday, October 30, 2015 11:37 AM > To: > Subject: Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or > IDPROM > > On (10/30/15 18:28), Nelson, Shannon wr

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Sowmini Varadhan
On (10/30/15 20:06), Andy Shevchenko wrote: > > > +#include "i40e.h" > > Why do you need this one exactly? I needed it to find pf->pdev below. > > + struct device_node *dp = pci_device_to_OF_node(pf->pdev); Without it, you will get: : CC [M]

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Sowmini Varadhan
On (10/30/15 18:28), Nelson, Shannon wrote: > > Going along with this being the equivalent of the ixgbe patch, I'd > prefer the new code to be in i40e_main.c, rather than in i40e_common.c. > In the design of our drivers, the common file is essentially a device > specific layer, and the OS and

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Andy Shevchenko
On Fri, Oct 30, 2015 at 5:03 PM, Sowmini Varadhan wrote: > > 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

Re: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Andy Shevchenko
On Fri, Oct 30, 2015 at 8:12 PM, Sowmini Varadhan wrote: > On (10/30/15 20:06), Andy Shevchenko wrote: >> >> > +#include "i40e.h" >> >> Why do you need this one exactly? > > I needed it to find pf->pdev below. > >> > + struct device_node *dp =

RE: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM

2015-10-30 Thread Nelson, Shannon
> -Original Message- > From: Sowmini Varadhan [mailto:sowmini.varad...@oracle.com] > Sent: Friday, October 30, 2015 8:04 AM > To: > Subject: [PATCH v3 net] i40e: Look up MAC address in Open Firmware or IDPROM > > > This is the i40e equivalent of commit c762dff24