Skip to contentSkip to conversation

Please revert removal of /sys/class/net/*/features

DISCUSSION Stephen Hemminger 5 participants 6 messages Apr 10, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This commit needs to be reverted. It removed an available sysfs file, and sysfs files are part of the ABI. It caused a bug in our current release of Vyatta because the shell script was using the sysfs file to see if VLAN was supported on a device.

An API maybe redundant, but you can't just remove it.

commit 974151e6119f20d2af4acb97526c780ae0f18ccb

Author: Michał Mirosław <[email protected]>
Date:   Thu Jul 14 14:45:15 2011 -0700

net: remove /sys/class/net/*/features

The same information and more can be obtained by using ethtool with ETHTOOL_GFEATURES.

maintainer
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Tue, 10 Apr 2012 11:08:51 -0700

Quoted 5 lines

This commit needs to be reverted. It removed an available sysfs file, and sysfs files are part of the ABI. It caused a bug in our current release of Vyatta because the shell script was using the sysfs file to see if VLAN was supported on a device.

An API maybe redundant, but you can't just remove it.

I think it's more about representability with an expanded netdev_features_t type.

#2 lore raw
In reply to Stephen Hemminger
Quoted 3 lines · Stephen Hemminger

This commit needs to be reverted. It removed an available sysfs file, and sysfs files are part of the ABI. It caused a bug in our current release of Vyatta because the shell script was using the sysfs file to see if VLAN was supported on a device.

It's a hack, but you can also make some vlan IOCTL calls to a device to probe if it's VLAN or not..thats what I've been doing for the last decade or so :)

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#3 lore raw
In reply to Stephen Hemminger
Quoted 5 lines · Stephen Hemminger

This commit needs to be reverted. It removed an available sysfs file, and sysfs files are part of the ABI. It caused a bug in our current release of Vyatta because the shell script was using the sysfs file to see if VLAN was supported on a device.

An API maybe redundant, but you can't just remove it.

There was a discussion about it before the patch was accepted. It was concluded that due to features flags changes, the /sys/class/net/*/features was never a stable API.

Best Regards,
Michał Mirosław

#4 lore raw
Quoted 10 lines · Michał Mirosław
Quoted 5 lines · Stephen Hemminger

This commit needs to be reverted. It removed an available sysfs file, and sysfs files are part of the ABI. It caused a bug in our current release of Vyatta because the shell script was using the sysfs file to see if VLAN was supported on a device.

An API maybe redundant, but you can't just remove it.

There was a discussion about it before the patch was accepted. It was concluded that due to features flags changes, the /sys/class/net/*/features was never a stable API.

For reference:
http://thread.gmane.org/gmane.linux.network/199115/focus=199136

But note that the VLAN-related feature flags never actually changed value.

Ben.

Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
#5 lore raw
Quoted 12 lines · On Tue, 10 Apr 2012 21:25:47 +0100 Ben Hutchings <[email protected]>…
Quoted 10 lines · Michał Mirosław
Quoted 5 lines · Stephen Hemminger

This commit needs to be reverted. It removed an available sysfs file, and sysfs files are part of the ABI. It caused a bug in our current release of Vyatta because the shell script was using the sysfs file to see if VLAN was supported on a device.

An API maybe redundant, but you can't just remove it.

There was a discussion about it before the patch was accepted. It was concluded that due to features flags changes, the /sys/class/net/*/features was never a stable API.

Quoted 8 lines

For reference:
http://thread.gmane.org/gmane.linux.network/199115/focus=199136

But note that the VLAN-related feature flags never actually changed value.

Ben.

It is actually not a big deal for our product since 3.3 is really early in development cycle and the script can be fixed in that release. Also, we release an image with utilities, scripts and kernel in one release, and don't have to support running new kernels with older userspace.

I am more worried that other people might be hit
the same thing. What about a patch to keep the old flags values available for backwards compatiablity. Also, when removing a sysfs file, shouldn't the documented feature removal process be used?