Lines Matching refs:mdev

16 int mlx5e_qos_bytes_rate_check(struct mlx5_core_dev *mdev, u64 nbytes)  in mlx5e_qos_bytes_rate_check()  argument
19 qos_warn(mdev, "Input rate (%llu Bytes/sec) below minimum supported (%u Bytes/sec)\n", in mlx5e_qos_bytes_rate_check()
26 static u32 mlx5e_qos_bytes2mbits(struct mlx5_core_dev *mdev, u64 nbytes) in mlx5e_qos_bytes2mbits() argument
31 int mlx5e_qos_max_leaf_nodes(struct mlx5_core_dev *mdev) in mlx5e_qos_max_leaf_nodes() argument
33 return min(MLX5E_QOS_MAX_LEAF_NODES, mlx5_qos_max_leaf_nodes(mdev)); in mlx5e_qos_max_leaf_nodes()
89 stats_list = kvcalloc(mlx5e_qos_max_leaf_nodes(priv->mdev), in mlx5e_open_qos_sq()
125 mlx5e_build_sq_param(priv->mdev, params, &param_sq); in mlx5e_open_qos_sq()
126 mlx5e_build_tx_cq_param(priv->mdev, params, &param_cq); in mlx5e_open_qos_sq()
177 qos_dbg(priv->mdev, "Activate QoS SQ qid %u\n", node_qid); in mlx5e_activate_qos_sq()
191 qos_dbg(priv->mdev, "Deactivate QoS SQ qid %u\n", qid); in mlx5e_deactivate_qos_sq()
266 qos_sqs_size = DIV_ROUND_UP(mlx5e_qos_max_leaf_nodes(priv->mdev), chs->num); in mlx5e_qos_alloc_queues()
339 qos_dbg(c->mdev, "Deactivate QoS SQ qid %u\n", qid); in mlx5e_qos_deactivate_queues()
357 qos_dbg(priv->mdev, "Reactivate QoS SQ qid %u\n", qid); in mlx5e_reactivate_qos_sq()
391 if (!mlx5_qos_is_supported(priv->mdev)) { in mlx5e_htb_setup_tc()
400 res = mlx5e_htb_init(htb, htb_qopt, priv->netdev, priv->mdev, &priv->selq, priv); in mlx5e_htb_setup_tc()
443 struct mlx5_core_dev *mdev; member
459 int mlx5e_mqprio_rl_init(struct mlx5e_mqprio_rl *rl, struct mlx5_core_dev *mdev, u8 num_tc, in mlx5e_mqprio_rl_init() argument
465 if (!mlx5_qos_is_supported(mdev)) { in mlx5e_mqprio_rl_init()
466 qos_warn(mdev, "Missing QoS capabilities. Try disabling SRIOV or use a supported device."); in mlx5e_mqprio_rl_init()
469 if (num_tc > mlx5e_qos_max_leaf_nodes(mdev)) in mlx5e_mqprio_rl_init()
472 rl->mdev = mdev; in mlx5e_mqprio_rl_init()
478 err = mlx5_qos_create_root_node(mdev, &rl->root_id); in mlx5e_mqprio_rl_init()
482 qos_dbg(mdev, "Root created, id %#x\n", rl->root_id); in mlx5e_mqprio_rl_init()
487 max_average_bw = mlx5e_qos_bytes2mbits(mdev, max_rate[tc]); in mlx5e_mqprio_rl_init()
488 err = mlx5_qos_create_leaf_node(mdev, rl->root_id, 0, max_average_bw, in mlx5e_mqprio_rl_init()
493 qos_dbg(mdev, "Leaf[%d] created, id %#x, max average bw %u Mbits/sec\n", in mlx5e_mqprio_rl_init()
500 mlx5_qos_destroy_node(mdev, rl->leaves_id[tc]); in mlx5e_mqprio_rl_init()
501 mlx5_qos_destroy_node(mdev, rl->root_id); in mlx5e_mqprio_rl_init()
512 mlx5_qos_destroy_node(rl->mdev, rl->leaves_id[tc]); in mlx5e_mqprio_rl_cleanup()
513 mlx5_qos_destroy_node(rl->mdev, rl->root_id); in mlx5e_mqprio_rl_cleanup()