linux/include/linux/mlx4/qp.h

/*
 * Copyright (c) 2007 Cisco Systems, Inc.  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.
 */

#ifndef MLX4_QP_H
#define MLX4_QP_H

#include <linux/types.h>
#include <linux/if_ether.h>

#include <linux/mlx4/device.h>

#define MLX4_INVALID_LKEY

enum mlx4_qp_optpar {};

enum mlx4_qp_state {};

enum {};

enum {};

enum {};

enum {};

#define MLX4_EN_RSS_KEY_SIZE

struct mlx4_rss_context {};

struct mlx4_qp_path {};

enum {};

enum {};

enum {};

enum {};

enum {};

struct mlx4_qp_context {};

struct mlx4_update_qp_context {};

enum {};

enum {};

enum {};

/* Which firmware version adds support for NEC (NoErrorCompletion) bit */
#define MLX4_FW_VER_WQE_CTRL_NEC

enum {};

mlx4_wqe_qpn_vlan;

struct mlx4_wqe_ctrl_seg {};

enum {};

struct mlx4_wqe_mlx_seg {};

struct mlx4_wqe_datagram_seg {};

struct mlx4_wqe_lso_seg {};

enum mlx4_wqe_bind_seg_flags2 {};

struct mlx4_wqe_bind_seg {};

enum {};

struct mlx4_wqe_fmr_seg {};

struct mlx4_wqe_fmr_ext_seg {};

struct mlx4_wqe_local_inval_seg {};

struct mlx4_wqe_raddr_seg {};

struct mlx4_wqe_atomic_seg {};

struct mlx4_wqe_masked_atomic_seg {};

struct mlx4_wqe_data_seg {};

enum {};

struct mlx4_wqe_inline_seg {};

enum mlx4_update_qp_attr {};

enum mlx4_update_qp_params_flags {};

struct mlx4_update_qp_params {};

struct mlx4_qp *mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn);
int mlx4_update_qp(struct mlx4_dev *dev, u32 qpn,
		   enum mlx4_update_qp_attr attr,
		   struct mlx4_update_qp_params *params);
int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
		   enum mlx4_qp_state cur_state, enum mlx4_qp_state new_state,
		   struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar,
		   int sqd_event, struct mlx4_qp *qp);

int mlx4_qp_query(struct mlx4_dev *dev, struct mlx4_qp *qp,
		  struct mlx4_qp_context *context);

int mlx4_qp_to_ready(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
		     struct mlx4_qp_context *context,
		     struct mlx4_qp *qp, enum mlx4_qp_state *qp_state);

static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn)
{}

void mlx4_qp_remove(struct mlx4_dev *dev, struct mlx4_qp *qp);

static inline u16 folded_qp(u32 q)
{}

u16 mlx4_qp_roce_entropy(struct mlx4_dev *dev, u32 qpn);

void mlx4_put_qp(struct mlx4_qp *qp);
#endif /* MLX4_QP_H */