• Home
  • Raw
  • Download

Lines Matching refs:buf

42 			   struct device_attribute *attr, char *buf,  in netdev_show()  argument
50 ret = (*format)(ndev, buf); in netdev_show()
58 static ssize_t format_##field(const struct net_device *dev, char *buf) \
60 return sprintf(buf, format_string, dev->field); \
63 struct device_attribute *attr, char *buf) \
65 return netdev_show(dev, attr, buf, format_##field); \
78 const char *buf, size_t len, in netdev_store() argument
89 ret = kstrtoul(buf, 0, &new); in netdev_store()
115 char *buf) in iflink_show() argument
119 return sprintf(buf, fmt_dec, dev_get_iflink(ndev)); in iflink_show()
123 static ssize_t format_name_assign_type(const struct net_device *dev, char *buf) in format_name_assign_type() argument
125 return sprintf(buf, fmt_dec, dev->name_assign_type); in format_name_assign_type()
130 char *buf) in name_assign_type_show() argument
136 ret = netdev_show(dev, attr, buf, format_name_assign_type); in name_assign_type_show()
144 char *buf) in address_show() argument
151 ret = sysfs_format_mac(buf, ndev->dev_addr, ndev->addr_len); in address_show()
158 struct device_attribute *attr, char *buf) in broadcast_show() argument
163 return sysfs_format_mac(buf, ndev->broadcast, ndev->addr_len); in broadcast_show()
176 const char *buf, size_t len) in carrier_store() argument
186 return netdev_store(dev, attr, buf, len, change_carrier); in carrier_store()
190 struct device_attribute *attr, char *buf) in carrier_show() argument
195 return sprintf(buf, fmt_dec, !!netif_carrier_ok(netdev)); in carrier_show()
202 struct device_attribute *attr, char *buf) in speed_show() argument
220 ret = sprintf(buf, fmt_dec, cmd.base.speed); in speed_show()
228 struct device_attribute *attr, char *buf) in duplex_show() argument
259 ret = sprintf(buf, "%s\n", duplex); in duplex_show()
268 struct device_attribute *attr, char *buf) in testing_show() argument
273 return sprintf(buf, fmt_dec, !!netif_testing(netdev)); in testing_show()
280 struct device_attribute *attr, char *buf) in dormant_show() argument
285 return sprintf(buf, fmt_dec, !!netif_dormant(netdev)); in dormant_show()
302 struct device_attribute *attr, char *buf) in operstate_show() argument
316 return sprintf(buf, "%s\n", operstates[operstate]); in operstate_show()
322 char *buf) in carrier_changes_show() argument
326 return sprintf(buf, fmt_dec, in carrier_changes_show()
334 char *buf) in carrier_up_count_show() argument
338 return sprintf(buf, fmt_dec, atomic_read(&netdev->carrier_up_count)); in carrier_up_count_show()
344 char *buf) in carrier_down_count_show() argument
348 return sprintf(buf, fmt_dec, atomic_read(&netdev->carrier_down_count)); in carrier_down_count_show()
360 const char *buf, size_t len) in mtu_store() argument
362 return netdev_store(dev, attr, buf, len, change_mtu); in mtu_store()
372 const char *buf, size_t len) in flags_store() argument
374 return netdev_store(dev, attr, buf, len, change_flags); in flags_store()
380 const char *buf, size_t len) in tx_queue_len_store() argument
385 return netdev_store(dev, attr, buf, len, dev_change_tx_queue_len); in tx_queue_len_store()
397 const char *buf, size_t len) in gro_flush_timeout_store() argument
402 return netdev_store(dev, attr, buf, len, change_gro_flush_timeout); in gro_flush_timeout_store()
414 const char *buf, size_t len) in napi_defer_hard_irqs_store() argument
419 return netdev_store(dev, attr, buf, len, change_napi_defer_hard_irqs); in napi_defer_hard_irqs_store()
424 const char *buf, size_t len) in ifalias_store() argument
435 if (len > 0 && buf[len - 1] == '\n') in ifalias_store()
442 ret = dev_set_alias(netdev, buf, count); in ifalias_store()
455 struct device_attribute *attr, char *buf) in ifalias_show() argument
463 ret = sprintf(buf, "%s\n", tmp); in ifalias_show()
475 const char *buf, size_t len) in group_store() argument
477 return netdev_store(dev, attr, buf, len, change_group); in group_store()
489 const char *buf, size_t len) in proto_down_store() argument
499 return netdev_store(dev, attr, buf, len, change_proto_down); in proto_down_store()
504 struct device_attribute *attr, char *buf) in phys_port_id_show() argument
523 ret = sprintf(buf, "%*phN\n", ppid.id_len, ppid.id); in phys_port_id_show()
532 struct device_attribute *attr, char *buf) in phys_port_name_show() argument
552 ret = sprintf(buf, "%s\n", name); in phys_port_name_show()
561 struct device_attribute *attr, char *buf) in phys_switch_id_show() argument
582 ret = sprintf(buf, "%*phN\n", ppid.id_len, ppid.id); in phys_switch_id_show()
628 struct device_attribute *attr, char *buf, in netstat_show() argument
642 ret = sprintf(buf, fmt_u64, *(u64 *)(((u8 *)stats) + offset)); in netstat_show()
651 struct device_attribute *attr, char *buf) \
653 return netstat_show(d, attr, buf, \
738 char *buf) in rx_queue_attr_show() argument
746 return attribute->show(queue, buf); in rx_queue_attr_show()
750 const char *buf, size_t count) in rx_queue_attr_store() argument
758 return attribute->store(queue, buf, count); in rx_queue_attr_store()
767 static ssize_t show_rps_map(struct netdev_rx_queue *queue, char *buf) in show_rps_map() argument
782 len = snprintf(buf, PAGE_SIZE, "%*pb\n", cpumask_pr_args(mask)); in show_rps_map()
790 const char *buf, size_t len) in store_rps_map() argument
803 err = bitmap_parse(buf, len, cpumask_bits(mask), nr_cpumask_bits); in store_rps_map()
857 char *buf) in show_rps_dev_flow_table_cnt() argument
868 return sprintf(buf, "%lu\n", val); in show_rps_dev_flow_table_cnt()
879 const char *buf, size_t len) in store_rps_dev_flow_table_cnt() argument
889 rc = kstrtoul(buf, 0, &count); in store_rps_dev_flow_table_cnt()
1121 ssize_t (*show)(struct netdev_queue *queue, char *buf);
1123 const char *buf, size_t len);
1131 struct attribute *attr, char *buf) in netdev_queue_attr_show() argument
1140 return attribute->show(queue, buf); in netdev_queue_attr_show()
1145 const char *buf, size_t count) in netdev_queue_attr_store() argument
1154 return attribute->store(queue, buf, count); in netdev_queue_attr_store()
1162 static ssize_t tx_timeout_show(struct netdev_queue *queue, char *buf) in tx_timeout_show() argument
1170 return sprintf(buf, fmt_ulong, trans_timeout); in tx_timeout_show()
1185 char *buf) in traffic_class_show() argument
1210 return dev->num_tc < 0 ? sprintf(buf, "%d%d\n", tc, dev->num_tc) : in traffic_class_show()
1211 sprintf(buf, "%d\n", tc); in traffic_class_show()
1216 char *buf) in tx_maxrate_show() argument
1218 return sprintf(buf, "%lu\n", queue->tx_maxrate); in tx_maxrate_show()
1222 const char *buf, size_t len) in tx_maxrate_store() argument
1237 err = kstrtou32(buf, 10, &rate); in tx_maxrate_store()
1270 static ssize_t bql_show(char *buf, unsigned int value) in bql_show() argument
1272 return sprintf(buf, "%u\n", value); in bql_show()
1275 static ssize_t bql_set(const char *buf, const size_t count, in bql_set() argument
1281 if (!strcmp(buf, "max") || !strcmp(buf, "max\n")) { in bql_set()
1284 err = kstrtouint(buf, 10, &value); in bql_set()
1297 char *buf) in bql_show_hold_time() argument
1301 return sprintf(buf, "%u\n", jiffies_to_msecs(dql->slack_hold_time)); in bql_show_hold_time()
1305 const char *buf, size_t len) in bql_set_hold_time() argument
1311 err = kstrtouint(buf, 10, &value); in bql_set_hold_time()
1325 char *buf) in bql_show_inflight() argument
1329 return sprintf(buf, "%u\n", dql->num_queued - dql->num_completed); in bql_show_inflight()
1337 char *buf) \
1339 return bql_show(buf, queue->dql.FIELD); \
1343 const char *buf, size_t len) \
1345 return bql_set(buf, len, &queue->dql.FIELD); \
1373 char *buf) in xps_cpus_show() argument
1435 len = snprintf(buf, PAGE_SIZE, "%*pb\n", cpumask_pr_args(mask)); in xps_cpus_show()
1445 const char *buf, size_t len) in xps_cpus_store() argument
1463 err = bitmap_parse(buf, len, cpumask_bits(mask), nr_cpumask_bits); in xps_cpus_store()
1485 static ssize_t xps_rxqs_show(struct netdev_queue *queue, char *buf) in xps_rxqs_show() argument
1537 len = bitmap_print_to_pagebuf(false, buf, mask, dev->num_rx_queues); in xps_rxqs_show()
1547 static ssize_t xps_rxqs_store(struct netdev_queue *queue, const char *buf, in xps_rxqs_store() argument
1564 err = bitmap_parse(buf, len, mask, dev->num_rx_queues); in xps_rxqs_store()