i40iw: Fixes in i40iw for 4.15
cover i40iw: Fixes in i40iw for 4.15
The following patches are for the 4.15 kernel. Most are fixes, one is for code cleanup (i40iw: Change accelerated flag to bool).
Chien Tin Tung (2):
i40iw: Use sqsize to initialize cqp_requests elements
i40iw: Allocate a sdbuf per CQP WQE
Henry Orosco (2):
i40iw: Notify user of established connection after QP in RTS
i40iw: Change accelerated flag to bool
Mustafa Ismail (3):
i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE
i40iw: Correct ARP index mask
i40iw: Reinitialize add_sd_cnt
Tatyana Nikolova (1):
i40iw: Move MPA request event for loopback after connect
drivers/infiniband/hw/i40iw/i40iw_cm.c | 30 +++++++++++++---------- drivers/infiniband/hw/i40iw/i40iw_cm.h | 2 +- drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 41 ++++++++++++++++++++++---------- drivers/infiniband/hw/i40iw/i40iw_d.h | 6 +++-- drivers/infiniband/hw/i40iw/i40iw_main.c | 3 ++- 5 files changed, 53 insertions(+), 29 deletions(-)
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/8 i40iw: Use sqsize to initialize cqp_requests elements
In reply to a message not in the archiveFrom: Chien Tin Tung <[email protected]>
Use sqsize instead of I40IW_CQP_SW_SQSIZE_2048 to initialize cqp_requests elements in the for-loop as sqsize is used to allocate memory for cqp_requests.
--- drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/i40iw/i40iw_main.c +1 -1
@@ -607,7 +607,7 @@ static enum i40iw_status_code i40iw_create_cqp(struct i40iw_device *iwdev)INIT_LIST_HEAD (&cqp->cqp_avail_reqs);INIT_LIST_HEAD (&cqp->cqp_pending_reqs);/* init the waitq of the cqp_requests and add them to the list */ -for (i =0 ; i <I40IW_CQP_SW_SQSIZE_2048 ; i++) { +for (i =0 ; i < sqsize; i++) {init_waitqueue_head (&cqp->cqp_requests[i].waitq);list_add_tail (&cqp->cqp_requests[i].list, &cqp->cqp_avail_reqs); }
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/8 i40iw: Allocate a sdbuf per CQP WQE
In reply to a message not in the archiveFrom: Chien Tin Tung <[email protected]>
Currently there is only one sdbuf per Control QP(CQP) for programming Segment Descriptor(SD) command thus limiting the number of SD work requests that can be posted to one. Allocate enough memory for one sdbuf per CQP SQ WQE to allow more than one SD command at a time. When a SD command is posted, it will use the corresponding sdbuf for the WQE.
--- drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 41 ++++++++++++++++++++++---------- drivers/infiniband/hw/i40iw/i40iw_d.h | 4 +++- 2 files changed, 31 insertions(+), 14 deletions(-)
drivers/infiniband/hw/i40iw/i40iw_ctrl.c +28 -13
@@ -513,7 +513,7 @@ static enum i40iw_status_code i40iw_sc_cqp_create(struct i40iw_sc_cqp *cqp, ret_code =i40iw_allocate_dma_mem (cqp->dev->hw, &cqp->sdbuf, -128 , +I40IW_UPDATE_SD_BUF_SIZE * cqp->sq_size,I40IW_SD_BUF_ALIGNMENT );if (ret_code)
@@ -596,14 +596,14 @@ void i40iw_sc_cqp_post_sq(struct i40iw_sc_cqp *cqp) }/** -* i40iw_sc_cqp_get_next_send_wqe - get next wqe on cqp sq -* @cqp: struct for cqp hw -* @wqe_idx: we index of cqp ring +* i40iw_sc_cqp_get_next_send_wqe_idx - get next WQE on CQP SQ and pass back the index +* @cqp: pointer to CQP structure +* @scratch: private data for CQP WQE +* @wqe_idx: WQE index for next WQE on CQP SQ */ -u64 *i40iw_sc_cqp_get_next_send_wqe (struct i40iw_sc_cqp *cqp,u64 scratch) +static u64 *i40iw_sc_cqp_get_next_send_wqe_idx (struct i40iw_sc_cqp *cqp,u64 scratch,u32 *wqe_idx) {u64 *wqe =NULL ; -u32 wqe_idx;enum i40iw_status_code ret_code;if (I40IW_RING_FULL_ERR (cqp->sq_ring)) {
@@ -616,21 +616,33 @@ u64 *i40iw_sc_cqp_get_next_send_wqe(struct i40iw_sc_cqp *cqp, u64 scratch) cqp->sq_ring.size);return NULL ; } -I40IW_ATOMIC_RING_MOVE_HEAD (cqp->sq_ring, wqe_idx, ret_code); +I40IW_ATOMIC_RING_MOVE_HEAD (cqp->sq_ring, *wqe_idx, ret_code); cqp->dev->cqp_cmd_stats[OP_REQUESTED_COMMANDS ]++;if (ret_code)return NULL ; -if (!wqe_idx) +if (!*wqe_idx) cqp->polarity = !cqp->polarity; - wqe = cqp->sq_base[wqe_idx].elem; - cqp->scratch_array[wqe_idx] = scratch; + wqe = cqp->sq_base[*wqe_idx].elem; + cqp->scratch_array[*wqe_idx] = scratch;I40IW_CQP_INIT_WQE (wqe);return wqe; }/** +* i40iw_sc_cqp_get_next_send_wqe - get next wqe on cqp sq +* @cqp: struct for cqp hw +* @scratch: private data for CQP WQE +*/ +u64 *i40iw_sc_cqp_get_next_send_wqe (struct i40iw_sc_cqp *cqp,u64 scratch) +{ +u32 wqe_idx; + +return i40iw_sc_cqp_get_next_send_wqe_idx (cqp, scratch, &wqe_idx); +} + +/** * i40iw_sc_cqp_destroy - destroy cqp during close * @cqp: struct for cqp hw */
@@ -3587,8 +3599,10 @@ static enum i40iw_status_code cqp_sds_wqe_fill(struct i40iw_sc_cqp *cqp,u64 *wqe;int mem_entries, wqe_entries;struct i40iw_dma_mem *sdbuf = &cqp->sdbuf; +u64 offset; +u32 wqe_idx; - wqe =i40iw_sc_cqp_get_next_send_wqe (cqp, scratch); + wqe =i40iw_sc_cqp_get_next_send_wqe_idx (cqp, scratch, &wqe_idx);if (!wqe)return I40IW_ERR_RING_FULL ;
@@ -3601,8 +3615,9 @@ static enum i40iw_status_code cqp_sds_wqe_fill(struct i40iw_sc_cqp *cqp,LS_64 (mem_entries,I40IW_CQPSQ_UPESD_ENTRY_COUNT );if (mem_entries) { -memcpy (sdbuf->va, &info->entry[3 ], (mem_entries <<4 )); - data = sdbuf->pa; + offset = wqe_idx *I40IW_UPDATE_SD_BUF_SIZE ; +memcpy ((char *)sdbuf->va + offset, &info->entry[3 ], mem_entries <<4 ); + data = (u64 )sdbuf->pa + offset; }else { data =0 ; }
drivers/infiniband/hw/i40iw/i40iw_d.h +3 -1
@@ -1526,7 +1526,7 @@ enum i40iw_alignment {I40IW_AEQ_ALIGNMENT =0x100 ,I40IW_CEQ_ALIGNMENT =0x100 ,I40IW_CQ0_ALIGNMENT =0x100 , - I40IW_SD_BUF_ALIGNMENT = 0x100 + I40IW_SD_BUF_ALIGNMENT = 0x80 };#define I40IW_WQE_SIZE_64 64
@@ -1534,6 +1534,8 @@ enum i40iw_alignment {#define I40IW_QP_WQE_MIN_SIZE 32#define I40IW_QP_WQE_MAX_SIZE 128 +#define I40IW_UPDATE_SD_BUF_SIZE 128 +#define I40IW_CQE_QTYPE_RQ 0#define I40IW_CQE_QTYPE_SQ 1
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/8 i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE
In reply to a message not in the archiveFrom: Mustafa Ismail <[email protected]>
When the event type is I40IW_TIMER_TYPE_CLOSE, there is no sqbuf and it should not be freed as one in i40iw_schedule_cm_timer().
--- drivers/infiniband/hw/i40iw/i40iw_cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/i40iw/i40iw_cm.c +3 -3
@@ -1043,7 +1043,7 @@ static int i40iw_parse_mpa(struct i40iw_cm_node *cm_node, u8 *buffer, u32 *type,* i40iw_schedule_cm_timer * @@cm_node: connection's node * @sqbuf: buffer to send -* @type: if it es send ot close +* @type: if it is send or close * @send_retrans: if rexmits to be done * @close_when_complete: is cm_node to be removed *
@@ -1067,7 +1067,8 @@ int i40iw_schedule_cm_timer(struct i40iw_cm_node *cm_node, new_send =kzalloc (sizeof (*new_send),GFP_ATOMIC );if (!new_send) { -i40iw_free_sqbuf (vsi, (void *)sqbuf); +if (type !=I40IW_TIMER_TYPE_CLOSE ) +i40iw_free_sqbuf (vsi, (void *)sqbuf);return -ENOMEM ; } new_send->retrycount =I40IW_DEFAULT_RETRYS ;
@@ -1082,7 +1083,6 @@ int i40iw_schedule_cm_timer(struct i40iw_cm_node *cm_node, new_send->timetosend += (HZ /10 );if (cm_node->close_entry) {kfree (new_send); -i40iw_free_sqbuf (vsi, (void *)sqbuf);i40iw_pr_err ("already close entry\n" );return -EINVAL ; }
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 4/8 i40iw: Correct ARP index mask
In reply to a message not in the archiveFrom: Mustafa Ismail <[email protected]>
ARP Index is 16 bits wide not 12 bits. Adjust
the mask for the full 16 bits.
--- drivers/infiniband/hw/i40iw/i40iw_d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/i40iw/i40iw_d.h +1 -1
@@ -1114,7 +1114,7 @@#define I40IWQPC_VLANTAG_MASK (0xffffULL << I40IWQPC_VLANTAG_SHIFT)#define I40IWQPC_ARPIDX_SHIFT 48 -#define I40IWQPC_ARPIDX_MASK (0xfffULL << I40IWQPC_ARPIDX_SHIFT) +#define I40IWQPC_ARPIDX_MASK (0xffffULL << I40IWQPC_ARPIDX_SHIFT)#define I40IWQPC_FLOWLABEL_SHIFT 0#define I40IWQPC_FLOWLABEL_MASK (0xfffffUL << I40IWQPC_FLOWLABEL_SHIFT)
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 5/8 i40iw: Reinitialize add_sd_cnt
In reply to a message not in the archiveFrom: Mustafa Ismail <[email protected]>
add_sd_cnt in info structure passed to i40iw_create_hmc_obj_type must be 0 and since it is modified during the call, it must be reset in the loop.
--- drivers/infiniband/hw/i40iw/i40iw_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/hw/i40iw/i40iw_main.c +1 -0
@@ -483,6 +483,7 @@ static enum i40iw_status_code i40iw_create_hmc_objs(struct i40iw_device *iwdev,for (i =0 ; i <IW_HMC_OBJ_TYPE_NUM ; i++) { info.rsrc_type = iw_hmc_obj_types[i]; info.count = dev->hmc_info->hmc_obj[info.rsrc_type].cnt; + info.add_sd_cnt =0 ; status =i40iw_create_hmc_obj_type (dev, &info);if (status) { i40iw_pr_err("create obj type %d status = %d\n",
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 6/8 i40iw: Move MPA request event for loopback after connect
In reply to a message not in the archiveFrom: Tatyana Nikolova <[email protected]>
For loopback, MPA request event is generated when cm_node is initialized, which allows applications to act on the connect request before i40iw_connect() has completed. In some cases, the reject flow executes in parallel with the connect flow and doesn't delete an APBVT entry, because the apbvt_set variable is still not set by the connect flow. Move the MPA request event to the end of i40iw_connect() to notify application for a connect request, after connect has completed.
--- drivers/infiniband/hw/i40iw/i40iw_cm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/infiniband/hw/i40iw/i40iw_cm.c +5 -2
@@ -2947,8 +2947,6 @@ static struct i40iw_cm_node *i40iw_create_cm_node( loopback_remotenode->tcp_cntxt.snd_wnd = cm_node->tcp_cntxt.rcv_wnd; cm_node->tcp_cntxt.snd_wscale = loopback_remotenode->tcp_cntxt.rcv_wscale; loopback_remotenode->tcp_cntxt.snd_wscale = cm_node->tcp_cntxt.rcv_wscale; - loopback_remotenode->state =I40IW_CM_STATE_MPAREQ_RCVD ; -i40iw_create_event (loopback_remotenode,I40IW_CM_EVENT_MPA_REQ ); }return cm_node; }
@@ -3864,6 +3862,11 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) goto err; } +if (cm_node->loopbackpartner) { + cm_node->loopbackpartner->state =I40IW_CM_STATE_MPAREQ_RCVD ; +i40iw_create_event (cm_node->loopbackpartner,I40IW_CM_EVENT_MPA_REQ ); + } + i40iw_debug(cm_node->dev, I40IW_DEBUG_CM, "Api - connect(): port=0x%04x, cm_node=%p, cm_id = %p.\n",
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 7/8 i40iw: Notify user of established connection after QP in RTS
In reply to a message not in the archiveEstablished CM event is sent prior to modifying QP to RTS state. This can result in application closing the connection before the QP is actually in RTS state. Move sending of established CM event to after modify QP to RTS.
--- drivers/infiniband/hw/i40iw/i40iw_cm.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/infiniband/hw/i40iw/i40iw_cm.c +9 -6
@@ -3687,11 +3687,15 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) cm_id->add_ref (cm_id);i40iw_add_ref (&iwqp->ibqp); -i40iw_send_cm_event (cm_node, cm_id,IW_CM_EVENT_ESTABLISHED ,0 ); - attr.qp_state =IB_QPS_RTS ; cm_node->qhash_set = false;i40iw_modify_qp (&iwqp->ibqp, &attr,IB_QP_STATE ,NULL ); + + cm_node->accelerated =1 ; + status =i40iw_send_cm_event (cm_node, cm_id,IW_CM_EVENT_ESTABLISHED ,0 ); +if (status) +i40iw_debug (dev,I40IW_DEBUG_CM ,"error sending cm event - ESTABLISHED\n" ); +if (cm_node->loopbackpartner) { cm_node->loopbackpartner->pdata.size = conn_param->private_data_len;
@@ -3702,7 +3706,6 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)i40iw_create_event (cm_node->loopbackpartner,I40IW_CM_EVENT_CONNECTED ); } - cm_node->accelerated =1 ;if (cm_node->accept_pend) {atomic_dec (&cm_node->listener->pend_accepts_cnt); cm_node->accept_pend =0 ;
@@ -4047,9 +4050,6 @@ static void i40iw_cm_event_connected(struct i40iw_cm_event *event) dev->iw_priv_qp_ops->qp_send_rtt (&iwqp->sc_qp, read0);if (iwqp->page)kunmap (iwqp->page); - status =i40iw_send_cm_event (cm_node, cm_id,IW_CM_EVENT_CONNECT_REPLY ,0 ); -if (status) -i40iw_pr_err ("send cm event\n" );memset (&attr,0 ,sizeof (attr)); attr.qp_state =IB_QPS_RTS ;
@@ -4057,6 +4057,9 @@ static void i40iw_cm_event_connected(struct i40iw_cm_event *event)i40iw_modify_qp (&iwqp->ibqp, &attr,IB_QP_STATE ,NULL ); cm_node->accelerated =1 ; + status =i40iw_send_cm_event (cm_node, cm_id,IW_CM_EVENT_CONNECT_REPLY ,0 ); +if (status) +i40iw_debug (dev,I40IW_DEBUG_CM ,"error sending cm event - CONNECT_REPLY\n" );return ;
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 8/8 i40iw: Change accelerated flag to bool
In reply to a message not in the archiveThe accelerated flag only utilizes two values: 0 and 1. Modify accelerated flag in struct i40iw_cm_node to bool.
--- drivers/infiniband/hw/i40iw/i40iw_cm.c | 4 ++-- drivers/infiniband/hw/i40iw/i40iw_cm.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/i40iw/i40iw_cm.c +2 -2
@@ -3691,7 +3691,7 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) cm_node->qhash_set = false;i40iw_modify_qp (&iwqp->ibqp, &attr,IB_QP_STATE ,NULL ); - cm_node->accelerated =1 ; + cm_node->accelerated = true; status =i40iw_send_cm_event (cm_node, cm_id,IW_CM_EVENT_ESTABLISHED ,0 );if (status)i40iw_debug (dev,I40IW_DEBUG_CM ,"error sending cm event - ESTABLISHED\n" );
@@ -4056,7 +4056,7 @@ static void i40iw_cm_event_connected(struct i40iw_cm_event *event) cm_node->qhash_set = false;i40iw_modify_qp (&iwqp->ibqp, &attr,IB_QP_STATE ,NULL ); - cm_node->accelerated =1 ; + cm_node->accelerated = true; status =i40iw_send_cm_event (cm_node, cm_id,IW_CM_EVENT_CONNECT_REPLY ,0 );if (status)i40iw_debug (dev,I40IW_DEBUG_CM ,"error sending cm event - CONNECT_REPLY\n" );
drivers/infiniband/hw/i40iw/i40iw_cm.h +1 -1
@@ -337,7 +337,7 @@ struct i40iw_cm_node {u16 mpav2_ird_ord;struct iw_cm_id *cm_id;struct list_head list; -int accelerated; +bool accelerated;struct i40iw_cm_listener *listener;int apbvt_set;int accept_pend;
Signature · 6 lines
2.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] i40iw: Allocate a sdbuf per CQP WQE
In reply to a message not in the archiveQuoted 8 lines · Henry Orosco
From: Chien Tin Tung <[email protected]>
Currently there is only one sdbuf per Control QP(CQP) for programming Segment Descriptor(SD) command thus limiting the number of SD work requests that can be posted to one. Allocate enough memory for one sdbuf per CQP SQ WQE to allow more than one SD command at a time. When a SD command is posted, it will use the corresponding sdbuf for the WQE.
It is not clear to me from this description why this would be a rc candidate?
Is this is a bug? or is it adding a feature of increasing the number of 'SD work requests'?
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 8/8] i40iw: Change accelerated flag to bool
In reply to a message not in the archiveQuoted 2 lines · Henry Orosco
The accelerated flag only utilizes two values: 0 and 1. Modify accelerated flag in struct
i40iw_cm_nodeto bool.
I think this is not rc material
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] i40iw: Allocate a sdbuf per CQP WQE
In reply to a message not in the archiveQuoted 10 lines · Jason Gunthorpe
Quoted 8 lines · Henry Orosco
From: Chien Tin Tung <[email protected]>
Currently there is only one sdbuf per Control QP(CQP) for programming Segment Descriptor(SD) command thus limiting the number of SD work requests that can be posted to one. Allocate enough memory for one sdbuf per CQP SQ WQE to allow more than one SD command at a time. When a SD command is posted, it will use the corresponding sdbuf for the WQE.
Quoted 6 lines
It is not clear to me from this description why this would be a rc candidate?
Is this is a bug? or is it adding a feature of increasing the number of 'SD work requests'?
Its a bug fix as we are reusing the same SD buffer for all WQEs posted. This is incorrect and will become a problem if we have multiple simultaneous SD WQEs being posted.
Shiraz
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 8/8] i40iw: Change accelerated flag to bool
In reply to a message not in the archiveQuoted 6 lines · Jason Gunthorpe
Quoted 2 lines · Henry Orosco
The accelerated flag only utilizes two values: 0 and 1. Modify accelerated flag in struct
i40iw_cm_nodeto bool.I think this is not rc material
That's right. It can be deferred for 4.16
Shiraz
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] i40iw: Allocate a sdbuf per CQP WQE
In reply to a message not in the archiveQuoted 14 lines · Shiraz Saleem
Quoted 13 lines · Jason Gunthorpe
Quoted 8 lines · Henry Orosco
From: Chien Tin Tung <[email protected]>
Currently there is only one sdbuf per Control QP(CQP) for programming Segment Descriptor(SD) command thus limiting the number of SD work requests that can be posted to one. Allocate enough memory for one sdbuf per CQP SQ WQE to allow more than one SD command at a time. When a SD command is posted, it will use the corresponding sdbuf for the WQE.
It is not clear to me from this description why this would be a rc candidate?
Quoted 8 lines
Quoted 3 lines
Is this is a bug? or is it adding a feature of increasing the number of 'SD work requests'?
Its a bug fix as we are reusing the same SD buffer for all WQEs posted. This is incorrect and will become a problem if we have multiple simultaneous SD WQEs being posted.
OK, can you send me a revised commit description making it clear what the bug is and how it could be hit? Maybe something like:
The driver only allocated one Segment Descriptor (SD) per ???, but there is nothing preventing multiple WQEs from trying to use the same SD. In this case new WQEs can corrupt past SD's resulting in mis-execution of the WQE.
Fix this by allocating a SD for every possible WQE and blah blah
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] i40iw: Allocate a sdbuf per CQP WQE
In reply to a message not in the archiveQuoted 19 lines · Jason Gunthorpe
Quoted 18 lines · Shiraz Saleem
Quoted 16 lines · Jason Gunthorpe
Quoted 8 lines · Henry Orosco
From: Chien Tin Tung <[email protected]>
Currently there is only one sdbuf per Control QP(CQP) for programming Segment Descriptor(SD) command thus limiting the number of SD work requests that can be posted to one. Allocate enough memory for one sdbuf per CQP SQ WQE to allow more than one SD command at a time. When a SD command is posted, it will use the corresponding sdbuf for the WQE.
It is not clear to me from this description why this would be a rc candidate?
Is this is a bug? or is it adding a feature of increasing the number of 'SD work requests'?
Quoted 7 lines
Quoted 4 lines
Its a bug fix as we are reusing the same SD buffer for all WQEs posted. This is incorrect and will become a problem if we have multiple simultaneous SD WQEs being posted.
OK, can you send me a revised commit description making it clear what the bug is and how it could be hit? Maybe something like:
Ok. Will resend with revised commit message.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html