Home
last modified time | relevance | path

Searched +refs:rate +refs:id +refs:attrs (Results 1 – 25 of 33) sorted by relevance

12

/Linux-v6.6/net/devlink/
Drate.c27 devlink_port = devlink_port_get_from_attrs(devlink, info->attrs); in devlink_rate_leaf_get_from_info()
48 devlink_rate_node_get_from_attrs(struct devlink *devlink, struct nlattr **attrs) in devlink_rate_node_get_from_attrs() argument
53 if (!attrs[DEVLINK_ATTR_RATE_NODE_NAME]) in devlink_rate_node_get_from_attrs()
55 rate_node_name = nla_data(attrs[DEVLINK_ATTR_RATE_NODE_NAME]); in devlink_rate_node_get_from_attrs()
67 return devlink_rate_node_get_from_attrs(devlink, info->attrs); in devlink_rate_node_get_from_info()
73 struct nlattr **attrs = info->attrs; in devlink_rate_get_from_info() local
75 if (attrs[DEVLINK_ATTR_PORT_INDEX]) in devlink_rate_get_from_info()
77 else if (attrs[DEVLINK_ATTR_RATE_NODE_NAME]) in devlink_rate_get_from_info()
193 u32 id = NETLINK_CB(cb->skb).portid; in devlink_nl_rate_get_dump_one() local
199 err = devlink_nl_rate_fill(msg, devlink_rate, cmd, id, in devlink_nl_rate_get_dump_one()
[all …]
Dtrap.c29 u64 rate; member
73 devlink_trap_policer_item_lookup(struct devlink *devlink, u32 id) in devlink_trap_policer_item_lookup() argument
78 if (policer_item->policer->id == id) in devlink_trap_policer_item_lookup()
104 if (!info->attrs[DEVLINK_ATTR_TRAP_NAME]) in devlink_trap_item_get_from_info()
106 attr = info->attrs[DEVLINK_ATTR_TRAP_NAME]; in devlink_trap_item_get_from_info()
117 val = nla_get_u8(info->attrs[DEVLINK_ATTR_TRAP_ACTION]); in devlink_trap_action_get_from_info()
404 if (!info->attrs[DEVLINK_ATTR_TRAP_ACTION]) in devlink_trap_action_set()
449 devlink_trap_group_item_lookup_by_id(struct devlink *devlink, u16 id) in devlink_trap_group_item_lookup_by_id() argument
454 if (group_item->group->id == id) in devlink_trap_group_item_lookup_by_id()
467 if (!info->attrs[DEVLINK_ATTR_TRAP_GROUP_NAME]) in devlink_trap_group_item_get_from_info()
[all …]
/Linux-v6.6/drivers/iio/magnetometer/
Dhmc5843_core.c289 static int hmc5843_set_samp_freq(struct hmc5843_data *data, u8 rate) in hmc5843_set_samp_freq() argument
296 rate << HMC5843_RATE_OFFSET); in hmc5843_set_samp_freq()
400 int rate, range; in hmc5843_write_raw() local
404 rate = hmc5843_get_samp_freq_index(data, val, val2); in hmc5843_write_raw()
405 if (rate < 0) in hmc5843_write_raw()
408 return hmc5843_set_samp_freq(data, rate); in hmc5843_write_raw()
529 .attrs = hmc5843_attributes,
574 u8 id[3]; in hmc5843_init() local
577 id, ARRAY_SIZE(id)); in hmc5843_init()
580 if (id[0] != 'H' || id[1] != '4' || id[2] != '3') { in hmc5843_init()
[all …]
Dmag3110.c354 int rate, ret; in mag3110_write_raw() local
362 rate = mag3110_get_samp_freq_index(data, val, val2); in mag3110_write_raw()
363 if (rate < 0) { in mag3110_write_raw()
369 data->ctrl_reg1 |= rate << MAG3110_CTRL_DR_SHIFT; in mag3110_write_raw()
461 .attrs = mag3110_attributes,
465 .attrs = &mag3110_group,
474 const struct i2c_device_id *id = i2c_client_get_device_id(client); in mag3110_probe() local
520 indio_dev->name = id->name; in mag3110_probe()
/Linux-v6.6/net/openvswitch/
Dmeter.c40 static u32 meter_hash(struct dp_meter_instance *ti, u32 id) in meter_hash() argument
42 return id % ti->n_meters; in meter_hash()
62 if (meter && likely(meter->id == meter_id)) in lookup_meter()
121 hash = meter_hash(ti, meter->id); in dp_meter_instance_insert()
130 hash = meter_hash(ti, meter->id); in dp_meter_instance_remove()
137 u32 hash = meter_hash(ti, meter->id); in attach_meter()
348 meter->id = nla_get_u32(a[OVS_METER_ATTR_ID]); in dp_meter_create()
379 band->rate = nla_get_u32(attr[OVS_BAND_ATTR_RATE]); in dp_meter_create()
380 if (band->rate == 0) { in dp_meter_create()
393 band_max_delta_t = div_u64(band->bucket, band->rate); in dp_meter_create()
[all …]
/Linux-v6.6/drivers/net/netdevsim/
Ddev.c104 u32 id; in nsim_dev_take_snapshot_write() local
112 err = devlink_region_snapshot_id_get(devlink, &id); in nsim_dev_take_snapshot_write()
119 dummy_data, id); in nsim_dev_take_snapshot_write()
120 devlink_region_snapshot_id_put(devlink, id); in nsim_dev_take_snapshot_write()
304 sprintf(dev_ddir_name, DRV_NAME "%u", nsim_dev->nsim_bus_dev->dev.id); in nsim_dev_debugfs_init()
405 sprintf(dev_link_name, "../../../" DRV_NAME "%u", nsim_bus_dev->dev.id); in nsim_dev_port_debugfs_init()
1052 if (nsim_traps_arr[i].id == trap_id) in nsim_dev_trap_item_lookup()
1066 nsim_trap_item = nsim_dev_trap_item_lookup(nsim_dev, trap->id); in nsim_dev_devlink_trap_init()
1085 nsim_trap_item = nsim_dev_trap_item_lookup(nsim_dev, trap->id); in nsim_dev_devlink_trap_action_set()
1113 u64 rate, u64 burst, in nsim_dev_devlink_trap_policer_set() argument
[all …]
/Linux-v6.6/include/linux/
Dscmi_protocol.h90 u64 *rate);
92 u64 rate);
137 unsigned long rate, bool poll);
139 unsigned long *rate, bool poll);
141 unsigned long *rate, unsigned long *power);
162 #define SCMI_POWER_STATE_PARAM(type, id) \ argument
164 ((id) & SCMI_POWER_STATE_ID_MASK))
215 unsigned int id; member
222 struct scmi_range_attrs attrs; member
299 unsigned int id; member
[all …]
/Linux-v6.6/drivers/iio/adc/
Dmax11410.c303 int ret, reg, rate, filter; in in_voltage_filter2_notch_center_show() local
309 rate = FIELD_GET(MAX11410_FILTER_RATE_MASK, reg); in in_voltage_filter2_notch_center_show()
310 rate = clamp_val(rate, 0, in in_voltage_filter2_notch_center_show()
312 filter = max11410_sampling_rates[MAX11410_FILTER_SINC4][rate][0]; in in_voltage_filter2_notch_center_show()
339 .attrs = max11410_attributes,
459 int ret, reg_val, filter, rate; in max11410_read_raw() local
498 rate = reg_val & MAX11410_FILTER_RATE_MASK; in max11410_read_raw()
499 if (rate >= max11410_sampling_len[filter]) in max11410_read_raw()
500 rate = max11410_sampling_len[filter] - 1; in max11410_read_raw()
502 *val = max11410_sampling_rates[filter][rate][0]; in max11410_read_raw()
[all …]
/Linux-v6.6/drivers/net/wireless/virtual/
Dmac80211_hwsim.c1452 static inline u16 trans_tx_rate_flags_ieee2hwsim(struct ieee80211_tx_rate *rate) in trans_tx_rate_flags_ieee2hwsim() argument
1456 if (rate->flags & IEEE80211_TX_RC_USE_RTS_CTS) in trans_tx_rate_flags_ieee2hwsim()
1458 if (rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) in trans_tx_rate_flags_ieee2hwsim()
1460 if (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) in trans_tx_rate_flags_ieee2hwsim()
1462 if (rate->flags & IEEE80211_TX_RC_MCS) in trans_tx_rate_flags_ieee2hwsim()
1464 if (rate->flags & IEEE80211_TX_RC_GREEN_FIELD) in trans_tx_rate_flags_ieee2hwsim()
1466 if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) in trans_tx_rate_flags_ieee2hwsim()
1468 if (rate->flags & IEEE80211_TX_RC_DUP_DATA) in trans_tx_rate_flags_ieee2hwsim()
1470 if (rate->flags & IEEE80211_TX_RC_SHORT_GI) in trans_tx_rate_flags_ieee2hwsim()
1472 if (rate->flags & IEEE80211_TX_RC_VHT_MCS) in trans_tx_rate_flags_ieee2hwsim()
[all …]
/Linux-v6.6/net/wireless/
Dnl80211.c68 struct net *netns, struct nlattr **attrs) in __cfg80211_wdev_from_attrs() argument
71 bool have_ifidx = attrs[NL80211_ATTR_IFINDEX]; in __cfg80211_wdev_from_attrs()
72 bool have_wdev_id = attrs[NL80211_ATTR_WDEV]; in __cfg80211_wdev_from_attrs()
81 ifidx = nla_get_u32(attrs[NL80211_ATTR_IFINDEX]); in __cfg80211_wdev_from_attrs()
83 wdev_id = nla_get_u64(attrs[NL80211_ATTR_WDEV]); in __cfg80211_wdev_from_attrs()
140 __cfg80211_rdev_from_attrs(struct net *netns, struct nlattr **attrs) in __cfg80211_rdev_from_attrs() argument
147 if (!attrs[NL80211_ATTR_WIPHY] && in __cfg80211_rdev_from_attrs()
148 !attrs[NL80211_ATTR_IFINDEX] && in __cfg80211_rdev_from_attrs()
149 !attrs[NL80211_ATTR_WDEV]) in __cfg80211_rdev_from_attrs()
152 if (attrs[NL80211_ATTR_WIPHY]) in __cfg80211_rdev_from_attrs()
[all …]
/Linux-v6.6/drivers/iio/chemical/
Dbme680_core.c817 static bool bme680_is_valid_oversampling(int rate) in bme680_is_valid_oversampling() argument
819 return (rate > 0 && rate <= 16 && is_power_of_2(rate)); in bme680_is_valid_oversampling()
869 .attrs = bme680_attributes,
875 .attrs = &bme680_attribute_group,
880 const struct acpi_device_id *id; in bme680_match_acpi_device() local
882 id = acpi_match_device(dev->driver->acpi_match_table, dev); in bme680_match_acpi_device()
883 if (!id) in bme680_match_acpi_device()
/Linux-v6.6/drivers/gpu/drm/amd/amdgpu/
Damdgpu_atombios.c90 uint8_t id) in amdgpu_atombios_lookup_i2c_gpio() argument
114 if (gpio->sucI2cId.ucAccess == id) { in amdgpu_atombios_lookup_i2c_gpio()
161 u8 id) in amdgpu_atombios_lookup_gpio() argument
182 if (id == pin->ucGPIO_ID) { in amdgpu_atombios_lookup_gpio()
183 gpio.id = pin->ucGPIO_ID; in amdgpu_atombios_lookup_gpio()
778 int id) in amdgpu_atombios_get_igp_ss_overrides() argument
785 u16 percentage = 0, rate = 0; in amdgpu_atombios_get_igp_ss_overrides() local
794 switch (id) { in amdgpu_atombios_get_igp_ss_overrides()
797 rate = le16_to_cpu(igp_info->info_6.usDVISSpreadRateIn10Hz); in amdgpu_atombios_get_igp_ss_overrides()
801 rate = le16_to_cpu(igp_info->info_6.usHDMISSpreadRateIn10Hz); in amdgpu_atombios_get_igp_ss_overrides()
[all …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlxsw/
Dcore.c468 mlxsw_emad_op_tlv_register_id_set(op_tlv, reg->id); in mlxsw_emad_pack_op_tlv()
963 tid, reg->id, mlxsw_reg_id_str(reg->id), in mlxsw_emad_reg_access()
1295 static int mlxsw_core_devlink_param_fw_load_policy_validate(struct devlink *devlink, u32 id, in mlxsw_core_devlink_param_fw_load_policy_validate() argument
1695 u64 rate, u64 burst, in mlxsw_devlink_trap_policer_set() argument
1703 return mlxsw_driver->trap_policer_set(mlxsw_core, policer, rate, burst, in mlxsw_devlink_trap_policer_set()
2500 reg.id = mlxsw_emad_op_tlv_register_id_get(op_tlv); in mlxsw_core_event_listener_func()
2803 trans->tid, trans->reg->id, in mlxsw_reg_trans_wait()
2804 mlxsw_reg_id_str(trans->reg->id), in mlxsw_reg_trans_wait()
2811 trans->reg->id, mlxsw_reg_id_str(trans->reg->id), in mlxsw_reg_trans_wait()
2904 reg->id, mlxsw_reg_id_str(reg->id), in mlxsw_core_reg_access_cmd()
[all …]
/Linux-v6.6/Documentation/admin-guide/mm/damon/
Dusage.rst351 - free_mem_rate: System's free memory rate (per thousand)
466 free memory rate of the system every 5 seconds, start the monitoring and paging
467 out when the free memory rate becomes lower than 50%, but stop it if the free
468 memory rate becomes larger than 60%, or lower than 30%". ::
512 DAMON exports eight files, ``attrs``, ``target_ids``, ``init_regions``,
522 reading from and writing to the ``attrs`` file. To know about the monitoring
528 # echo 5000 100000 1000000 10 1000 > attrs
529 # cat attrs
538 monitoring targets. Users can set the targets by writing relevant id values of
685 - 1: System's free memory rate (per thousand)
[all …]
/Linux-v6.6/drivers/misc/lis3lv02d/
Dlis3lv02d.c242 static int lis3lv02d_set_odr(struct lis3lv02d *lis3, int rate) in lis3lv02d_set_odr() argument
247 if (!rate) in lis3lv02d_set_odr()
256 if (lis3->odrs[i] == rate) { in lis3lv02d_set_odr()
696 input_dev->id.bustype = BUS_HOST; in lis3lv02d_joystick_enable()
697 input_dev->id.vendor = 0; in lis3lv02d_joystick_enable()
840 unsigned long rate; in lis3lv02d_rate_set() local
843 ret = kstrtoul(buf, 0, &rate); in lis3lv02d_rate_set()
848 if (lis3lv02d_set_odr(lis3, rate)) in lis3lv02d_rate_set()
856 static DEVICE_ATTR(rate, S_IRUGO | S_IWUSR, lis3lv02d_rate_show,
867 .attrs = lis3lv02d_attributes
/Linux-v6.6/include/net/
Ddevlink.h143 struct devlink_port_attrs attrs; member
216 unsigned int id; member
232 unsigned int id; member
477 u32 id; member
482 int (*get)(struct devlink *devlink, u32 id,
484 int (*set)(struct devlink *devlink, u32 id,
486 int (*validate)(struct devlink *devlink, u32 id,
580 .id = DEVLINK_PARAM_GENERIC_ID_##_id, \
592 .id = _id, \
778 u32 id; member
[all …]
/Linux-v6.6/drivers/net/ethernet/mscc/
Docelot_net.c177 struct devlink_port_attrs attrs = {}; in ocelot_port_devlink_init() local
180 memcpy(attrs.switch_id.id, &ocelot->base_mac, id_len); in ocelot_port_devlink_init()
181 attrs.switch_id.id_len = id_len; in ocelot_port_devlink_init()
182 attrs.phys.port_number = port; in ocelot_port_devlink_init()
183 attrs.flavour = flavour; in ocelot_port_devlink_init()
185 devlink_port_attrs_set(dlp, &attrs); in ocelot_port_devlink_init()
245 pol.rate = (u32)div_u64(action->police.rate_bytes_ps, 1000) * 8; in ocelot_setup_tc_cls_matchall_police()
364 switch (action->id) { in ocelot_setup_tc_cls_matchall()
1045 switch (attr->id) { in ocelot_port_attr_set()
1178 switch (obj->id) { in ocelot_port_obj_add()
[all …]
/Linux-v6.6/drivers/net/ethernet/fungible/funeth/
Dfuneth_main.c161 .u.write.id = cpu_to_be32(adi_id), in fun_adi_write()
219 fp->rss_hw_id = be32_to_cpu(cmd.rsp.id); in fun_config_rss()
617 return rc ? rc : be32_to_cpu(cmd.rsp.id); in fun_eth_create()
1293 rate_param.u.rate = FUN_ADI_RATE_INIT(max_tx_rate); in fun_set_vf_rate()
1505 struct devlink_port_attrs attrs = {}; in fun_dl_port_register() local
1509 attrs.flavour = DEVLINK_PORT_FLAVOUR_VIRTUAL; in fun_dl_port_register()
1513 attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL; in fun_dl_port_register()
1514 attrs.lanes = fp->lane_attrs & 7; in fun_dl_port_register()
1516 attrs.split = 1; in fun_dl_port_register()
1517 attrs.phys.port_number = fp->lport & ~3; in fun_dl_port_register()
[all …]
/Linux-v6.6/drivers/net/ethernet/mellanox/mlx5/core/
Den_tc.c872 mlx5_get_ttc_flow_table(ttc)->id); in mlx5e_hairpin_rss_init()
1981 attr = list_first_entry(&flow->attrs, struct mlx5_flow_attr, list); in mlx5e_tc_get_counter()
2064 switch (act->id) { in flow_requires_tunnel_mapping()
3377 if (act->id != FLOW_ACTION_MANGLE && in is_flow_action_modify_ip_header()
3378 act->id != FLOW_ACTION_ADD) in is_flow_action_modify_ip_header()
3585 list_for_each_entry(attr, &flow->attrs, list) { in mlx5e_tc_get_encap_attr()
3602 list_for_each_entry(attr, &flow->attrs, list) { in mlx5e_tc_unoffload_flow_post_acts()
3603 if (list_is_last(&attr->list, &flow->attrs)) in mlx5e_tc_unoffload_flow_post_acts()
3615 list_for_each_entry_safe(attr, tmp, &flow->attrs, list) { in free_flow_post_acts()
3616 if (list_is_last(&attr->list, &flow->attrs)) in free_flow_post_acts()
[all …]
/Linux-v6.6/sound/core/
Dpcm.c355 snd_iprintf(buffer, "id: %s\n", info->id); in snd_pcm_proc_info_read()
398 snd_iprintf(buffer, "rate: %u (%u/%u)\n", runtime->rate, runtime->rate_num, runtime->rate_den); in snd_pcm_substream_proc_hw_params_read()
405 snd_iprintf(buffer, "OSS rate: %u\n", runtime->oss.rate); in snd_pcm_substream_proc_hw_params_read()
708 static int _snd_pcm_new(struct snd_card *card, const char *id, int device, in _snd_pcm_new() argument
736 if (id) in _snd_pcm_new()
737 strscpy(pcm->id, id, sizeof(pcm->id)); in _snd_pcm_new()
778 int snd_pcm_new(struct snd_card *card, const char *id, int device, in snd_pcm_new() argument
781 return _snd_pcm_new(card, id, device, playback_count, capture_count, in snd_pcm_new()
806 int snd_pcm_new_internal(struct snd_card *card, const char *id, int device, in snd_pcm_new_internal() argument
810 return _snd_pcm_new(card, id, device, playback_count, capture_count, in snd_pcm_new_internal()
[all …]
/Linux-v6.6/net/core/
Dnet-sysfs.c518 ret = sysfs_emit(buf, "%*phN\n", ppid.id_len, ppid.id); in phys_port_id_show()
577 ret = sysfs_emit(buf, "%*phN\n", ppid.id_len, ppid.id); in phys_switch_id_show()
748 .attrs = netstat_attrs,
757 .attrs = wireless_attrs,
1303 u32 rate = 0; in tx_maxrate_store() local
1314 err = kstrtou32(buf, 10, &rate); in tx_maxrate_store()
1323 err = dev->netdev_ops->ndo_set_tx_maxrate(dev, index, rate); in tx_maxrate_store()
1327 queue->tx_maxrate = rate; in tx_maxrate_store()
1444 .attrs = dql_attrs,
/Linux-v6.6/include/rdma/
Dib_verbs.h851 __attribute_const__ int ib_rate_to_mult(enum ib_rate rate);
858 __attribute_const__ int ib_rate_to_mbps(enum ib_rate rate);
1533 int id; /* index into kernel idr */ member
2246 void (*set_id)(struct net_device *netdev, int id);
2506 struct uverbs_attr_bundle *attrs);
2554 struct uverbs_attr_bundle *attrs);
2555 int (*dealloc_dm)(struct ib_dm *dm, struct uverbs_attr_bundle *attrs);
2558 struct uverbs_attr_bundle *attrs);
2560 struct uverbs_attr_bundle *attrs);
2564 struct uverbs_attr_bundle *attrs);
[all …]
/Linux-v6.6/drivers/infiniband/core/
Dcm.c206 struct ib_cm_id id; member
299 m = ib_create_send_mad(mad_agent, cm_id_priv->id.remote_cm_qpn, in cm_alloc_msg()
576 if (!cm_id_priv || cm_id_priv->id.remote_id != remote_id || in cm_acquire_id()
620 __be64 service_id = cm_id_priv->id.service_id; in cm_insert_listen()
629 if (cm_id_priv->id.device < cur_cm_id_priv->id.device) in cm_insert_listen()
631 else if (cm_id_priv->id.device > cur_cm_id_priv->id.device) in cm_insert_listen()
633 else if (be64_lt(service_id, cur_cm_id_priv->id.service_id)) in cm_insert_listen()
635 else if (be64_gt(service_id, cur_cm_id_priv->id.service_id)) in cm_insert_listen()
642 if (cur_cm_id_priv->id.cm_handler != shared_handler || in cm_insert_listen()
643 cur_cm_id_priv->id.context || in cm_insert_listen()
[all …]
/Linux-v6.6/drivers/input/mouse/
Delantech.c677 int id; in process_packet_head_v4() local
680 id = ((packet[3] & 0xe0) >> 5) - 1; in process_packet_head_v4()
681 if (id < 0 || id >= ETP_MAX_FINGERS) in process_packet_head_v4()
684 etd->mt[id].x = ((packet[1] & 0x0f) << 8) | packet[2]; in process_packet_head_v4()
685 etd->mt[id].y = etd->y_max - (((packet[4] & 0x0f) << 8) | packet[5]); in process_packet_head_v4()
689 input_mt_slot(dev, id); in process_packet_head_v4()
692 input_report_abs(dev, ABS_MT_POSITION_X, etd->mt[id].x); in process_packet_head_v4()
693 input_report_abs(dev, ABS_MT_POSITION_Y, etd->mt[id].y); in process_packet_head_v4()
708 int id, sid; in process_packet_motion_v4() local
710 id = ((packet[0] & 0xe0) >> 5) - 1; in process_packet_motion_v4()
[all …]
/Linux-v6.6/drivers/rtc/
Drtc-ds1307.c1233 .attrs = rtc_freq_test_attrs,
1454 static long ds3231_clk_sqw_round_rate(struct clk_hw *hw, unsigned long rate, in ds3231_clk_sqw_round_rate() argument
1460 if (ds3231_clk_sqw_rates[i] <= rate) in ds3231_clk_sqw_round_rate()
1467 static int ds3231_clk_sqw_set_rate(struct clk_hw *hw, unsigned long rate, in ds3231_clk_sqw_set_rate() argument
1476 if (ds3231_clk_sqw_rates[rate_sel] == rate) in ds3231_clk_sqw_set_rate()
1717 const struct i2c_device_id *id = i2c_client_get_device_id(client); in ds1307_probe() local
1749 } else if (id) { in ds1307_probe()
1750 chip = &chips[id->driver_data]; in ds1307_probe()
1751 ds1307->type = id->driver_data; in ds1307_probe()

12