linux/drivers/infiniband/ulp/ipoib/ipoib_ib.c

/*
 * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
 * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
 * Copyright (c) 2004, 2005 Voltaire, 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.
 */

#include <linux/delay.h>
#include <linux/moduleparam.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>

#include <linux/ip.h>
#include <linux/tcp.h>
#include <rdma/ib_cache.h>

#include "ipoib.h"

#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG_DATA
static int data_debug_level;

module_param(data_debug_level, int, 0644);
MODULE_PARM_DESC();
#endif

struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
				 struct ib_pd *pd, struct rdma_ah_attr *attr)
{}

void ipoib_free_ah(struct kref *kref)
{}

static void ipoib_ud_dma_unmap_rx(struct ipoib_dev_priv *priv,
				  u64 mapping[IPOIB_UD_RX_SG])
{}

static int ipoib_ib_post_receive(struct net_device *dev, int id)
{}

static struct sk_buff *ipoib_alloc_rx_skb(struct net_device *dev, int id)
{}

static int ipoib_ib_post_receives(struct net_device *dev)
{}

static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
{}

int ipoib_dma_map_tx(struct ib_device *ca, struct ipoib_tx_buf *tx_req)
{}

void ipoib_dma_unmap_tx(struct ipoib_dev_priv *priv,
			struct ipoib_tx_buf *tx_req)
{}

/*
 * As the result of a completion error the QP Can be transferred to SQE states.
 * The function checks if the (send)QP is in SQE state and
 * moves it back to RTS state, that in order to have it functional again.
 */
static void ipoib_qp_state_validate_work(struct work_struct *work)
{}

static void ipoib_ib_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
{}

static int poll_tx(struct ipoib_dev_priv *priv)
{}

int ipoib_rx_poll(struct napi_struct *napi, int budget)
{}

int ipoib_tx_poll(struct napi_struct *napi, int budget)
{}

void ipoib_ib_rx_completion(struct ib_cq *cq, void *ctx_ptr)
{}

/* The function will force napi_schedule */
void ipoib_napi_schedule_work(struct work_struct *work)
{}

void ipoib_ib_tx_completion(struct ib_cq *cq, void *ctx_ptr)
{}

static inline int post_send(struct ipoib_dev_priv *priv,
			    unsigned int wr_id,
			    struct ib_ah *address, u32 dqpn,
			    struct ipoib_tx_buf *tx_req,
			    void *head, int hlen)
{}

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

static void ipoib_reap_dead_ahs(struct ipoib_dev_priv *priv)
{}

void ipoib_reap_ah(struct work_struct *work)
{}

static void ipoib_start_ah_reaper(struct ipoib_dev_priv *priv)
{}

static void ipoib_stop_ah_reaper(struct ipoib_dev_priv *priv)
{}

static int recvs_pending(struct net_device *dev)
{}

static void check_qp_movement_and_print(struct ipoib_dev_priv *priv,
					struct ib_qp *qp,
					enum ib_qp_state new_state)
{}

static void ipoib_napi_enable(struct net_device *dev)
{}

static void ipoib_napi_disable(struct net_device *dev)
{}

int ipoib_ib_dev_stop_default(struct net_device *dev)
{}

int ipoib_ib_dev_open_default(struct net_device *dev)
{}

int ipoib_ib_dev_open(struct net_device *dev)
{}

void ipoib_ib_dev_stop(struct net_device *dev)
{}

void ipoib_pkey_dev_check_presence(struct net_device *dev)
{}

void ipoib_ib_dev_up(struct net_device *dev)
{}

void ipoib_ib_dev_down(struct net_device *dev)
{}

void ipoib_drain_cq(struct net_device *dev)
{}

/*
 * Takes whatever value which is in pkey index 0 and updates priv->pkey
 * returns 0 if the pkey value was changed.
 */
static inline int update_parent_pkey(struct ipoib_dev_priv *priv)
{}
/*
 * returns 0 if pkey value was found in a different slot.
 */
static inline int update_child_pkey(struct ipoib_dev_priv *priv)
{}

/*
 * returns true if the device address of the ipoib interface has changed and the
 * new address is a valid one (i.e in the gid table), return false otherwise.
 */
static bool ipoib_dev_addr_changed_valid(struct ipoib_dev_priv *priv)
{}

static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv,
				enum ipoib_flush_level level,
				int nesting)
{}

void ipoib_ib_dev_flush_light(struct work_struct *work)
{}

void ipoib_ib_dev_flush_normal(struct work_struct *work)
{}

void ipoib_ib_dev_flush_heavy(struct work_struct *work)
{}

void ipoib_ib_dev_cleanup(struct net_device *dev)
{}