Commit 8be1a6d6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4: Update/add Mellanox Technologies copyright lines to mlx4 driver files
  mlx4_core: Add VLAN tag field to WQE control segment struct
  RDMA/nes: CM connection setup/teardown rework
  IPoIB: Correct help text for INFINIBAND_IPOIB_DEBUG
  IPoIB/cm: Connected mode is no longer EXPERIMENTAL
  RDMA/ucm: BKL is not needed for ib_ucm_open()
  RDMA/ucma: BKL is not needed for ucma_open()
parents 852fef69 cc9969c9
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include <linux/cdev.h> #include <linux/cdev.h>
#include <linux/idr.h> #include <linux/idr.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -1154,11 +1153,18 @@ static unsigned int ib_ucm_poll(struct file *filp, ...@@ -1154,11 +1153,18 @@ static unsigned int ib_ucm_poll(struct file *filp,
return mask; return mask;
} }
/*
* ib_ucm_open() does not need the BKL:
*
* - no global state is referred to;
* - there is no ioctl method to race against;
* - no further module initialization is required for open to work
* after the device is registered.
*/
static int ib_ucm_open(struct inode *inode, struct file *filp) static int ib_ucm_open(struct inode *inode, struct file *filp)
{ {
struct ib_ucm_file *file; struct ib_ucm_file *file;
cycle_kernel_lock();
file = kmalloc(sizeof(*file), GFP_KERNEL); file = kmalloc(sizeof(*file), GFP_KERNEL);
if (!file) if (!file)
return -ENOMEM; return -ENOMEM;
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include <linux/in.h> #include <linux/in.h>
#include <linux/in6.h> #include <linux/in6.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/smp_lock.h>
#include <rdma/rdma_user_cm.h> #include <rdma/rdma_user_cm.h>
#include <rdma/ib_marshall.h> #include <rdma/ib_marshall.h>
...@@ -1149,6 +1148,14 @@ static unsigned int ucma_poll(struct file *filp, struct poll_table_struct *wait) ...@@ -1149,6 +1148,14 @@ static unsigned int ucma_poll(struct file *filp, struct poll_table_struct *wait)
return mask; return mask;
} }
/*
* ucma_open() does not need the BKL:
*
* - no global state is referred to;
* - there is no ioctl method to race against;
* - no further module initialization is required for open to work
* after the device is registered.
*/
static int ucma_open(struct inode *inode, struct file *filp) static int ucma_open(struct inode *inode, struct file *filp)
{ {
struct ucma_file *file; struct ucma_file *file;
...@@ -1157,7 +1164,6 @@ static int ucma_open(struct inode *inode, struct file *filp) ...@@ -1157,7 +1164,6 @@ static int ucma_open(struct inode *inode, struct file *filp)
if (!file) if (!file)
return -ENOMEM; return -ENOMEM;
lock_kernel();
INIT_LIST_HEAD(&file->event_list); INIT_LIST_HEAD(&file->event_list);
INIT_LIST_HEAD(&file->ctx_list); INIT_LIST_HEAD(&file->ctx_list);
init_waitqueue_head(&file->poll_wait); init_waitqueue_head(&file->poll_wait);
...@@ -1165,7 +1171,6 @@ static int ucma_open(struct inode *inode, struct file *filp) ...@@ -1165,7 +1171,6 @@ static int ucma_open(struct inode *inode, struct file *filp)
filp->private_data = file; filp->private_data = file;
file->filp = filp; file->filp = filp;
unlock_kernel();
return 0; return 0;
} }
......
/* /*
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2006, 2007 Cisco Systems. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
...@@ -276,6 +276,7 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r ...@@ -276,6 +276,7 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r
} }
nes_free_resource(nesadapter, nesadapter->allocated_qps, nesqp->hwqp.qp_id); nes_free_resource(nesadapter, nesadapter->allocated_qps, nesqp->hwqp.qp_id);
nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = NULL;
kfree(nesqp->allocated_buffer); kfree(nesqp->allocated_buffer);
} }
...@@ -289,7 +290,6 @@ void nes_rem_ref(struct ib_qp *ibqp) ...@@ -289,7 +290,6 @@ void nes_rem_ref(struct ib_qp *ibqp)
struct nes_qp *nesqp; struct nes_qp *nesqp;
struct nes_vnic *nesvnic = to_nesvnic(ibqp->device); struct nes_vnic *nesvnic = to_nesvnic(ibqp->device);
struct nes_device *nesdev = nesvnic->nesdev; struct nes_device *nesdev = nesvnic->nesdev;
struct nes_adapter *nesadapter = nesdev->nesadapter;
struct nes_hw_cqp_wqe *cqp_wqe; struct nes_hw_cqp_wqe *cqp_wqe;
struct nes_cqp_request *cqp_request; struct nes_cqp_request *cqp_request;
u32 opcode; u32 opcode;
...@@ -303,8 +303,6 @@ void nes_rem_ref(struct ib_qp *ibqp) ...@@ -303,8 +303,6 @@ void nes_rem_ref(struct ib_qp *ibqp)
} }
if (atomic_dec_and_test(&nesqp->refcount)) { if (atomic_dec_and_test(&nesqp->refcount)) {
nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = NULL;
/* Destroy the QP */ /* Destroy the QP */
cqp_request = nes_get_cqp_request(nesdev); cqp_request = nes_get_cqp_request(nesdev);
if (cqp_request == NULL) { if (cqp_request == NULL) {
......
This diff is collapsed.
...@@ -83,6 +83,8 @@ enum nes_timer_type { ...@@ -83,6 +83,8 @@ enum nes_timer_type {
#define SET_FIN 4 #define SET_FIN 4
#define SET_RST 8 #define SET_RST 8
#define TCP_OPTIONS_PADDING 3
struct option_base { struct option_base {
u8 optionnum; u8 optionnum;
u8 length; u8 length;
...@@ -177,6 +179,7 @@ enum nes_cm_node_state { ...@@ -177,6 +179,7 @@ enum nes_cm_node_state {
NES_CM_STATE_ESTABLISHED, NES_CM_STATE_ESTABLISHED,
NES_CM_STATE_ACCEPTING, NES_CM_STATE_ACCEPTING,
NES_CM_STATE_MPAREQ_SENT, NES_CM_STATE_MPAREQ_SENT,
NES_CM_STATE_MPAREQ_RCVD,
NES_CM_STATE_TSA, NES_CM_STATE_TSA,
NES_CM_STATE_FIN_WAIT1, NES_CM_STATE_FIN_WAIT1,
NES_CM_STATE_FIN_WAIT2, NES_CM_STATE_FIN_WAIT2,
...@@ -187,6 +190,16 @@ enum nes_cm_node_state { ...@@ -187,6 +190,16 @@ enum nes_cm_node_state {
NES_CM_STATE_CLOSED NES_CM_STATE_CLOSED
}; };
enum nes_tcpip_pkt_type {
NES_PKT_TYPE_UNKNOWN,
NES_PKT_TYPE_SYN,
NES_PKT_TYPE_SYNACK,
NES_PKT_TYPE_ACK,
NES_PKT_TYPE_FIN,
NES_PKT_TYPE_RST
};
/* type of nes connection */ /* type of nes connection */
enum nes_cm_conn_type { enum nes_cm_conn_type {
NES_CM_IWARP_CONN_TYPE, NES_CM_IWARP_CONN_TYPE,
...@@ -257,7 +270,9 @@ struct nes_cm_node { ...@@ -257,7 +270,9 @@ struct nes_cm_node {
struct net_device *netdev; struct net_device *netdev;
struct nes_cm_node *loopbackpartner; struct nes_cm_node *loopbackpartner;
struct list_head retrans_list;
struct nes_timer_entry *send_entry;
spinlock_t retrans_list_lock; spinlock_t retrans_list_lock;
struct list_head recv_list; struct list_head recv_list;
spinlock_t recv_list_lock; spinlock_t recv_list_lock;
...@@ -276,6 +291,8 @@ struct nes_cm_node { ...@@ -276,6 +291,8 @@ struct nes_cm_node {
struct nes_vnic *nesvnic; struct nes_vnic *nesvnic;
int apbvt_set; int apbvt_set;
int accept_pend; int accept_pend;
int freed;
struct nes_qp *nesqp;
}; };
/* structure for client or CM to fill when making CM api calls. */ /* structure for client or CM to fill when making CM api calls. */
...@@ -366,14 +383,14 @@ struct nes_cm_ops { ...@@ -366,14 +383,14 @@ struct nes_cm_ops {
struct nes_cm_info *); struct nes_cm_info *);
int (*stop_listener)(struct nes_cm_core *, struct nes_cm_listener *); int (*stop_listener)(struct nes_cm_core *, struct nes_cm_listener *);
struct nes_cm_node * (*connect)(struct nes_cm_core *, struct nes_cm_node * (*connect)(struct nes_cm_core *,
struct nes_vnic *, struct ietf_mpa_frame *, struct nes_vnic *, u16, void *,
struct nes_cm_info *); struct nes_cm_info *);
int (*close)(struct nes_cm_core *, struct nes_cm_node *); int (*close)(struct nes_cm_core *, struct nes_cm_node *);
int (*accept)(struct nes_cm_core *, struct ietf_mpa_frame *, int (*accept)(struct nes_cm_core *, struct ietf_mpa_frame *,
struct nes_cm_node *); struct nes_cm_node *);
int (*reject)(struct nes_cm_core *, struct ietf_mpa_frame *, int (*reject)(struct nes_cm_core *, struct ietf_mpa_frame *,
struct nes_cm_node *); struct nes_cm_node *);
int (*recv_pkt)(struct nes_cm_core *, struct nes_vnic *, void (*recv_pkt)(struct nes_cm_core *, struct nes_vnic *,
struct sk_buff *); struct sk_buff *);
int (*destroy_cm_core)(struct nes_cm_core *); int (*destroy_cm_core)(struct nes_cm_core *);
int (*get)(struct nes_cm_core *); int (*get)(struct nes_cm_core *);
......
...@@ -2814,7 +2814,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -2814,7 +2814,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
nesqp = *((struct nes_qp **)&context); nesqp = *((struct nes_qp **)&context);
if (atomic_inc_return(&nesqp->close_timer_started) == 1) { if (atomic_inc_return(&nesqp->close_timer_started) == 1) {
nesqp->cm_id->add_ref(nesqp->cm_id); nesqp->cm_id->add_ref(nesqp->cm_id);
nes_add_ref(&nesqp->ibqp);
schedule_nes_timer(nesqp->cm_node, (struct sk_buff *)nesqp, schedule_nes_timer(nesqp->cm_node, (struct sk_buff *)nesqp,
NES_TIMER_TYPE_CLOSE, 1, 0); NES_TIMER_TYPE_CLOSE, 1, 0);
nes_debug(NES_DBG_AEQ, "QP%u Not decrementing QP refcount (%d)," nes_debug(NES_DBG_AEQ, "QP%u Not decrementing QP refcount (%d),"
...@@ -2838,7 +2837,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -2838,7 +2837,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
if (async_event_id == NES_AEQE_AEID_RESET_SENT) { if (async_event_id == NES_AEQE_AEID_RESET_SENT) {
tcp_state = NES_AEQE_TCP_STATE_CLOSED; tcp_state = NES_AEQE_TCP_STATE_CLOSED;
} }
nes_add_ref(&nesqp->ibqp);
spin_lock_irqsave(&nesqp->lock, flags); spin_lock_irqsave(&nesqp->lock, flags);
nesqp->hw_iwarp_state = iwarp_state; nesqp->hw_iwarp_state = iwarp_state;
nesqp->hw_tcp_state = tcp_state; nesqp->hw_tcp_state = tcp_state;
...@@ -2876,7 +2874,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -2876,7 +2874,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
} }
spin_unlock_irqrestore(&nesqp->lock, flags); spin_unlock_irqrestore(&nesqp->lock, flags);
if (next_iwarp_state) { if (next_iwarp_state) {
nes_add_ref(&nesqp->ibqp);
nes_debug(NES_DBG_AEQ, "issuing hw modifyqp for QP%u. next state = 0x%08X," nes_debug(NES_DBG_AEQ, "issuing hw modifyqp for QP%u. next state = 0x%08X,"
" also added another reference\n", " also added another reference\n",
nesqp->hwqp.qp_id, next_iwarp_state); nesqp->hwqp.qp_id, next_iwarp_state);
...@@ -2888,7 +2885,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -2888,7 +2885,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
/* FIN Received but ib state not RTS, /* FIN Received but ib state not RTS,
close complete will be on its way */ close complete will be on its way */
spin_unlock_irqrestore(&nesqp->lock, flags); spin_unlock_irqrestore(&nesqp->lock, flags);
nes_rem_ref(&nesqp->ibqp);
return; return;
} }
spin_unlock_irqrestore(&nesqp->lock, flags); spin_unlock_irqrestore(&nesqp->lock, flags);
...@@ -2922,7 +2918,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -2922,7 +2918,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
if ((tcp_state == NES_AEQE_TCP_STATE_CLOSE_WAIT) || if ((tcp_state == NES_AEQE_TCP_STATE_CLOSE_WAIT) ||
((nesqp->ibqp_state == IB_QPS_RTS)&& ((nesqp->ibqp_state == IB_QPS_RTS)&&
(async_event_id == NES_AEQE_AEID_LLP_CONNECTION_RESET))) { (async_event_id == NES_AEQE_AEID_LLP_CONNECTION_RESET))) {
nes_add_ref(&nesqp->ibqp);
nes_cm_disconn(nesqp); nes_cm_disconn(nesqp);
} else { } else {
nesqp->in_disconnect = 0; nesqp->in_disconnect = 0;
...@@ -2931,7 +2926,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -2931,7 +2926,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
break; break;
case NES_AEQE_AEID_LLP_TOO_MANY_RETRIES: case NES_AEQE_AEID_LLP_TOO_MANY_RETRIES:
nesqp = *((struct nes_qp **)&context); nesqp = *((struct nes_qp **)&context);
nes_add_ref(&nesqp->ibqp);
spin_lock_irqsave(&nesqp->lock, flags); spin_lock_irqsave(&nesqp->lock, flags);
nesqp->hw_iwarp_state = NES_AEQE_IWARP_STATE_ERROR; nesqp->hw_iwarp_state = NES_AEQE_IWARP_STATE_ERROR;
nesqp->hw_tcp_state = NES_AEQE_TCP_STATE_CLOSED; nesqp->hw_tcp_state = NES_AEQE_TCP_STATE_CLOSED;
...@@ -3042,7 +3036,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -3042,7 +3036,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context); nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
} }
/* tell cm to disconnect, cm will queue work to thread */ /* tell cm to disconnect, cm will queue work to thread */
nes_add_ref(&nesqp->ibqp);
nes_cm_disconn(nesqp); nes_cm_disconn(nesqp);
break; break;
case NES_AEQE_AEID_DDP_UBE_INVALID_MSN_NO_BUFFER_AVAILABLE: case NES_AEQE_AEID_DDP_UBE_INVALID_MSN_NO_BUFFER_AVAILABLE:
...@@ -3062,7 +3055,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -3062,7 +3055,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context); nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
} }
/* tell cm to disconnect, cm will queue work to thread */ /* tell cm to disconnect, cm will queue work to thread */
nes_add_ref(&nesqp->ibqp);
nes_cm_disconn(nesqp); nes_cm_disconn(nesqp);
break; break;
case NES_AEQE_AEID_LLP_RECEIVED_MPA_CRC_ERROR: case NES_AEQE_AEID_LLP_RECEIVED_MPA_CRC_ERROR:
...@@ -3082,7 +3074,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -3082,7 +3074,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context); nesqp->ibqp.event_handler(&ibevent, nesqp->ibqp.qp_context);
} }
/* tell cm to disconnect, cm will queue work to thread */ /* tell cm to disconnect, cm will queue work to thread */
nes_add_ref(&nesqp->ibqp);
nes_cm_disconn(nesqp); nes_cm_disconn(nesqp);
break; break;
/* TODO: additional AEs need to be here */ /* TODO: additional AEs need to be here */
......
...@@ -2867,7 +2867,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2867,7 +2867,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
nesqp->hwqp.qp_id, attr->qp_state, nesqp->ibqp_state, nesqp->hwqp.qp_id, attr->qp_state, nesqp->ibqp_state,
nesqp->iwarp_state, atomic_read(&nesqp->refcount)); nesqp->iwarp_state, atomic_read(&nesqp->refcount));
nes_add_ref(&nesqp->ibqp);
spin_lock_irqsave(&nesqp->lock, qplockflags); spin_lock_irqsave(&nesqp->lock, qplockflags);
nes_debug(NES_DBG_MOD_QP, "QP%u: hw_iwarp_state=0x%X, hw_tcp_state=0x%X," nes_debug(NES_DBG_MOD_QP, "QP%u: hw_iwarp_state=0x%X, hw_tcp_state=0x%X,"
...@@ -2882,7 +2881,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2882,7 +2881,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
nesqp->hwqp.qp_id); nesqp->hwqp.qp_id);
if (nesqp->iwarp_state > (u32)NES_CQP_QP_IWARP_STATE_IDLE) { if (nesqp->iwarp_state > (u32)NES_CQP_QP_IWARP_STATE_IDLE) {
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return -EINVAL; return -EINVAL;
} }
next_iwarp_state = NES_CQP_QP_IWARP_STATE_IDLE; next_iwarp_state = NES_CQP_QP_IWARP_STATE_IDLE;
...@@ -2893,7 +2891,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2893,7 +2891,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
nesqp->hwqp.qp_id); nesqp->hwqp.qp_id);
if (nesqp->iwarp_state>(u32)NES_CQP_QP_IWARP_STATE_IDLE) { if (nesqp->iwarp_state>(u32)NES_CQP_QP_IWARP_STATE_IDLE) {
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return -EINVAL; return -EINVAL;
} }
next_iwarp_state = NES_CQP_QP_IWARP_STATE_IDLE; next_iwarp_state = NES_CQP_QP_IWARP_STATE_IDLE;
...@@ -2904,14 +2901,12 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2904,14 +2901,12 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
nesqp->hwqp.qp_id); nesqp->hwqp.qp_id);
if (nesqp->iwarp_state>(u32)NES_CQP_QP_IWARP_STATE_RTS) { if (nesqp->iwarp_state>(u32)NES_CQP_QP_IWARP_STATE_RTS) {
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return -EINVAL; return -EINVAL;
} }
if (nesqp->cm_id == NULL) { if (nesqp->cm_id == NULL) {
nes_debug(NES_DBG_MOD_QP, "QP%u: Failing attempt to move QP to RTS without a CM_ID. \n", nes_debug(NES_DBG_MOD_QP, "QP%u: Failing attempt to move QP to RTS without a CM_ID. \n",
nesqp->hwqp.qp_id ); nesqp->hwqp.qp_id );
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return -EINVAL; return -EINVAL;
} }
next_iwarp_state = NES_CQP_QP_IWARP_STATE_RTS; next_iwarp_state = NES_CQP_QP_IWARP_STATE_RTS;
...@@ -2929,7 +2924,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2929,7 +2924,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
nesqp->hwqp.qp_id, nesqp->hwqp.sq_head, nesqp->hwqp.sq_tail); nesqp->hwqp.qp_id, nesqp->hwqp.sq_head, nesqp->hwqp.sq_tail);
if (nesqp->iwarp_state == (u32)NES_CQP_QP_IWARP_STATE_CLOSING) { if (nesqp->iwarp_state == (u32)NES_CQP_QP_IWARP_STATE_CLOSING) {
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return 0; return 0;
} else { } else {
if (nesqp->iwarp_state > (u32)NES_CQP_QP_IWARP_STATE_CLOSING) { if (nesqp->iwarp_state > (u32)NES_CQP_QP_IWARP_STATE_CLOSING) {
...@@ -2937,7 +2931,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2937,7 +2931,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
" ignored due to current iWARP state\n", " ignored due to current iWARP state\n",
nesqp->hwqp.qp_id); nesqp->hwqp.qp_id);
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return -EINVAL; return -EINVAL;
} }
if (nesqp->hw_iwarp_state != NES_AEQE_IWARP_STATE_RTS) { if (nesqp->hw_iwarp_state != NES_AEQE_IWARP_STATE_RTS) {
...@@ -2969,7 +2962,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2969,7 +2962,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
nesqp->hwqp.qp_id); nesqp->hwqp.qp_id);
if (nesqp->iwarp_state>=(u32)NES_CQP_QP_IWARP_STATE_TERMINATE) { if (nesqp->iwarp_state>=(u32)NES_CQP_QP_IWARP_STATE_TERMINATE) {
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return -EINVAL; return -EINVAL;
} }
/* next_iwarp_state = (NES_CQP_QP_IWARP_STATE_TERMINATE | 0x02000000); */ /* next_iwarp_state = (NES_CQP_QP_IWARP_STATE_TERMINATE | 0x02000000); */
...@@ -2982,7 +2974,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2982,7 +2974,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
case IB_QPS_RESET: case IB_QPS_RESET:
if (nesqp->iwarp_state == (u32)NES_CQP_QP_IWARP_STATE_ERROR) { if (nesqp->iwarp_state == (u32)NES_CQP_QP_IWARP_STATE_ERROR) {
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return -EINVAL; return -EINVAL;
} }
nes_debug(NES_DBG_MOD_QP, "QP%u: new state = error\n", nes_debug(NES_DBG_MOD_QP, "QP%u: new state = error\n",
...@@ -3008,7 +2999,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -3008,7 +2999,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
break; break;
default: default:
spin_unlock_irqrestore(&nesqp->lock, qplockflags); spin_unlock_irqrestore(&nesqp->lock, qplockflags);
nes_rem_ref(&nesqp->ibqp);
return -EINVAL; return -EINVAL;
break; break;
} }
...@@ -3088,7 +3078,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -3088,7 +3078,6 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount),
original_last_aeq, nesqp->last_aeq); original_last_aeq, nesqp->last_aeq);
/* this one is for the cm_disconnect thread */ /* this one is for the cm_disconnect thread */
nes_add_ref(&nesqp->ibqp);
spin_lock_irqsave(&nesqp->lock, qplockflags); spin_lock_irqsave(&nesqp->lock, qplockflags);
nesqp->hw_tcp_state = NES_AEQE_TCP_STATE_CLOSED; nesqp->hw_tcp_state = NES_AEQE_TCP_STATE_CLOSED;
nesqp->last_aeq = NES_AEQE_AEID_RESET_SENT; nesqp->last_aeq = NES_AEQE_AEID_RESET_SENT;
...@@ -3097,14 +3086,12 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -3097,14 +3086,12 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
} else { } else {
nes_debug(NES_DBG_MOD_QP, "QP%u No fake disconnect, QP refcount=%d\n", nes_debug(NES_DBG_MOD_QP, "QP%u No fake disconnect, QP refcount=%d\n",
nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount)); nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount));
nes_rem_ref(&nesqp->ibqp);
} }
} else { } else {
spin_lock_irqsave(&nesqp->lock, qplockflags); spin_lock_irqsave(&nesqp->lock, qplockflags);
if (nesqp->cm_id) { if (nesqp->cm_id) {
/* These two are for the timer thread */ /* These two are for the timer thread */
if (atomic_inc_return(&nesqp->close_timer_started) == 1) { if (atomic_inc_return(&nesqp->close_timer_started) == 1) {
nes_add_ref(&nesqp->ibqp);
nesqp->cm_id->add_ref(nesqp->cm_id); nesqp->cm_id->add_ref(nesqp->cm_id);
nes_debug(NES_DBG_MOD_QP, "QP%u Not decrementing QP refcount (%d)," nes_debug(NES_DBG_MOD_QP, "QP%u Not decrementing QP refcount (%d),"
" need ae to finish up, original_last_aeq = 0x%04X." " need ae to finish up, original_last_aeq = 0x%04X."
...@@ -3128,14 +3115,12 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -3128,14 +3115,12 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
" original_last_aeq = 0x%04X. last_aeq = 0x%04X.\n", " original_last_aeq = 0x%04X. last_aeq = 0x%04X.\n",
nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount),
original_last_aeq, nesqp->last_aeq); original_last_aeq, nesqp->last_aeq);
nes_rem_ref(&nesqp->ibqp);
} }
} else { } else {
nes_debug(NES_DBG_MOD_QP, "QP%u Decrementing QP refcount (%d), No ae to finish up," nes_debug(NES_DBG_MOD_QP, "QP%u Decrementing QP refcount (%d), No ae to finish up,"
" original_last_aeq = 0x%04X. last_aeq = 0x%04X.\n", " original_last_aeq = 0x%04X. last_aeq = 0x%04X.\n",
nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount),
original_last_aeq, nesqp->last_aeq); original_last_aeq, nesqp->last_aeq);
nes_rem_ref(&nesqp->ibqp);
} }
err = 0; err = 0;
......
...@@ -11,16 +11,17 @@ config INFINIBAND_IPOIB ...@@ -11,16 +11,17 @@ config INFINIBAND_IPOIB
config INFINIBAND_IPOIB_CM config INFINIBAND_IPOIB_CM
bool "IP-over-InfiniBand Connected Mode support" bool "IP-over-InfiniBand Connected Mode support"
depends on INFINIBAND_IPOIB && EXPERIMENTAL depends on INFINIBAND_IPOIB
default n default n
---help--- ---help---
This option enables experimental support for IPoIB connected mode. This option enables support for IPoIB connected mode. After
After enabling this option, you need to switch to connected mode through enabling this option, you need to switch to connected mode
/sys/class/net/ibXXX/mode to actually create connections, and then increase through /sys/class/net/ibXXX/mode to actually create
the interface MTU with e.g. ifconfig ib0 mtu 65520. connections, and then increase the interface MTU with
e.g. ifconfig ib0 mtu 65520.
WARNING: Enabling connected mode will trigger some WARNING: Enabling connected mode will trigger some packet
packet drops for multicast and UD mode traffic from this interface, drops for multicast and UD mode traffic from this interface,
unless you limit mtu for these destinations to 2044. unless you limit mtu for these destinations to 2044.
config INFINIBAND_IPOIB_DEBUG config INFINIBAND_IPOIB_DEBUG
...@@ -33,9 +34,10 @@ config INFINIBAND_IPOIB_DEBUG ...@@ -33,9 +34,10 @@ config INFINIBAND_IPOIB_DEBUG
debug_level and mcast_debug_level module parameters (which debug_level and mcast_debug_level module parameters (which
can also be set after the driver is loaded through sysfs). can also be set after the driver is loaded through sysfs).
This option also creates an "ipoib_debugfs," which can be This option also creates a directory tree under ipoib/ in
mounted to expose debugging information about IB multicast debugfs, which contains files that expose debugging
groups used by the IPoIB driver. information about IB multicast groups used by the IPoIB
driver.
config INFINIBAND_IPOIB_DEBUG_DATA config INFINIBAND_IPOIB_DEBUG_DATA
bool "IP-over-InfiniBand data path debugging" bool "IP-over-InfiniBand data path debugging"
......
/* /*
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
* Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2004 Voltaire, Inc. All rights reserved. * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006, 2007 Cisco Systems. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
* Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved.
* Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved.
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2004 Voltaire, Inc. All rights reserved. * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2004 Topspin Communications. All rights reserved. * Copyright (c) 2004 Topspin Communications. All rights reserved.
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2004 Topspin Communications. All rights reserved. * Copyright (c) 2004 Topspin Communications. All rights reserved.
* Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2005 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
* Copyright (c) 2004 Voltaire, Inc. All rights reserved. * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
* *
* This software is available to you under a choice of one of two * This software is available to you under a choice of one of two
......
/* /*
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
/* /*
* Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved.
* *
* This software is available to you under a choice of one of two * 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 * licenses. You may choose to be licensed under the terms of the GNU
......
...@@ -164,11 +164,13 @@ enum { ...@@ -164,11 +164,13 @@ enum {
MLX4_WQE_CTRL_SOLICITED = 1 << 1, MLX4_WQE_CTRL_SOLICITED = 1 << 1,
MLX4_WQE_CTRL_IP_CSUM = 1 << 4, MLX4_WQE_CTRL_IP_CSUM = 1 << 4,
MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5, MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5,
MLX4_WQE_CTRL_INS_VLAN = 1 << 6,
}; };
struct mlx4_wqe_ctrl_seg { struct mlx4_wqe_ctrl_seg {
__be32 owner_opcode; __be32 owner_opcode;
u8 reserved2[3]; __be16 vlan_tag;
u8 ins_vlan;
u8 fence_size; u8 fence_size;
/* /*
* High 24 bits are SRC remote buffer; low 8 bits are flags: * High 24 bits are SRC remote buffer; low 8 bits are flags:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment