linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxgb4: use dev_port to identify ports
@ 2014-06-21 12:48 Thadeu Lima de Souza Cascardo
  2014-06-23  0:23 ` David Miller
  2014-06-25 23:08 ` Luis R. Rodriguez
  0 siblings, 2 replies; 6+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2014-06-21 12:48 UTC (permalink / raw)
  To: netdev; +Cc: hariprasad, linux-kernel, Thadeu Lima de Souza Cascardo

Commit 3f85944fe207d0225ef21a2c0951d4946fc9a95d ("net: Add sysfs file
for port number") introduce dev_port to network devices. cxgb4 adapters
have multiple ports on the same PCI function, and used dev_id to
identify those ports. That use was removed by commit
8c367fcbe6549195d2eb11e62bea233f811aad41 ("cxgb4: Do not set
net_device::dev_id to VI index"), since dev_id should be used only when
devices share the same MAC address.

Using dev_port for cxgb4 allows different ports on the same PCI function
to be identified.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
---
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index bba6768..931478e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -3962,6 +3962,7 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf)
 		p->lport = j;
 		p->rss_size = rss_size;
 		memcpy(adap->port[i]->dev_addr, addr, ETH_ALEN);
+		adap->port[i]->dev_port = j;
 
 		ret = ntohl(c.u.info.lstatus_to_modtype);
 		p->mdio_addr = (ret & FW_PORT_CMD_MDIOCAP) ?
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] cxgb4: use dev_port to identify ports
  2014-06-21 12:48 [PATCH] cxgb4: use dev_port to identify ports Thadeu Lima de Souza Cascardo
@ 2014-06-23  0:23 ` David Miller
  2014-06-23 12:16   ` Thadeu Lima de Souza Cascardo
  2014-06-25 23:08 ` Luis R. Rodriguez
  1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2014-06-23  0:23 UTC (permalink / raw)
  To: cascardo; +Cc: netdev, hariprasad, linux-kernel

From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Sat, 21 Jun 2014 09:48:08 -0300

> Commit 3f85944fe207d0225ef21a2c0951d4946fc9a95d ("net: Add sysfs file
> for port number") introduce dev_port to network devices. cxgb4 adapters
> have multiple ports on the same PCI function, and used dev_id to
> identify those ports. That use was removed by commit
> 8c367fcbe6549195d2eb11e62bea233f811aad41 ("cxgb4: Do not set
> net_device::dev_id to VI index"), since dev_id should be used only when
> devices share the same MAC address.
> 
> Using dev_port for cxgb4 allows different ports on the same PCI function
> to be identified.
> 
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>

You've made exactly zero effort to explain why the IPV6 issue carefully
explained in commit 8c367fcbe6549195d2eb11e62bea233f811aad41 no longer
applies.

As far as I can tell, it absolutely does, and therefore this change
here should not be made.

I'm not applying this patch, sorry.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cxgb4: use dev_port to identify ports
  2014-06-23  0:23 ` David Miller
@ 2014-06-23 12:16   ` Thadeu Lima de Souza Cascardo
  2014-06-25 23:02     ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2014-06-23 12:16 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, hariprasad, linux-kernel

On Sun, Jun 22, 2014 at 05:23:07PM -0700, David Miller wrote:
> From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> Date: Sat, 21 Jun 2014 09:48:08 -0300
> 
> > Commit 3f85944fe207d0225ef21a2c0951d4946fc9a95d ("net: Add sysfs file
> > for port number") introduce dev_port to network devices. cxgb4 adapters
> > have multiple ports on the same PCI function, and used dev_id to
> > identify those ports. That use was removed by commit
> > 8c367fcbe6549195d2eb11e62bea233f811aad41 ("cxgb4: Do not set
> > net_device::dev_id to VI index"), since dev_id should be used only when
> > devices share the same MAC address.
> > 
> > Using dev_port for cxgb4 allows different ports on the same PCI function
> > to be identified.
> > 
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> 
> You've made exactly zero effort to explain why the IPV6 issue carefully
> explained in commit 8c367fcbe6549195d2eb11e62bea233f811aad41 no longer
> applies.
> 
> As far as I can tell, it absolutely does, and therefore this change
> here should not be made.
> 
> I'm not applying this patch, sorry.
> 

I have set dev_port, not dev_id. This is not a revert of commit
8c367fcbe6549195d2eb11e62bea233f811aad41.

$ git grep dev_port net/ipv6/
$

I believe dev_port was introduced exactly to solve the problem dev_id
was incorrectly being used for.

Cascardo.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cxgb4: use dev_port to identify ports
  2014-06-23 12:16   ` Thadeu Lima de Souza Cascardo
