cxgbe/iw_cxgbe: Fix iWARP RDMA + VIMAGE operation by setting the VNET
properly in a couple of places in the driver. Submitted by: Krishnamraju Eraparaju @ Chelsio Approved by: re@ (rgrimes@) Sponsored by: Chelsio Communications
This commit is contained in:
parent
394e8d20d9
commit
e32cd65c5b
@ -76,6 +76,7 @@ struct cpl_set_tcb_rpl;
|
||||
#include <linux/inetdevice.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <net/netevent.h>
|
||||
#include <rdma/rdma_cm.h>
|
||||
|
||||
static spinlock_t req_lock;
|
||||
static TAILQ_HEAD(c4iw_ep_list, c4iw_ep_common) req_list;
|
||||
@ -2523,6 +2524,8 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
||||
struct c4iw_dev *dev = to_c4iw_dev(cm_id->device);
|
||||
struct c4iw_ep *ep = NULL;
|
||||
struct ifnet *nh_ifp; /* Logical egress interface */
|
||||
struct rdma_cm_id *rdma_id = (struct rdma_cm_id*)cm_id->context;
|
||||
struct vnet *vnet = rdma_id->route.addr.dev_addr.net;
|
||||
|
||||
CTR2(KTR_IW_CXGBE, "%s:ccB %p", __func__, cm_id);
|
||||
|
||||
@ -2568,7 +2571,10 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
||||
ref_qp(ep);
|
||||
ep->com.thread = curthread;
|
||||
|
||||
CURVNET_SET(vnet);
|
||||
err = get_ifnet_from_raddr(&cm_id->remote_addr, &nh_ifp);
|
||||
CURVNET_RESTORE();
|
||||
|
||||
if (err) {
|
||||
|
||||
CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep);
|
||||
@ -2811,7 +2817,10 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, gfp_t gfp)
|
||||
|
||||
if (!ep->parent_ep)
|
||||
ep->com.state = MORIBUND;
|
||||
|
||||
CURVNET_SET(ep->com.so->so_vnet);
|
||||
sodisconnect(ep->com.so);
|
||||
CURVNET_RESTORE();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user