linux/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c

/*
 * Copyright (c) 2017, Mellanox Technologies. All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
 * General Public License (GPL) Version 2, available from the file
 * COPYING in the main directory of this source tree, or the
 * OpenIB.org BSD license below:
 *
 *     Redistribution and use in source and binary forms, with or
 *     without modification, are permitted provided that the following
 *     conditions are met:
 *
 *      - Redistributions of source code must retain the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer.
 *
 *      - Redistributions in binary form must reproduce the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer in the documentation and/or other materials
 *        provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#include <rdma/ib_verbs.h>
#include <linux/mlx5/fs.h>
#include "en.h"
#include "en/params.h"
#include "ipoib.h"
#include "en/fs_ethtool.h"

#define IB_DEFAULT_Q_KEY
#define MLX5I_PARAMS_DEFAULT_LOG_RQ_SIZE

static int mlx5i_open(struct net_device *netdev);
static int mlx5i_close(struct net_device *netdev);
static int mlx5i_change_mtu(struct net_device *netdev, int new_mtu);

static const struct net_device_ops mlx5i_netdev_ops =;

/* IPoIB mlx5 netdev profile */
static void mlx5i_build_nic_params(struct mlx5_core_dev *mdev,
				   struct mlx5e_params *params)
{}

/* Called directly after IPoIB netdevice was created to initialize SW structs */
int mlx5i_init(struct mlx5_core_dev *mdev, struct net_device *netdev)
{}

/* Called directly before IPoIB netdevice is destroyed to cleanup SW structs */
void mlx5i_cleanup(struct mlx5e_priv *priv)
{}

static void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv)
{}

void mlx5i_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats)
{}

struct net_device *mlx5i_parent_get(struct net_device *netdev)
{}

void mlx5i_parent_put(struct net_device *netdev)
{}

int mlx5i_init_underlay_qp(struct mlx5e_priv *priv)
{}

void mlx5i_uninit_underlay_qp(struct mlx5e_priv *priv)
{}

#define MLX5_QP_ENHANCED_ULP_STATELESS_MODE

int mlx5i_create_underlay_qp(struct mlx5e_priv *priv)
{}

void mlx5i_destroy_underlay_qp(struct mlx5_core_dev *mdev, u32 qpn)
{}

int mlx5i_update_nic_rx(struct mlx5e_priv *priv)
{}

int mlx5i_create_tis(struct mlx5_core_dev *mdev, u32 underlay_qpn, u32 *tisn)
{}

static int mlx5i_init_tx(struct mlx5e_priv *priv)
{}

static void mlx5i_cleanup_tx(struct mlx5e_priv *priv)
{}

static int mlx5i_create_flow_steering(struct mlx5e_priv *priv)
{}

static void mlx5i_destroy_flow_steering(struct mlx5e_priv *priv)
{}

static int mlx5i_init_rx(struct mlx5e_priv *priv)
{}

static void mlx5i_cleanup_rx(struct mlx5e_priv *priv)
{}

/* The stats groups order is opposite to the update_stats() order calls */
static mlx5e_stats_grp_t mlx5i_stats_grps[] =;

static unsigned int mlx5i_stats_grps_num(struct mlx5e_priv *priv)
{}

u32 mlx5i_get_tisn(struct mlx5_core_dev *mdev, struct mlx5e_priv *priv, u8 lag_port, u8 tc)
{}

static const struct mlx5e_profile mlx5i_nic_profile =;

/* mlx5i netdev NDos */

static int mlx5i_change_mtu(struct net_device *netdev, int new_mtu)
{}

int mlx5i_dev_init(struct net_device *dev)
{}

int mlx5i_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{}

void mlx5i_dev_cleanup(struct net_device *dev)
{}

static int mlx5i_open(struct net_device *netdev)
{}

static int mlx5i_close(struct net_device *netdev)
{}

/* IPoIB RDMA netdev callbacks */
static int mlx5i_attach_mcast(struct net_device *netdev, struct ib_device *hca,
			      union ib_gid *gid, u16 lid, int set_qkey,
			      u32 qkey)
{}

static int mlx5i_detach_mcast(struct net_device *netdev, struct ib_device *hca,
			      union ib_gid *gid, u16 lid)
{}

static int mlx5i_xmit(struct net_device *dev, struct sk_buff *skb,
		      struct ib_ah *address, u32 dqpn)
{}

static void mlx5i_set_pkey_index(struct net_device *netdev, int id)
{}

static int mlx5i_check_required_hca_cap(struct mlx5_core_dev *mdev)
{}

static void mlx5_rdma_netdev_free(struct net_device *netdev)
{}

static bool mlx5_is_sub_interface(struct mlx5_core_dev *mdev)
{}

static const struct mlx5e_profile *mlx5_get_profile(struct mlx5_core_dev *mdev)
{}

static int mlx5_rdma_setup_rn(struct ib_device *ibdev, u32 port_num,
			      struct net_device *netdev, void *param)
{}

int mlx5_rdma_rn_get_params(struct mlx5_core_dev *mdev,
			    struct ib_device *device,
			    struct rdma_netdev_alloc_params *params)
{}
EXPORT_SYMBOL();