@ 2014-06-25 23:02     ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2014-06-25 23:02 UTC (permalink / raw)
  To: cascardo; +Cc: netdev, hariprasad, linux-kernel

From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Date: Mon, 23 Jun 2014 09:16:40 -0300

> On Sun, Jun 22, 2014 at 05:23:07PM -0700, David Miller wrote:
>> From: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
>> Date: Sat, 21 Jun 2014 09:48:08 -0300
>> 
>> > Commit 3f85944fe207d0225ef21a2c0951d4946fc9a95d ("net: Add sysfs file
>> > for port number") introduce dev_port to network devices. cxgb4 adapters
>> > have multiple ports on the same PCI function, and used dev_id to
>> > identify those ports. That use was removed by commit
>> > 8c367fcbe6549195d2eb11e62bea233f811aad41 ("cxgb4: Do not set
>> > net_device::dev_id to VI index"), since dev_id should be used only when
>> > devices share the same MAC address.
>> > 
>> > Using dev_port for cxgb4 allows different ports on the same PCI function
>> > to be identified.
>> > 
>> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
>> 
>> You've made exactly zero effort to explain why the IPV6 issue carefully
>> explained in commit 8c367fcbe6549195d2eb11e62bea233f811aad41 no longer
>> applies.
>> 
>> As far as I can tell, it absolutely does, and therefore this change
>> here should not be made.
>> 
>> I'm not applying this patch, sorry.
>> 
> 
> I have set dev_port, not dev_id. This is not a revert of commit
> 8c367fcbe6549195d2eb11e62bea233f811aad41.
> 
> $ git grep dev_port net/ipv6/
> $
> 
> I believe dev_port was introduced exactly to solve the problem dev_id
> was incorrectly being used for.

Aha, that makes much more sense.  Thanks for explaining.

Applied, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cxgb4: use dev_port to identify ports
  2014-06-21 12:48 [PATCH] cxgb4: use dev_port to identify ports Thadeu Lima de Souza Cascardo
  2014-06-23  0:23 ` David Miller
@ 2014-06-25 23:08 ` Luis R. Rodriguez
  2014-06-26 12:37   ` Thadeu Lima de Souza Cascardo
  1 sibling, 1 reply; 6+ messages in thread
From: Luis R. Rodriguez @ 2014-06-25 23:08 UTC (permalink / raw)
  To: Thadeu Lima de Souza Cascardo; +Cc: netdev, Hariprasad Shenai, linux-kernel

On Sat, Jun 21, 2014 at 5:48 AM, Thadeu Lima de Souza Cascardo
<cascardo@linux.vnet.ibm.com> wrote:
> That use was removed by commit
> 8c367fcbe6549195d2eb11e62bea233f811aad41 ("cxgb4: Do not set
> net_device::dev_id to VI index"), since dev_id should be used only when
> devices share the same MAC address.
>
> Using dev_port for cxgb4 allows different ports on the same PCI function
> to be identified.

Can you describe what issues were introduced because of this then?

  Luis

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] cxgb4: use dev_port to identify ports
  2014-06-25 23:08 ` Luis R. Rodriguez
@ 2014-06-26 12:37   ` Thadeu Lima de Souza Cascardo
  0 siblings, 0 replies; 6+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2014-06-26 12:37 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: netdev, Hariprasad Shenai, linux-kernel

On Wed, Jun 25, 2014 at 04:08:21PM -0700, Luis R. Rodriguez wrote:
> On Sat, Jun 21, 2014 at 5:48 AM, Thadeu Lima de Souza Cascardo
> <cascardo@linux.vnet.ibm.com> wrote:
> > That use was removed by commit
> > 8c367fcbe6549195d2eb11e62bea233f811aad41 ("cxgb4: Do not set
> > net_device::dev_id to VI index"), since dev_id should be used only when
> > devices share the same MAC address.
> >
> > Using dev_port for cxgb4 allows different ports on the same PCI function
> > to be identified.
> 
> Can you describe what issues were introduced because of this then?
> 
>   Luis
> 

udevd builtin net-id cannot rename the interfaces, since it relies on
the dev_id for interfaces on the same PCI function. I am going to send a
patch to use dev_port instead, and fallback to dev_id, and copy netdev.

Regards.
Cascardo.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-26 12:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-21 12:48 [PATCH] cxgb4: use dev_port to identify ports Thadeu Lima de Souza Cascardo
2014-06-23  0:23 ` David Miller
2014-06-23 12:16   ` Thadeu Lima de Souza Cascardo
2014-06-25 23:02     ` David Miller
2014-06-25 23:08 ` Luis R. Rodriguez
2014-06-26 12:37   ` Thadeu Lima de Souza Cascardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).