Lines Matching defs:mdev

44 u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport)
57 err = mlx5_cmd_exec_inout(mdev, query_vport_state, in, out);
64 int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
76 return mlx5_cmd_exec_in(mdev, modify_vport_state, in);
79 static int mlx5_query_nic_vport_context(struct mlx5_core_dev *mdev, u16 vport,
90 return mlx5_cmd_exec_inout(mdev, query_nic_vport_context, in, out);
93 int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev,
99 err = mlx5_query_nic_vport_context(mdev, vport, out);
107 void mlx5_query_min_inline(struct mlx5_core_dev *mdev,
110 switch (MLX5_CAP_ETH(mdev, wqe_inline_mode)) {
112 if (!mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode))
125 int mlx5_modify_nic_vport_min_inline(struct mlx5_core_dev *mdev,
143 return mlx5_cmd_exec_in(mdev, modify_nic_vport_context, in);
146 int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev,
162 err = mlx5_cmd_exec_inout(mdev, query_nic_vport_context, in, out);
170 int mlx5_query_mac_address(struct mlx5_core_dev *mdev, u8 *addr)
172 return mlx5_query_nic_vport_mac_address(mdev, 0, false, addr);
176 int mlx5_modify_nic_vport_mac_address(struct mlx5_core_dev *mdev,
203 err = mlx5_cmd_exec_in(mdev, modify_nic_vport_context, in);
211 int mlx5_query_nic_vport_mtu(struct mlx5_core_dev *mdev, u16 *mtu)
221 err = mlx5_query_nic_vport_context(mdev, 0, out);
231 int mlx5_modify_nic_vport_mtu(struct mlx5_core_dev *mdev, u16 mtu)
246 err = mlx5_cmd_exec_in(mdev, modify_nic_vport_context, in);
420 int mlx5_query_nic_vport_system_image_guid(struct mlx5_core_dev *mdev,
431 err = mlx5_query_nic_vport_context(mdev, 0, out);
443 int mlx5_query_nic_vport_sd_group(struct mlx5_core_dev *mdev, u8 *sd_group)
453 err = mlx5_query_nic_vport_context(mdev, 0, out);
464 int mlx5_query_nic_vport_node_guid(struct mlx5_core_dev *mdev, u64 *node_guid)
473 mlx5_query_nic_vport_context(mdev, 0, out);
484 int mlx5_modify_nic_vport_node_guid(struct mlx5_core_dev *mdev,
492 if (!MLX5_CAP_GEN(mdev, vport_group_manager))
510 err = mlx5_cmd_exec_in(mdev, modify_nic_vport_context, in);
517 int mlx5_query_nic_vport_qkey_viol_cntr(struct mlx5_core_dev *mdev,
527 mlx5_query_nic_vport_context(mdev, 0, out);
785 int mlx5_query_nic_vport_promisc(struct mlx5_core_dev *mdev,
799 err = mlx5_query_nic_vport_context(mdev, vport, out);
816 int mlx5_modify_nic_vport_promisc(struct mlx5_core_dev *mdev,
839 err = mlx5_cmd_exec_in(mdev, modify_nic_vport_context, in);
852 int mlx5_nic_vport_update_local_lb(struct mlx5_core_dev *mdev, bool enable)
858 if (!MLX5_CAP_GEN(mdev, disable_local_lb_mc) &&
859 !MLX5_CAP_GEN(mdev, disable_local_lb_uc))
871 if (MLX5_CAP_GEN(mdev, disable_local_lb_mc))
875 if (MLX5_CAP_GEN(mdev, disable_local_lb_uc))
881 err = mlx5_cmd_exec_in(mdev, modify_nic_vport_context, in);
884 mlx5_core_dbg(mdev, "%s local_lb\n",
892 int mlx5_nic_vport_query_local_lb(struct mlx5_core_dev *mdev, bool *status)
903 err = mlx5_query_nic_vport_context(mdev, 0, out);
926 static int mlx5_nic_vport_update_roce_state(struct mlx5_core_dev *mdev,
943 err = mlx5_cmd_exec_in(mdev, modify_nic_vport_context, in);
950 int mlx5_nic_vport_enable_roce(struct mlx5_core_dev *mdev)
955 if (!mdev->roce.roce_en)
956 err = mlx5_nic_vport_update_roce_state(mdev, MLX5_VPORT_ROCE_ENABLED);
959 mdev->roce.roce_en++;
966 int mlx5_nic_vport_disable_roce(struct mlx5_core_dev *mdev)
971 if (mdev->roce.roce_en) {
972 mdev->roce.roce_en--;
973 if (mdev->roce.roce_en == 0)
974 err = mlx5_nic_vport_update_roce_state(mdev, MLX5_VPORT_ROCE_DISABLED);
977 mdev->roce.roce_en++;
1020 int mlx5_query_vport_down_stats(struct mlx5_core_dev *mdev, u16 vport,
1034 err = mlx5_cmd_exec_inout(mdev, query_vnic_env, in, out);
1165 u64 mlx5_query_nic_system_image_guid(struct mlx5_core_dev *mdev)
1167 int port_type_cap = MLX5_CAP_GEN(mdev, port_type);
1171 if (mdev->sys_image_guid)
1172 return mdev->sys_image_guid;
1175 err = mlx5_query_nic_vport_system_image_guid(mdev, &tmp);
1177 err = mlx5_query_hca_vport_system_image_guid(mdev, &tmp);
1179 mdev->sys_image_guid = err ? 0 : tmp;
1181 return mdev->sys_image_guid;