Re: [PATCH] net/core: Save the port number a netdevice uses

2010-06-02 Thread Ben Hutchings
On Wed, 2010-05-26 at 02:16 -0700, David Miller wrote: From: Eli Cohen e...@dev.mellanox.co.il Date: Wed, 26 May 2010 12:08:52 +0300 So if I understand you correctly, you think that I should not bother to set a default value of 1. Each driver that cares about the value of this field,

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-06-02 Thread David Miller
From: Ben Hutchings bhutchi...@solarflare.com Date: Wed, 02 Jun 2010 17:42:29 +0100 On Wed, 2010-05-26 at 02:16 -0700, David Miller wrote: From: Eli Cohen e...@dev.mellanox.co.il Date: Wed, 26 May 2010 12:08:52 +0300 So if I understand you correctly, you think that I should not bother to

[PATCH] net/core: Save the port number a netdevice uses

2010-05-26 Thread Eli Cohen
Today, there are no means to know which port of a hardware device a netdev interface uses. This patch adds a new field to struct net_device that is used to store this value. The network driver should use the SET_NETDEV_PORT_NUM() macro to set the port number for the device it manages. For drivers

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-05-26 Thread David Miller
From: Eli Cohen e...@mellanox.co.il Date: Wed, 26 May 2010 11:17:02 +0300 Today, there are no means to know which port of a hardware device a netdev interface uses. This patch adds a new field to struct net_device that is used to store this value. The network driver should use the

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-05-26 Thread Eli Cohen
On Wed, May 26, 2010 at 01:39:26AM -0700, David Miller wrote: From: Eli Cohen e...@mellanox.co.il Date: Wed, 26 May 2010 11:17:02 +0300 Today, there are no means to know which port of a hardware device a netdev interface uses. This patch adds a new field to struct net_device that is

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-05-26 Thread David Miller
From: Eli Cohen e...@dev.mellanox.co.il Date: Wed, 26 May 2010 11:45:23 +0300 Do you think we should use dev_id also for the sysfs file name so every driver can choose to interpret this field as it chooses to, or should I keep the sysfs file name as port_number? What's wrong with using the

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-05-26 Thread Eli Cohen
On Wed, May 26, 2010 at 01:55:26AM -0700, David Miller wrote: From: Eli Cohen e...@dev.mellanox.co.il Date: Wed, 26 May 2010 11:45:23 +0300 What's wrong with using the existing dev_id sysfs file name and saying that it means the port number of the card? Nobody, and I really mean nobody,

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-05-26 Thread David Miller
From: Eli Cohen e...@dev.mellanox.co.il Date: Wed, 26 May 2010 12:08:52 +0300 So if I understand you correctly, you think that I should not bother to set a default value of 1. Each driver that cares about the value of this field, will set it however they want. I actually mean that the value 0

Re: [PATCH] net/core: Save the port number a netdevice uses

2010-05-26 Thread Eli Cohen
On Wed, May 26, 2010 at 02:16:35AM -0700, David Miller wrote: I actually mean that the value 0 should mean the first port, the value 1 should mean the second port, etc. OK, thanks for clarifying. I'll send a new patch soon. -- To unsubscribe from this list: send the line unsubscribe