Lines Matching refs:attr
75 static int sysfs_rtnl_lock(struct kobject *kobj, struct attribute *attr, in sysfs_rtnl_lock() argument
97 kn = sysfs_break_active_protection(kobj, attr); in sysfs_rtnl_lock()
129 struct device_attribute *attr, char *buf, in netdev_show() argument
150 struct device_attribute *attr, char *buf) \
152 return netdev_show(dev, attr, buf, format_##field); \
164 static ssize_t netdev_store(struct device *dev, struct device_attribute *attr, in netdev_store() argument
180 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in netdev_store()
195 netdev_lock_store(struct device *dev, struct device_attribute *attr, in netdev_lock_store() argument
231 static ssize_t iflink_show(struct device *dev, struct device_attribute *attr, in iflink_show() argument
246 struct device_attribute *attr, in name_assign_type_show() argument
253 ret = netdev_show(dev, attr, buf, format_name_assign_type); in name_assign_type_show()
260 static ssize_t address_show(struct device *dev, struct device_attribute *attr, in address_show() argument
279 struct device_attribute *attr, char *buf) in broadcast_show() argument
299 static ssize_t carrier_store(struct device *dev, struct device_attribute *attr, in carrier_store() argument
310 return netdev_store(dev, attr, buf, len, change_carrier); in carrier_store()
314 struct device_attribute *attr, char *buf) in carrier_show() argument
319 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in carrier_show()
339 struct device_attribute *attr, char *buf) in speed_show() argument
350 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in speed_show()
367 struct device_attribute *attr, char *buf) in duplex_show() argument
378 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in duplex_show()
409 struct device_attribute *attr, char *buf) in testing_show() argument
421 struct device_attribute *attr, char *buf) in dormant_show() argument
443 struct device_attribute *attr, char *buf) in operstate_show() argument
460 struct device_attribute *attr, in carrier_changes_show() argument
472 struct device_attribute *attr, in carrier_up_count_show() argument
482 struct device_attribute *attr, in carrier_down_count_show() argument
498 static ssize_t mtu_store(struct device *dev, struct device_attribute *attr, in mtu_store() argument
501 return netdev_store(dev, attr, buf, len, change_mtu); in mtu_store()
510 static ssize_t flags_store(struct device *dev, struct device_attribute *attr, in flags_store() argument
513 return netdev_store(dev, attr, buf, len, change_flags); in flags_store()
518 struct device_attribute *attr, in tx_queue_len_store() argument
524 return netdev_store(dev, attr, buf, len, dev_change_tx_queue_len); in tx_queue_len_store()
535 struct device_attribute *attr, in gro_flush_timeout_store() argument
541 return netdev_lock_store(dev, attr, buf, len, change_gro_flush_timeout); in gro_flush_timeout_store()
555 struct device_attribute *attr, in napi_defer_hard_irqs_store() argument
561 return netdev_lock_store(dev, attr, buf, len, in napi_defer_hard_irqs_store()
566 static ssize_t ifalias_store(struct device *dev, struct device_attribute *attr, in ifalias_store() argument
581 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in ifalias_store()
597 struct device_attribute *attr, char *buf) in ifalias_show() argument
616 static ssize_t group_store(struct device *dev, struct device_attribute *attr, in group_store() argument
619 return netdev_store(dev, attr, buf, len, change_group); in group_store()
630 struct device_attribute *attr, in proto_down_store() argument
633 return netdev_store(dev, attr, buf, len, change_proto_down); in proto_down_store()
638 struct device_attribute *attr, char *buf) in phys_port_id_show() argument
644 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in phys_port_id_show()
659 struct device_attribute *attr, char *buf) in phys_port_name_show() argument
665 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in phys_port_name_show()
680 struct device_attribute *attr, char *buf) in phys_switch_id_show() argument
686 ret = sysfs_rtnl_lock(&dev->kobj, &attr->attr, netdev); in phys_switch_id_show()
701 &dev_attr_phys_port_id.attr,
702 &dev_attr_phys_port_name.attr,
703 &dev_attr_phys_switch_id.attr,
708 struct attribute *attr, int index) in netdev_phys_is_visible() argument
713 if (attr == &dev_attr_phys_port_id.attr) { in netdev_phys_is_visible()
716 } else if (attr == &dev_attr_phys_port_name.attr) { in netdev_phys_is_visible()
720 } else if (attr == &dev_attr_phys_switch_id.attr) { in netdev_phys_is_visible()
726 return attr->mode; in netdev_phys_is_visible()
735 struct device_attribute *attr, char *buf) in threaded_show() argument
766 struct device_attribute *attr, in threaded_store() argument
769 return netdev_lock_store(dev, attr, buf, len, modify_napi_threaded); in threaded_store()
774 &dev_attr_netdev_group.attr,
775 &dev_attr_type.attr,
776 &dev_attr_dev_id.attr,
777 &dev_attr_dev_port.attr,
778 &dev_attr_iflink.attr,
779 &dev_attr_ifindex.attr,
780 &dev_attr_name_assign_type.attr,
781 &dev_attr_addr_assign_type.attr,
782 &dev_attr_addr_len.attr,
783 &dev_attr_link_mode.attr,
784 &dev_attr_address.attr,
785 &dev_attr_broadcast.attr,
786 &dev_attr_speed.attr,
787 &dev_attr_duplex.attr,
788 &dev_attr_dormant.attr,
789 &dev_attr_testing.attr,
790 &dev_attr_operstate.attr,
791 &dev_attr_carrier_changes.attr,
792 &dev_attr_ifalias.attr,
793 &dev_attr_carrier.attr,
794 &dev_attr_mtu.attr,
795 &dev_attr_flags.attr,
796 &dev_attr_tx_queue_len.attr,
797 &dev_attr_gro_flush_timeout.attr,
798 &dev_attr_napi_defer_hard_irqs.attr,
799 &dev_attr_proto_down.attr,
800 &dev_attr_carrier_up_count.attr,
801 &dev_attr_carrier_down_count.attr,
802 &dev_attr_threaded.attr,
809 struct device_attribute *attr, char *buf, in netstat_show() argument
832 struct device_attribute *attr, char *buf) \
834 return netstat_show(d, attr, buf, \
865 &dev_attr_rx_packets.attr,
866 &dev_attr_tx_packets.attr,
867 &dev_attr_rx_bytes.attr,
868 &dev_attr_tx_bytes.attr,
869 &dev_attr_rx_errors.attr,
870 &dev_attr_tx_errors.attr,
871 &dev_attr_rx_dropped.attr,
872 &dev_attr_tx_dropped.attr,
873 &dev_attr_multicast.attr,
874 &dev_attr_collisions.attr,
875 &dev_attr_rx_length_errors.attr,
876 &dev_attr_rx_over_errors.attr,
877 &dev_attr_rx_crc_errors.attr,
878 &dev_attr_rx_frame_errors.attr,
879 &dev_attr_rx_fifo_errors.attr,
880 &dev_attr_rx_missed_errors.attr,
881 &dev_attr_tx_aborted_errors.attr,
882 &dev_attr_tx_carrier_errors.attr,
883 &dev_attr_tx_fifo_errors.attr,
884 &dev_attr_tx_heartbeat_errors.attr,
885 &dev_attr_tx_window_errors.attr,
886 &dev_attr_rx_compressed.attr,
887 &dev_attr_tx_compressed.attr,
888 &dev_attr_rx_nohandler.attr,
925 container_of(_attr, struct rx_queue_attribute, attr)
929 static ssize_t rx_queue_attr_show(struct kobject *kobj, struct attribute *attr, in rx_queue_attr_show() argument
932 const struct rx_queue_attribute *attribute = to_rx_queue_attr(attr); in rx_queue_attr_show()
941 static ssize_t rx_queue_attr_store(struct kobject *kobj, struct attribute *attr, in rx_queue_attr_store() argument
944 const struct rx_queue_attribute *attribute = to_rx_queue_attr(attr); in rx_queue_attr_store()
1151 &rps_cpus_attribute.attr,
1152 &rps_dev_flow_table_cnt_attribute.attr,
1373 struct attribute attr; member
1374 ssize_t (*show)(struct kobject *kobj, struct attribute *attr,
1376 ssize_t (*store)(struct kobject *kobj, struct attribute *attr,
1381 container_of(_attr, struct netdev_queue_attribute, attr)
1386 struct attribute *attr, char *buf) in netdev_queue_attr_show() argument
1389 = to_netdev_queue_attr(attr); in netdev_queue_attr_show()
1395 return attribute->show(kobj, attr, queue, buf); in netdev_queue_attr_show()
1399 struct attribute *attr, in netdev_queue_attr_store() argument
1403 = to_netdev_queue_attr(attr); in netdev_queue_attr_store()
1409 return attribute->store(kobj, attr, queue, buf, count); in netdev_queue_attr_store()
1417 static ssize_t tx_timeout_show(struct kobject *kobj, struct attribute *attr, in tx_timeout_show() argument
1436 static ssize_t traffic_class_show(struct kobject *kobj, struct attribute *attr, in traffic_class_show() argument
1445 ret = sysfs_rtnl_lock(kobj, attr, queue->dev); in traffic_class_show()
1474 static ssize_t tx_maxrate_show(struct kobject *kobj, struct attribute *attr, in tx_maxrate_show() argument
1480 static ssize_t tx_maxrate_store(struct kobject *kobj, struct attribute *attr, in tx_maxrate_store() argument
1501 err = sysfs_rtnl_lock(kobj, attr, dev); in tx_maxrate_store()
1561 static ssize_t bql_show_hold_time(struct kobject *kobj, struct attribute *attr, in bql_show_hold_time() argument
1569 static ssize_t bql_set_hold_time(struct kobject *kobj, struct attribute *attr, in bql_set_hold_time() argument
1590 static ssize_t bql_show_stall_thrs(struct kobject *kobj, struct attribute *attr, in bql_show_stall_thrs() argument
1598 static ssize_t bql_set_stall_thrs(struct kobject *kobj, struct attribute *attr, in bql_set_stall_thrs() argument
1626 static ssize_t bql_show_stall_max(struct kobject *kobj, struct attribute *attr, in bql_show_stall_max() argument
1632 static ssize_t bql_set_stall_max(struct kobject *kobj, struct attribute *attr, in bql_set_stall_max() argument
1643 static ssize_t bql_show_stall_cnt(struct kobject *kobj, struct attribute *attr, in bql_show_stall_cnt() argument
1654 static ssize_t bql_show_inflight(struct kobject *kobj, struct attribute *attr, in bql_show_inflight() argument
1667 struct attribute *attr, \
1674 struct attribute *attr, \
1690 &bql_limit_attribute.attr,
1691 &bql_limit_max_attribute.attr,
1692 &bql_limit_min_attribute.attr,
1693 &bql_hold_time_attribute.attr,
1694 &bql_inflight_attribute.attr,
1695 &bql_stall_thrs_attribute.attr,
1696 &bql_stall_cnt_attribute.attr,
1697 &bql_stall_max_attribute.attr,
1761 static ssize_t xps_cpus_show(struct kobject *kobj, struct attribute *attr, in xps_cpus_show() argument
1773 ret = sysfs_rtnl_lock(kobj, attr, queue->dev); in xps_cpus_show()
1798 static ssize_t xps_cpus_store(struct kobject *kobj, struct attribute *attr, in xps_cpus_store() argument
1824 err = sysfs_rtnl_lock(kobj, attr, dev); in xps_cpus_store()
1841 static ssize_t xps_rxqs_show(struct kobject *kobj, struct attribute *attr, in xps_rxqs_show() argument
1850 ret = sysfs_rtnl_lock(kobj, attr, dev); in xps_rxqs_show()
1867 static ssize_t xps_rxqs_store(struct kobject *kobj, struct attribute *attr, in xps_rxqs_store() argument
1892 err = sysfs_rtnl_lock(kobj, attr, dev); in xps_rxqs_store()
1913 &queue_trans_timeout.attr,
1914 &queue_traffic_class.attr,
1916 &xps_cpus_attribute.attr,
1917 &xps_rxqs_attribute.attr,
1918 &queue_tx_maxrate.attr,