diff options
author | Hariprasad S <hariprasad@chelsio.com> | 2016-06-10 01:05:15 +0530 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-06-23 10:44:17 -0400 |
commit | 4a740838bf44ca4b03e26ff79aedb86b9d8cace4 (patch) | |
tree | fd5b1d84835500fd4d615cc17abf750a3ab29714 /drivers/infiniband/hw/cxgb4/iw_cxgb4.h | |
parent | 4c72efefd9af015459ed63b164ff4b13cbfa3f61 (diff) | |
download | lwn-4a740838bf44ca4b03e26ff79aedb86b9d8cace4.tar.gz lwn-4a740838bf44ca4b03e26ff79aedb86b9d8cace4.zip |
RDMA/iw_cxgb4: Low resource fixes for connection manager
Pre-allocate buffers for sending various control messages to close
connection, abort connection, etc so that we gracefully handle
connections when system is running out of memory.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/iw_cxgb4.h')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index f6f34a75af27..ce42d09ef9f7 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h @@ -789,10 +789,29 @@ enum c4iw_ep_history { CM_ID_DEREFED = 28, }; +enum conn_pre_alloc_buffers { + CN_ABORT_REQ_BUF, + CN_ABORT_RPL_BUF, + CN_CLOSE_CON_REQ_BUF, + CN_DESTROY_BUF, + CN_FLOWC_BUF, + CN_MAX_CON_BUF +}; + +#define FLOWC_LEN 80 +union cpl_wr_size { + struct cpl_abort_req abrt_req; + struct cpl_abort_rpl abrt_rpl; + struct fw_ri_wr ri_req; + struct cpl_close_con_req close_req; + char flowc_buf[FLOWC_LEN]; +}; + struct c4iw_ep_common { struct iw_cm_id *cm_id; struct c4iw_qp *qp; struct c4iw_dev *dev; + struct sk_buff_head ep_skb_list; enum c4iw_ep_state state; struct kref kref; struct mutex mutex; |