From: Shannon Nelson <hidden> Date: 2017-06-21 16:09:52
The first patch gets some driver-specific information available for
use by the LDom management utilities through the drvinfo service: the
lowlevel vio version into firmware-version field, and, most importantly,
the remote-mac address into the bus-info field.
When creating the LDoms and their network connections, there currently
isn't a good way to match the vif netdev to the client LDom that it
services. By having the vif device print the remote-mac address from
the mdesc used to build the connection, the userland tools can correlate
which vif services which LDom.
There was some discussion about adding a 'remote-mac' element into the
/sys/class/net/<dev>/ model, but our thinking was that this might be
too specific to our devices and not fit well into the general model.
We're open to going back to that if others in the community think it
would be a better place for this data.
The second patch implements the get_settings service. This might seem
moot as these primarily describe a hardware port connection which doesn't
make much sense in a virtualized network connection. However, there are a
couple of userland LDom management tools that work better if this data is
filled out. One specific example is that the /sys/class/net/<dev>/speed
attribute becomes readable.
Shannon Nelson (2):
ldmvsw: add vio version and remote-mac to ethtool info
sunvnet: implement basic ethtool get_settings
drivers/net/ethernet/sun/ldmvsw.c | 8 ++++++++
drivers/net/ethernet/sun/sunvnet.c | 1 +
drivers/net/ethernet/sun/sunvnet_common.c | 11 +++++++++++
drivers/net/ethernet/sun/sunvnet_common.h | 2 ++
4 files changed, 22 insertions(+), 0 deletions(-)
From: Shannon Nelson <hidden> Date: 2017-06-21 16:09:53
In the ethtool -i output print the vio version and the remote-mac
of the ldom that the vif device is serving as this vif info is
not exposed elsewhere. The remote-mac address is most useful for
tracking which client ldom is being served by the vif.
Orabug: 26316362
Signed-off-by: Shannon Nelson <redacted>
---
drivers/net/ethernet/sun/ldmvsw.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
From: Shannon Nelson <hidden> Date: 2017-06-21 17:59:40
Add the get_settings callback so that both the ldmvsw and sunvnet
drivers will give a little more information when asked for its
basic settings. These aren't necessarily very useful, but they
make some users happier. Also, a side effect is that the speed
attribute in /sys/class/net/<dev> is now readable, which makes
a couple of the ldom management tools happier.
Orabug: 26175474
Signed-off-by: Shannon Nelson <redacted>
---
drivers/net/ethernet/sun/ldmvsw.c | 1 +
drivers/net/ethernet/sun/sunvnet.c | 1 +
drivers/net/ethernet/sun/sunvnet_common.c | 11 +++++++++++
drivers/net/ethernet/sun/sunvnet_common.h | 2 ++
4 files changed, 15 insertions(+), 0 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2017-06-21 19:05:46
From: Shannon Nelson <redacted>
Date: Wed, 21 Jun 2017 09:09:53 -0700
In the ethtool -i output print the vio version and the remote-mac
of the ldom that the vif device is serving as this vif info is
not exposed elsewhere. The remote-mac address is most useful for
tracking which client ldom is being served by the vif.
Orabug: 26316362
Signed-off-by: Shannon Nelson <redacted>
Although less useful, it is exposed already via the kernel logs.
Also, this is not at all an appropriate place to expose this. The
"driver info" ethtool command is not a place to post per-connection
or per-link information.
Probably one of the IFLA_* netlink attributes would work best for
this. You could even use PHYS_PORT_ID for this, which gives you
32 bytes to work with.
From: David Miller <davem@davemloft.net> Date: 2017-06-21 19:06:34
From: Shannon Nelson <redacted>
Date: Wed, 21 Jun 2017 09:09:54 -0700
Add the get_settings callback so that both the ldmvsw and sunvnet
drivers will give a little more information when asked for its
basic settings. These aren't necessarily very useful, but they
make some users happier. Also, a side effect is that the speed
attribute in /sys/class/net/<dev> is now readable, which makes
a couple of the ldom management tools happier.
Orabug: 26175474
Signed-off-by: Shannon Nelson <redacted>
I would set the speed to something other than zero, and also
consider the ramifications of this change upon things like
'bonding' and 'team'.
From: Shannon Nelson <hidden> Date: 2017-06-21 20:59:35
On 6/21/2017 12:05 PM, David Miller wrote:
From: Shannon Nelson <redacted>
Date: Wed, 21 Jun 2017 09:09:53 -0700
quoted
In the ethtool -i output print the vio version and the remote-mac
of the ldom that the vif device is serving as this vif info is
not exposed elsewhere. The remote-mac address is most useful for
tracking which client ldom is being served by the vif.
Orabug: 26316362
Signed-off-by: Shannon Nelson <redacted>
Although less useful, it is exposed already via the kernel logs.
I had thought about that, but the idea of parsing kernel logs that could expire away didn't thrill me.
Also, this is not at all an appropriate place to expose this. The
"driver info" ethtool command is not a place to post per-connection
or per-link information.
I knew it was a bit of a stretch, but almost made sense. However, I'd still like to put the vio version here - is that acceptable?
Probably one of the IFLA_* netlink attributes would work best for
this. You could even use PHYS_PORT_ID for this, which gives you
32 bytes to work with.
Hmmm - good thought. I'll go poke at this and see what I can come up with. I gather from this that you agree that /sys is not the right place for this information, either.
Thanks,
sln
From: Shannon Nelson <hidden> Date: 2017-06-21 20:59:45
On 6/21/2017 12:06 PM, David Miller wrote:
From: Shannon Nelson <redacted>
Date: Wed, 21 Jun 2017 09:09:54 -0700
quoted
Add the get_settings callback so that both the ldmvsw and sunvnet
drivers will give a little more information when asked for its
basic settings. These aren't necessarily very useful, but they
make some users happier. Also, a side effect is that the speed
attribute in /sys/class/net/<dev> is now readable, which makes
a couple of the ldom management tools happier.
Orabug: 26175474
Signed-off-by: Shannon Nelson <redacted>
I would set the speed to something other than zero, and also
I kept looking at that and wasn't sure which value to pretend with. I looked at what was reported in the Solaris world and saw '0' so went with that. I suppose using SPEED_10000 shouldn't hurt anything, and is close enough to observed client-to-client speeds.
consider the ramifications of this change upon things like
'bonding' and 'team'.
The request I was responding to with this was really more targeted at the ldmvsw (host) side of the connection, the vif device, which I believe only ever gets connected to the vsw bridge. You're right, tho', because the eth0 in the ldom client *does* get sucked into teams. I may drop the sunvnet/client side of this patch and stick with just the host/ldmvsw side.
Thanks,
sln
From: David Miller <davem@davemloft.net> Date: 2017-06-21 21:27:43
From: Shannon Nelson <redacted>
Date: Wed, 21 Jun 2017 13:59:35 -0700
On 6/21/2017 12:05 PM, David Miller wrote:
quoted
Also, this is not at all an appropriate place to expose this. The
"driver info" ethtool command is not a place to post per-connection
or per-link information.
I knew it was a bit of a stretch, but almost made sense. However, I'd
still like to put the vio version here - is that acceptable?
That part is fine.
quoted
Probably one of the IFLA_* netlink attributes would work best for
this. You could even use PHYS_PORT_ID for this, which gives you
32 bytes to work with.
Hmmm - good thought. I'll go poke at this and see what I can come up
with. I gather from this that you agree that /sys is not the right
place for this information, either.
From: David Miller <davem@davemloft.net> Date: 2017-06-21 21:28:46
From: Shannon Nelson <redacted>
Date: Wed, 21 Jun 2017 13:59:45 -0700
On 6/21/2017 12:06 PM, David Miller wrote:
quoted
From: Shannon Nelson <redacted>
Date: Wed, 21 Jun 2017 09:09:54 -0700
quoted
Add the get_settings callback so that both the ldmvsw and sunvnet
drivers will give a little more information when asked for its
basic settings. These aren't necessarily very useful, but they
make some users happier. Also, a side effect is that the speed
attribute in /sys/class/net/<dev> is now readable, which makes
a couple of the ldom management tools happier.
Orabug: 26175474
Signed-off-by: Shannon Nelson <redacted>
I would set the speed to something other than zero, and also
I kept looking at that and wasn't sure which value to pretend with. I
looked at what was reported in the Solaris world and saw '0' so went
with that. I suppose using SPEED_10000 shouldn't hurt anything, and
is close enough to observed client-to-client speeds.
quoted
consider the ramifications of this change upon things like
'bonding' and 'team'.
The request I was responding to with this was really more targeted at
the ldmvsw (host) side of the connection, the vif device, which I
believe only ever gets connected to the vsw bridge. You're right,
tho', because the eth0 in the ldom client *does* get sucked into
teams. I may drop the sunvnet/client side of this patch and stick
with just the host/ldmvsw side.
Usually if possible you propagate the speed of the underlying physical
layer, if applicable.
You can see what some other software devices do in the case of ethtool
link speed settings.