| /linux/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | en_dim.c | 34 #include "en/dim.h" 37 mlx5e_complete_dim_work(struct dim *dim, struct dim_cq_moder moder, in mlx5e_complete_dim_work() argument 42 dim->state = DIM_START_MEASURE; in mlx5e_complete_dim_work() 47 struct dim *dim = container_of(work, struct dim, work); in mlx5e_rx_dim_work() local 48 struct mlx5e_rq *rq = dim->priv; in mlx5e_rx_dim_work() 50 net_dim_get_rx_moderation(dim->mode, dim->profile_ix); in mlx5e_rx_dim_work() 52 mlx5e_complete_dim_work(dim, cur_moder, rq->mdev, &rq->cq.mcq); in mlx5e_rx_dim_work() 57 struct dim *dim = container_of(work, struct dim, work); in mlx5e_tx_dim_work() local 58 struct mlx5e_txqsq *sq = dim->priv; in mlx5e_tx_dim_work() 60 net_dim_get_tx_moderation(dim->mode, dim->profile_ix); in mlx5e_tx_dim_work() [all …]
|
| /linux/lib/dim/ |
| H A D | rdma_dim.c | 6 #include <linux/dim.h> 8 static int rdma_dim_step(struct dim *dim) in rdma_dim_step() argument 10 if (dim->tune_state == DIM_GOING_RIGHT) { in rdma_dim_step() 11 if (dim->profile_ix == (RDMA_DIM_PARAMS_NUM_PROFILES - 1)) in rdma_dim_step() 13 dim->profile_ix++; in rdma_dim_step() 14 dim->steps_right++; in rdma_dim_step() 16 if (dim->tune_state == DIM_GOING_LEFT) { in rdma_dim_step() 17 if (dim->profile_ix == 0) in rdma_dim_step() 19 dim->profile_ix--; in rdma_dim_step() 20 dim->steps_left++; in rdma_dim_step() [all …]
|
| H A D | net_dim.c | 6 #include <linux/dim.h> 10 * Net DIM profiles: 168 void net_dim_setting(struct net_device *dev, struct dim *dim, bool is_tx) in net_dim_setting() argument 176 INIT_WORK(&dim->work, irq_moder->tx_dim_work); in net_dim_setting() 177 dim->mode = READ_ONCE(irq_moder->dim_tx_mode); in net_dim_setting() 181 INIT_WORK(&dim->work, irq_moder->rx_dim_work); in net_dim_setting() 182 dim->mode = READ_ONCE(irq_moder->dim_rx_mode); in net_dim_setting() 186 void net_dim_work_cancel(struct dim *dim) in net_dim_work_cancel() argument 188 cancel_work_sync(&dim->work); in net_dim_work_cancel() 193 struct dim *dim) in net_dim_get_rx_irq_moder() argument [all …]
|
| H A D | Makefile | 2 # DIM Dynamic Interrupt Moderation library 7 dimlib-y := dim.o net_dim.o rdma_dim.o
|
| /linux/drivers/net/ethernet/broadcom/bnxt/ |
| H A D | bnxt_debugfs.c | 14 #include <linux/dim.h> 24 struct dim *dim = filep->private_data; in debugfs_dim_read() local 30 if (!dim) in debugfs_dim_read() 40 dim->state, in debugfs_dim_read() 41 dim->profile_ix, in debugfs_dim_read() 42 dim->mode, in debugfs_dim_read() 43 dim->tune_state, in debugfs_dim_read() 44 dim->steps_right, in debugfs_dim_read() 45 dim->steps_left, in debugfs_dim_read() 46 dim->tired); in debugfs_dim_read() [all …]
|
| H A D | bnxt_dim.c | 10 #include <linux/dim.h> 16 struct dim *dim = container_of(work, struct dim, work); in bnxt_dim_work() local 17 struct bnxt_cp_ring_info *cpr = container_of(dim, in bnxt_dim_work() 19 dim); in bnxt_dim_work() 24 net_dim_get_rx_moderation(dim->mode, dim->profile_ix); in bnxt_dim_work() 30 dim->state = DIM_START_MEASURE; in bnxt_dim_work()
|
| /linux/drivers/net/ethernet/huawei/hinic3/ |
| H A D | hinic3_irq.c | 4 #include <linux/dim.h> 28 net_dim(&rxq->dim, &sample); in hinic3_net_dim() 185 struct dim *dim; in hinic3_rx_dim_work() local 187 dim = container_of(work, struct dim, work); in hinic3_rx_dim_work() 188 rxq = container_of(dim, struct hinic3_rxq, dim); in hinic3_rx_dim_work() 190 cur_moder = net_dim_get_rx_moderation(dim->mode, dim->profile_ix); in hinic3_rx_dim_work() 195 dim->state = DIM_START_MEASURE; in hinic3_rx_dim_work() 231 INIT_WORK(&irq_cfg->rxq->dim.work, hinic3_rx_dim_work); in hinic3_qps_irq_init() 232 irq_cfg->rxq->dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_CQE; in hinic3_qps_irq_init() 264 disable_work_sync(&irq_cfg->rxq->dim.work); in hinic3_qps_irq_init() [all …]
|
| /linux/drivers/leds/ |
| H A D | leds-aw200xx.c | 77 /* DIM current configuration register on page 1 */ 82 * DIM current configuration register (page 4). 83 * The even address for current DIM configuration. 110 int dim; member 130 int dim = led->dim; in dim_show() local 132 if (dim < 0) in dim_show() 135 return sysfs_emit(buf, "%d\n", dim); in dim_show() 145 int dim; in dim_store() local 149 dim = -1; in dim_store() 151 ret = kstrtoint(buf, 0, &dim); in dim_store() [all …]
|
| /linux/net/netfilter/ |
| H A D | xt_set.c | 41 .dim = d, \ 58 ADT_OPT(opt, xt_family(par), info->match_set.u.compat.dim, in set_match_v0() 72 info->u.compat.dim = IPSET_DIM_ZERO; in compat_flags() 76 info->u.compat.dim++; in compat_flags() 78 info->u.compat.flags |= (1 << info->u.compat.dim); in compat_flags() 122 ADT_OPT(opt, xt_family(par), info->match_set.dim, in set_match_v1() 146 if (info->match_set.dim > IPSET_DIM_MAX) { in set_match_v1_checkentry() 170 ADT_OPT(opt, xt_family(par), info->match_set.dim, in set_match_v3() 193 ADT_OPT(opt, xt_family(par), info->match_set.dim, in set_match_v4() 216 ADT_OPT(add_opt, xt_family(par), info->add_set.u.compat.dim, in set_target_v0() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/en/ |
| H A D | channels.c | 6 #include "en/dim.h" 95 /* If dim is enabled for the channel, reset the dim state so the in mlx5e_channels_rx_toggle_dim() 101 if (chs->c[i]->rq.dim) { in mlx5e_channels_rx_toggle_dim() 122 /* If dim is enabled for the channel, reset the dim in mlx5e_channels_tx_toggle_dim() 129 if (!chs->c[i]->sq[tc].dim) in mlx5e_channels_tx_toggle_dim()
|
| H A D | dim.h | 7 #include <linux/dim.h> 16 /* convert a boolean value for cqe mode to appropriate dim constant
|
| /linux/tools/perf/util/ |
| H A D | sort.c | 2720 #define DIM(d, n, func) [d] = { .name = n, .entry = &(func) } in perf_hpp__reset_sort_width() 2723 DIM(SORT_PID, "pid", sort_thread), in perf_hpp__reset_sort_width() 2724 DIM(SORT_TGID, "tgid", sort_tgid), in perf_hpp__reset_sort_width() 2725 DIM(SORT_COMM, "comm", sort_comm), 2726 DIM(SORT_COMM_NODIGIT, "comm_nodigit", sort_comm_nodigit), in __sort__hpp_header() 2727 DIM(SORT_DSO, "dso", sort_dso), in __sort__hpp_header() 2728 DIM(SORT_SYM, "symbol", sort_sym), in __sort__hpp_header() 2729 DIM(SORT_PARENT, "parent", sort_parent), in __sort__hpp_header() 2730 DIM(SORT_CPU, "cpu", sort_cpu), in __sort__hpp_header() 2731 DIM(SORT_SOCKE in __sort__hpp_header() 2580 #define DIM( global() macro 2623 #define DIM( global() macro 2652 #define DIM( global() macro 2678 #define DIM( global() macro [all...] |
| /linux/tools/perf/ |
| H A D | builtin-c2c.c | 445 struct c2c_dimension *dim; 448 dim = c2c_fmt->dim; 450 if (dim == &dim_symbol || dim == &dim_srcline) 451 return symbol_width(hists, dim->se); 453 return dim->se ? hists__col_len(hists, dim->se->se_width_idx) : 454 c2c_fmt->dim->width; 462 struct c2c_dimension *dim; 463 struct c2c_dimension *dim; global() member 486 struct c2c_dimension *dim; c2c_width() local 503 struct c2c_dimension *dim; c2c_header() local 1929 struct c2c_dimension *dim = dimensions[i]; get_dimension() local 1942 struct c2c_dimension *dim = c2c_fmt->dim; c2c_se_entry() local 1959 struct c2c_dimension *dim = c2c_fmt->dim; c2c_se_cmp() local 1968 struct c2c_dimension *dim = c2c_fmt->dim; c2c_se_collapse() local 1977 struct c2c_dimension *dim = get_dimension(name); get_format() local 2025 struct c2c_dimension *dim; c2c_hists__init_sort() local 2200 struct c2c_dimension *dim; set_node_width() local [all...] |
| H A D | builtin-kvm.c | 103 struct kvm_dimension *dim; 344 return kvm_fmt->dim->width; 352 struct kvm_dimension *dim; in fmt_header() 356 dim = kvm_fmt->dim; in fmt_header() 358 return scnprintf(hpp->buf, hpp->size, "%*s", width, dim->header); 366 return kvm_fmt_a->dim == kvm_fmt_b->dim; 391 struct kvm_dimension *dim = get_dimension(name); in get_format() 395 if (!dim) in get_format() 101 struct kvm_dimension *dim; global() member 350 struct kvm_dimension *dim; fmt_header() local 389 struct kvm_dimension *dim = get_dimension(name); get_format() local [all...] |
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-class-led-driver-aw200xx | 1 What: /sys/class/leds/<led>/dim 3 Description: 64-level DIM current. If you write a negative value or 4 "auto", the dim will be calculated according to the
|
| /linux/drivers/net/ethernet/broadcom/ |
| H A D | bcmsysport.c | 603 ec->use_adaptive_rx_coalesce = priv->dim.use_dim; in bcm_sysport_get_coalesce() 640 if (ec->use_adaptive_rx_coalesce && !priv->dim.use_dim) { in bcm_sysport_set_coalesce() 641 moder = net_dim_get_def_rx_moderation(priv->dim.dim.mode); in bcm_sysport_set_coalesce() 646 priv->dim.use_dim = ec->use_adaptive_rx_coalesce; in bcm_sysport_set_coalesce() 845 priv->dim.packets = processed; in bcm_sysport_desc_rx() 846 priv->dim.bytes = processed_bytes; in bcm_sysport_desc_rx() 1019 if (priv->dim.use_dim) { in bcm_sysport_poll() 1020 dim_update_sample(priv->dim.event_ctr, priv->dim.packets, in bcm_sysport_poll() 1021 priv->dim.bytes, &dim_sample); in bcm_sysport_poll() 1022 net_dim(&priv->dim.dim, &dim_sample); in bcm_sysport_poll() [all …]
|
| /linux/drivers/soc/fsl/dpio/ |
| H A D | dpio-service.c | 15 #include <linux/dim.h> 33 /* Net DIM */ 34 struct dim rx_dim; 35 /* protect against concurrent Net DIM updates */ 114 struct dim *dim = container_of(w, struct dim, work); in dpaa2_io_dim_work() local 116 net_dim_get_rx_moderation(dim->mode, dim->profile_ix); in dpaa2_io_dim_work() 117 struct dpaa2_io *d = container_of(dim, struct dpaa2_io, rx_dim); in dpaa2_io_dim_work() 120 dim->state = DIM_START_MEASURE; in dpaa2_io_dim_work() 876 * dpaa2_io_update_net_dim() - Update Net DIM
|
| /linux/drivers/net/ethernet/microsoft/mana/ |
| H A D | mana_en.c | 2029 /* Feed DIM with the completion rate observed here, in NAPI context. */ in mana_poll_tx_cq() 2452 struct dim *dim = container_of(work, struct dim, work); in mana_rx_dim_work() local 2456 cur_moder = net_dim_get_rx_moderation(dim->mode, dim->profile_ix); in mana_rx_dim_work() 2457 cq = container_of(dim, struct mana_cq, dim); in mana_rx_dim_work() 2465 dim->state = DIM_START_MEASURE; in mana_rx_dim_work() 2470 struct dim *dim = container_of(work, struct dim, work); in mana_tx_dim_work() local 2474 cur_moder = net_dim_get_tx_moderation(dim->mode, dim->profile_ix); in mana_tx_dim_work() 2475 cq = container_of(dim, struct mana_cq, dim); in mana_tx_dim_work() 2483 dim->state = DIM_START_MEASURE; in mana_tx_dim_work() 2487 * after enabling. And synchronize_net() before draining the DIM work, [all …]
|
| /linux/Documentation/leds/ |
| H A D | leds-lp3944.rst | 23 DIM modes; it could even be used as a gpio expander but this driver assumes it 26 The DIM modes are used to set _blink_ patterns for leds, the pattern is
|
| /linux/include/uapi/linux/netfilter/ |
| H A D | xt_set.h | 23 __u8 dim; member 43 __u8 dim; member
|
| /linux/drivers/net/ethernet/mediatek/ |
| H A D | mtk_eth_soc.h | 19 #include <linux/dim.h> 1254 * @dim_lock: Make sure that Net DIM operations are atomic 1274 * @rx_events: Net DIM RX event counter 1275 * @rx_packets: Net DIM RX packet counter 1276 * @rx_bytes: Net DIM RX byte counter 1277 * @rx_dim: Net DIM RX context 1278 * @tx_events: Net DIM TX event counter 1279 * @tx_packets: Net DIM TX packet counter 1280 * @tx_bytes: Net DIM TX byte counter 1281 * @tx_dim: Net DIM TX context [all …]
|
| /linux/net/sched/ |
| H A D | em_ipset.c | 81 opt.dim = set->dim; in em_ipset_match()
|
| /linux/drivers/net/ethernet/intel/idpf/ |
| H A D | idpf_txrx.c | 3927 * idpf_update_dim_sample - Update dim sample with packets and bytes 3929 * @dim_sample: dim sample to update 3930 * @dim: dim instance structure 3934 * Update the dim sample with the packets and bytes which are passed to this 3935 * function. Set the dim state appropriately if the dim settings gets stale. 3939 struct dim *dim, u64 packets, u64 bytes) in idpf_update_dim_sample() argument 3944 /* if dim settings get stale, like when not updated for 1 second or in idpf_update_dim_sample() 3948 if (ktime_ms_delta(dim_sample->time, dim->start_sample.time) >= HZ) in idpf_update_dim_sample() 3949 dim->state = DIM_START_MEASURE; in idpf_update_dim_sample() 3953 * idpf_net_dim - Update net DIM algorithm [all …]
|
| /linux/drivers/media/test-drivers/vicodec/ |
| H A D | codec-fwht.h | 64 #define vic_round_dim(dim, div) (round_up((dim) / (div), 8) * (div)) argument
|
| /linux/drivers/net/ethernet/wangxun/libwx/ |
| H A D | wx_lib.c | 935 net_dim(&q_vector->rx.dim, &sample); in wx_update_rx_dim_sample() 947 net_dim(&q_vector->tx.dim, &sample); in wx_update_tx_dim_sample() 1748 struct dim *dim = container_of(work, struct dim, work); in wx_rx_dim_work() local 1753 rx = container_of(dim, struct wx_ring_container, dim); in wx_rx_dim_work() 1755 rx_moder = net_dim_get_rx_moderation(dim->mode, dim->profile_ix); in wx_rx_dim_work() 1761 dim->state = DIM_START_MEASURE; in wx_rx_dim_work() 1766 struct dim *dim = container_of(work, struct dim, work); in wx_tx_dim_work() local 1771 tx = container_of(dim, struct wx_ring_container, dim); in wx_tx_dim_work() 1773 tx_moder = net_dim_get_tx_moderation(dim->mode, dim->profile_ix); in wx_tx_dim_work() 1779 dim->state = DIM_START_MEASURE; in wx_tx_dim_work() [all …]
|