Loading Documentation/ABI/testing/sysfs-class-net +13 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,19 @@ Description: authentication is performed (e.g: 802.1x). 'link_mode' attribute will also reflect the dormant state. What: /sys/class/net/<iface>/testing Date: April 2002 KernelVersion: 5.8 Contact: netdev@vger.kernel.org Description: Indicates whether the interface is under test. Possible values are: 0: interface is not being tested 1: interface is being tested When an interface is under test, it cannot be expected to pass packets as normal. What: /sys/clas/net/<iface>/duplex Date: October 2009 KernelVersion: 2.6.33 Loading net/core/net-sysfs.c +14 −1 Original line number Diff line number Diff line Loading @@ -243,6 +243,18 @@ static ssize_t duplex_show(struct device *dev, } static DEVICE_ATTR_RO(duplex); static ssize_t testing_show(struct device *dev, struct device_attribute *attr, char *buf) { struct net_device *netdev = to_net_dev(dev); if (netif_running(netdev)) return sprintf(buf, fmt_dec, !!netif_testing(netdev)); return -EINVAL; } static DEVICE_ATTR_RO(testing); static ssize_t dormant_show(struct device *dev, struct device_attribute *attr, char *buf) { Loading @@ -260,7 +272,7 @@ static const char *const operstates[] = { "notpresent", /* currently unused */ "down", "lowerlayerdown", "testing", /* currently unused */ "testing", "dormant", "up" }; Loading Loading @@ -524,6 +536,7 @@ static struct attribute *net_class_attrs[] __ro_after_init = { &dev_attr_speed.attr, &dev_attr_duplex.attr, &dev_attr_dormant.attr, &dev_attr_testing.attr, &dev_attr_operstate.attr, &dev_attr_carrier_changes.attr, &dev_attr_ifalias.attr, Loading Loading
Documentation/ABI/testing/sysfs-class-net +13 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,19 @@ Description: authentication is performed (e.g: 802.1x). 'link_mode' attribute will also reflect the dormant state. What: /sys/class/net/<iface>/testing Date: April 2002 KernelVersion: 5.8 Contact: netdev@vger.kernel.org Description: Indicates whether the interface is under test. Possible values are: 0: interface is not being tested 1: interface is being tested When an interface is under test, it cannot be expected to pass packets as normal. What: /sys/clas/net/<iface>/duplex Date: October 2009 KernelVersion: 2.6.33 Loading
net/core/net-sysfs.c +14 −1 Original line number Diff line number Diff line Loading @@ -243,6 +243,18 @@ static ssize_t duplex_show(struct device *dev, } static DEVICE_ATTR_RO(duplex); static ssize_t testing_show(struct device *dev, struct device_attribute *attr, char *buf) { struct net_device *netdev = to_net_dev(dev); if (netif_running(netdev)) return sprintf(buf, fmt_dec, !!netif_testing(netdev)); return -EINVAL; } static DEVICE_ATTR_RO(testing); static ssize_t dormant_show(struct device *dev, struct device_attribute *attr, char *buf) { Loading @@ -260,7 +272,7 @@ static const char *const operstates[] = { "notpresent", /* currently unused */ "down", "lowerlayerdown", "testing", /* currently unused */ "testing", "dormant", "up" }; Loading Loading @@ -524,6 +536,7 @@ static struct attribute *net_class_attrs[] __ro_after_init = { &dev_attr_speed.attr, &dev_attr_duplex.attr, &dev_attr_dormant.attr, &dev_attr_testing.attr, &dev_attr_operstate.attr, &dev_attr_carrier_changes.attr, &dev_attr_ifalias.attr, Loading