/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/include/linux/ |
H A D | dim.h | 15 /* Number of DIM profiles and period mode. */ 23 * Number of events between DIM iterations. 44 * Used for communications between DIM and its consumer. 46 * @usec: CQ timer suggestion (by DIM) 47 * @pkts: CQ packet counter suggestion (by DIM) 73 * @dim_rx_mode: Rx DIM period count mode: CQE or EQE 74 * @dim_tx_mode: Tx DIM period count mode: CQE or EQE 75 * @rx_profile: DIM profile list for Rx 76 * @tx_profile: DIM profile list for Tx 77 * @rx_dim_work: Rx DIM worker scheduled by net_dim() [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 | dim.c | 6 #include <linux/dim.h> 8 bool dim_on_top(struct dim *dim) in dim_on_top() argument 10 switch (dim->tune_state) { in dim_on_top() 15 return (dim->steps_left > 1) && (dim->steps_right == 1); in dim_on_top() 17 return (dim->steps_right > 1) && (dim->steps_left == 1); in dim_on_top() 22 void dim_turn(struct dim *dim) in dim_turn() argument 24 switch (dim->tune_state) { in dim_turn() 29 dim->tune_state = DIM_GOING_LEFT; in dim_turn() 30 dim->steps_left = 0; in dim_turn() 33 dim->tune_state = DIM_GOING_RIGHT; in dim_turn() [all …]
|
H A D | Makefile | 2 # DIM Dynamic Interrupt Moderation library 7 dimlib-y := dim.o net_dim.o rdma_dim.o
|
/linux/Documentation/networking/ |
H A D | net_dim.rst | 2 Net DIM - Generic Network Dynamic Interrupt Moderation 19 Dynamic Interrupt Moderation (DIM) (in networking) refers to changing the 23 runtime data sampled from the system. Net DIM is such a mechanism. In each 28 samples is also measured. Net DIM compares the current and the previous data and 32 number of wanted packets per event. The Net DIM algorithm ascribes importance to 36 Net DIM Algorithm 39 Each iteration of the Net DIM algorithm follows these steps: 47 supplied by the driver registered to Net DIM. The previous data is the new data 58 certain percentage. Also, since Net DIM does not measure anything by itself, it 75 the Net DIM API and provided by the registered driver. [all …]
|
/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_trace.h | 62 /* Events related to DIM, q_vectors and ring containers */ 64 TP_PROTO(struct ice_q_vector *q_vector, struct dim *dim), 65 TP_ARGS(q_vector, dim), 67 __field(struct dim *, dim) 71 __entry->dim = dim; 74 …TP_printk("netdev: %s Rx-Q: %d dim-state: %d dim-profile: %d dim-tune: %d dim-st-right: %d dim-st-… 77 __entry->dim->state, 78 __entry->dim->profile_ix, 79 __entry->dim->tune_state, 80 __entry->dim->steps_right, [all …]
|
/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/infiniband/core/ |
H A D | cq.c | 41 struct dim *dim = container_of(w, struct dim, work); in ib_cq_rdma_dim_work() local 42 struct ib_cq *cq = dim->priv; in ib_cq_rdma_dim_work() 44 u16 usec = rdma_dim_prof[dim->profile_ix].usec; in ib_cq_rdma_dim_work() 45 u16 comps = rdma_dim_prof[dim->profile_ix].comps; in ib_cq_rdma_dim_work() 47 dim->state = DIM_START_MEASURE; in ib_cq_rdma_dim_work() 55 struct dim *dim; in rdma_dim_init() local 61 dim = kzalloc(sizeof(struct dim), GFP_KERNEL); in rdma_dim_init() 62 if (!dim) in rdma_dim_init() 65 dim->state = DIM_START_MEASURE; in rdma_dim_init() 66 dim->tune_state = DIM_GOING_RIGHT; in rdma_dim_init() [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/drivers/leds/ |
H A D | leds-lp3944.c | 12 * This helper chip can drive up to 8 leds, with two programmable DIM modes; 16 * The DIM modes are used to set _blink_ patterns for leds, the pattern is 95 * lp3944_dim_set_period() - Set the period for DIM status 98 * @dim: either LP3944_DIM0 or LP3944_DIM1 101 static int lp3944_dim_set_period(struct i2c_client *client, u8 dim, u16 period) in lp3944_dim_set_period() argument 107 if (dim == LP3944_DIM0) in lp3944_dim_set_period() 109 else if (dim == LP3944_DIM1) in lp3944_dim_set_period() 126 * lp3944_dim_set_dutycycle - Set the duty cycle for DIM status 129 * @dim: either LP3944_DIM0 or LP3944_DIM1 132 static int lp3944_dim_set_dutycycle(struct i2c_client *client, u8 dim, in lp3944_dim_set_dutycycle() argument [all …]
|
/linux/tools/perf/util/ |
H A D | sort.c | 2402 #define DIM(d, n, func) [d] = { .name = n, .entry = &(func) } macro 2405 DIM(SORT_PID, "pid", sort_thread), 2406 DIM(SORT_COMM, "comm", sort_comm), 2407 DIM(SORT_DSO, "dso", sort_dso), 2408 DIM(SORT_SYM, "symbol", sort_sym), 2409 DIM(SORT_PARENT, "parent", sort_parent), 2410 DIM(SORT_CPU, "cpu", sort_cpu), 2411 DIM(SORT_SOCKET, "socket", sort_socket), 2412 DIM(SORT_SRCLINE, "srcline", sort_srcline), 2413 DIM(SORT_SRCFILE, "srcfile", sort_srcfile), [all …]
|
/linux/drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_1.0/ |
H A D | ia_css_sdis.host.c | 139 hor_num_3a = dvs_binary->dis.coef.dim.width; in ia_css_get_isp_dis_coefficients() 140 ver_num_3a = dvs_binary->dis.coef.dim.height; in ia_css_get_isp_dis_coefficients() 190 dis->grid.dim.width = in ia_css_sdis_init_info() 192 dis->grid.dim.height = in ia_css_sdis_init_info() 199 dis->coef.dim.width = in ia_css_sdis_init_info() 202 dis->coef.dim.height = in ia_css_sdis_init_info() 210 dis->proj.dim.width = in ia_css_sdis_init_info() 212 dis->proj.dim.height = in ia_css_sdis_init_info() 215 dis->proj.dim.width = in ia_css_sdis_init_info() 218 dis->proj.dim.height = in ia_css_sdis_init_info()
|
/linux/tools/perf/ |
H A D | builtin-c2c.c | 425 struct c2c_dimension *dim; member 448 struct c2c_dimension *dim; in c2c_width() local 451 dim = c2c_fmt->dim; in c2c_width() 453 if (dim == &dim_symbol || dim == &dim_srcline) in c2c_width() 454 return symbol_width(hists, dim->se); in c2c_width() 456 return dim->se ? hists__col_len(hists, dim->se->se_width_idx) : in c2c_width() 457 c2c_fmt->dim->width; in c2c_width() 465 struct c2c_dimension *dim; in c2c_header() local 470 dim = c2c_fmt->dim; in c2c_header() 472 if (dim->se) { in c2c_header() [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/staging/most/dim2/ |
H A D | errors.h | 13 * MOST DIM errors. 31 /** DIM API is called while DIM is not initialized successfully */
|
/linux/drivers/net/ethernet/broadcom/ |
H A D | bcmsysport.c | 637 ec->use_adaptive_rx_coalesce = priv->dim.use_dim; in bcm_sysport_get_coalesce() 674 if (ec->use_adaptive_rx_coalesce && !priv->dim.use_dim) { in bcm_sysport_set_coalesce() 675 moder = net_dim_get_def_rx_moderation(priv->dim.dim.mode); in bcm_sysport_set_coalesce() 680 priv->dim.use_dim = ec->use_adaptive_rx_coalesce; in bcm_sysport_set_coalesce() 879 priv->dim.packets = processed; in bcm_sysport_desc_rx() 880 priv->dim.bytes = processed_bytes; in bcm_sysport_desc_rx() 1053 if (priv->dim.use_dim) { in bcm_sysport_poll() 1054 dim_update_sample(priv->dim.event_ctr, priv->dim.packets, in bcm_sysport_poll() 1055 priv->dim.bytes, &dim_sample); in bcm_sysport_poll() 1056 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/broadcom/genet/ |
H A D | bcmgenet.c | 832 ec->use_adaptive_rx_coalesce |= ring->dim.use_dim; in bcmgenet_get_coalesce() 835 ec->use_adaptive_rx_coalesce |= ring->dim.use_dim; in bcmgenet_get_coalesce() 866 if (ec->use_adaptive_rx_coalesce && !ring->dim.use_dim) { in bcmgenet_set_ring_rx_coalesce() 867 moder = net_dim_get_def_rx_moderation(ring->dim.dim.mode); in bcmgenet_set_ring_rx_coalesce() 872 ring->dim.use_dim = ec->use_adaptive_rx_coalesce; in bcmgenet_set_ring_rx_coalesce() 2384 ring->dim.bytes = bytes_processed; in bcmgenet_desc_rx() 2385 ring->dim.packets = rxpktprocessed; in bcmgenet_desc_rx() 2405 if (ring->dim.use_dim) { in bcmgenet_rx_poll() 2406 dim_update_sample(ring->dim.event_ctr, ring->dim.packets, in bcmgenet_rx_poll() 2407 ring->dim.bytes, &dim_sample); in bcmgenet_rx_poll() [all …]
|
/linux/drivers/net/ethernet/hisilicon/hns3/ |
H A D | hns3_debugfs.c | 488 struct dim *dim; in hns3_get_coal_info() local 493 dim = &tqp_vector->tx_group.dim; in hns3_get_coal_info() 499 dim = &tqp_vector->rx_group.dim; in hns3_get_coal_info() 506 sprintf(result[j++], "%s", dim->state < ARRAY_SIZE(dim_state_str) ? in hns3_get_coal_info() 507 dim_state_str[dim->state] : "unknown"); in hns3_get_coal_info() 508 sprintf(result[j++], "%u", dim->profile_ix); in hns3_get_coal_info() 509 sprintf(result[j++], "%s", dim->mode < ARRAY_SIZE(dim_cqe_mode_str) ? in hns3_get_coal_info() 510 dim_cqe_mode_str[dim->mode] : "unknown"); in hns3_get_coal_info() 512 dim->tune_state < ARRAY_SIZE(dim_tune_stat_str) ? in hns3_get_coal_info() 513 dim_tune_stat_str[dim->tune_state] : "unknown"); in hns3_get_coal_info() [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
|