drivers/net/ethernet/mellanox/mlx5/core/en/channels.c

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/en/channels.c

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/mellanox/mlx5/core/en/channels.c
Extension
.c
Size
3237 bytes
Lines
141
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (chs->c[i]->rq.dim) {
			int err;

			mlx5e_dim_rx_change(&chs->c[i]->rq, false);
			err = mlx5e_dim_rx_change(&chs->c[i]->rq, true);
			if (err)
				return err;
		}
	}

	return 0;
}

int mlx5e_channels_tx_toggle_dim(struct mlx5e_channels *chs)
{
	int i, tc;

	for (i = 0; i < chs->num; i++) {
		for (tc = 0; tc < mlx5e_get_dcb_num_tc(&chs->params); tc++) {
			int err;

			/* If dim is enabled for the channel, reset the dim
			 * state so the collected statistics will be reset. This
			 * is useful for supporting legacy interfaces that allow
			 * things like changing the CQ period mode for all
			 * channels without disturbing individual channel
			 * configurations.
			 */
			if (!chs->c[i]->sq[tc].dim)
				continue;

			mlx5e_dim_tx_change(&chs->c[i]->sq[tc], false);
			err = mlx5e_dim_tx_change(&chs->c[i]->sq[tc], true);
			if (err)
				return err;
		}
	}

	return 0;
}

Annotation

Implementation Notes