xref: /kernel/linux/linux-5.10/drivers/vdpa/mlx5/net/mlx5_vnet.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/drivers/vdpa/mlx5/net/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
28c2ecf20Sopenharmony_ci/* Copyright (c) 2020 Mellanox Technologies Ltd. */
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef __MLX5_VNET_H_
58c2ecf20Sopenharmony_ci#define __MLX5_VNET_H_
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#include <linux/vdpa.h>
88c2ecf20Sopenharmony_ci#include <linux/virtio_net.h>
98c2ecf20Sopenharmony_ci#include <linux/vringh.h>
108c2ecf20Sopenharmony_ci#include <linux/mlx5/driver.h>
118c2ecf20Sopenharmony_ci#include <linux/mlx5/cq.h>
128c2ecf20Sopenharmony_ci#include <linux/mlx5/qp.h>
138c2ecf20Sopenharmony_ci#include "mlx5_vdpa.h"
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cistatic inline u32 mlx5_vdpa_max_qps(int max_vqs)
168c2ecf20Sopenharmony_ci{
178c2ecf20Sopenharmony_ci	return max_vqs / 2;
188c2ecf20Sopenharmony_ci}
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#define to_mlx5_vdpa_ndev(__mvdev) container_of(__mvdev, struct mlx5_vdpa_net, mvdev)
218c2ecf20Sopenharmony_civoid *mlx5_vdpa_add_dev(struct mlx5_core_dev *mdev);
228c2ecf20Sopenharmony_civoid mlx5_vdpa_remove_dev(struct mlx5_vdpa_dev *mvdev);
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci#endif /* __MLX5_VNET_H_ */
25

Indexes created Thu Nov 07 10:32:03 CST 2024