@@ -127,10 +127,7 @@ void irdma_uk_qp_post_wr(struct irdma_qp_uk *qp)
127127 hw_sq_tail = (u32 )FIELD_GET (IRDMA_QP_DBSA_HW_SQ_TAIL , temp );
128128 sw_sq_head = IRDMA_RING_CURRENT_HEAD (qp -> sq_ring );
129129 if (sw_sq_head != qp -> initial_ring .head ) {
130- if (qp -> push_dropped ) {
131- writel (qp -> qp_id , qp -> wqe_alloc_db );
132- qp -> push_dropped = false;
133- } else if (sw_sq_head != hw_sq_tail ) {
130+ if (sw_sq_head != hw_sq_tail ) {
134131 if (sw_sq_head > qp -> initial_ring .head ) {
135132 if (hw_sq_tail >= qp -> initial_ring .head &&
136133 hw_sq_tail < sw_sq_head )
@@ -146,38 +143,6 @@ void irdma_uk_qp_post_wr(struct irdma_qp_uk *qp)
146143 qp -> initial_ring .head = qp -> sq_ring .head ;
147144}
148145
149- /**
150- * irdma_qp_ring_push_db - ring qp doorbell
151- * @qp: hw qp ptr
152- * @wqe_idx: wqe index
153- */
154- static void irdma_qp_ring_push_db (struct irdma_qp_uk * qp , u32 wqe_idx )
155- {
156- set_32bit_val (qp -> push_db , 0 ,
157- FIELD_PREP (IRDMA_WQEALLOC_WQE_DESC_INDEX , wqe_idx >> 3 ) | qp -> qp_id );
158- qp -> initial_ring .head = qp -> sq_ring .head ;
159- qp -> push_mode = true;
160- qp -> push_dropped = false;
161- }
162-
163- void irdma_qp_push_wqe (struct irdma_qp_uk * qp , __le64 * wqe , u16 quanta ,
164- u32 wqe_idx , bool post_sq )
165- {
166- __le64 * push ;
167-
168- if (IRDMA_RING_CURRENT_HEAD (qp -> initial_ring ) !=
169- IRDMA_RING_CURRENT_TAIL (qp -> sq_ring ) &&
170- !qp -> push_mode ) {
171- if (post_sq )
172- irdma_uk_qp_post_wr (qp );
173- } else {
174- push = (__le64 * )((uintptr_t )qp -> push_wqe +
175- (wqe_idx & 0x7 ) * 0x20 );
176- memcpy (push , wqe , quanta * IRDMA_QP_WQE_MIN_SIZE );
177- irdma_qp_ring_push_db (qp , wqe_idx );
178- }
179- }
180-
181146/**
182147 * irdma_qp_get_next_send_wqe - pad with NOP if needed, return where next WR should go
183148 * @qp: hw qp ptr
@@ -192,7 +157,6 @@ __le64 *irdma_qp_get_next_send_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx,
192157{
193158 __le64 * wqe ;
194159 __le64 * wqe_0 = NULL ;
195- u32 nop_wqe_idx ;
196160 u16 avail_quanta ;
197161 u16 i ;
198162
@@ -209,14 +173,10 @@ __le64 *irdma_qp_get_next_send_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx,
209173 IRDMA_SQ_RING_FREE_QUANTA (qp -> sq_ring ))
210174 return NULL ;
211175
212- nop_wqe_idx = IRDMA_RING_CURRENT_HEAD (qp -> sq_ring );
213176 for (i = 0 ; i < avail_quanta ; i ++ ) {
214177 irdma_nop_1 (qp );
215178 IRDMA_RING_MOVE_HEAD_NOCHECK (qp -> sq_ring );
216179 }
217- if (qp -> push_db && info -> push_wqe )
218- irdma_qp_push_wqe (qp , qp -> sq_base [nop_wqe_idx ].elem ,
219- avail_quanta , nop_wqe_idx , true);
220180 }
221181
222182 * wqe_idx = IRDMA_RING_CURRENT_HEAD (qp -> sq_ring );
@@ -282,8 +242,6 @@ int irdma_uk_rdma_write(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
282242 bool read_fence = false;
283243 u16 quanta ;
284244
285- info -> push_wqe = qp -> push_db ;
286-
287245 op_info = & info -> op .rdma_write ;
288246 if (op_info -> num_lo_sges > qp -> max_sq_frag_cnt )
289247 return - EINVAL ;
@@ -344,7 +302,6 @@ int irdma_uk_rdma_write(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
344302 FIELD_PREP (IRDMAQPSQ_IMMDATAFLAG , info -> imm_data_valid ) |
345303 FIELD_PREP (IRDMAQPSQ_REPORTRTT , info -> report_rtt ) |
346304 FIELD_PREP (IRDMAQPSQ_ADDFRAGCNT , addl_frag_cnt ) |
347- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
348305 FIELD_PREP (IRDMAQPSQ_READFENCE , read_fence ) |
349306 FIELD_PREP (IRDMAQPSQ_LOCALFENCE , info -> local_fence ) |
350307 FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -353,12 +310,9 @@ int irdma_uk_rdma_write(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
353310 dma_wmb (); /* make sure WQE is populated before valid bit is set */
354311
355312 set_64bit_val (wqe , 24 , hdr );
356- if (info -> push_wqe ) {
357- irdma_qp_push_wqe (qp , wqe , quanta , wqe_idx , post_sq );
358- } else {
359- if (post_sq )
360- irdma_uk_qp_post_wr (qp );
361- }
313+
314+ if (post_sq )
315+ irdma_uk_qp_post_wr (qp );
362316
363317 return 0 ;
364318}
@@ -383,8 +337,6 @@ int irdma_uk_rdma_read(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
383337 u16 quanta ;
384338 u64 hdr ;
385339
386- info -> push_wqe = qp -> push_db ;
387-
388340 op_info = & info -> op .rdma_read ;
389341 if (qp -> max_sq_frag_cnt < op_info -> num_lo_sges )
390342 return - EINVAL ;
@@ -431,7 +383,6 @@ int irdma_uk_rdma_read(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
431383 FIELD_PREP (IRDMAQPSQ_ADDFRAGCNT , addl_frag_cnt ) |
432384 FIELD_PREP (IRDMAQPSQ_OPCODE ,
433385 (inv_stag ? IRDMAQP_OP_RDMA_READ_LOC_INV : IRDMAQP_OP_RDMA_READ )) |
434- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
435386 FIELD_PREP (IRDMAQPSQ_READFENCE , info -> read_fence ) |
436387 FIELD_PREP (IRDMAQPSQ_LOCALFENCE , local_fence ) |
437388 FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -440,12 +391,9 @@ int irdma_uk_rdma_read(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
440391 dma_wmb (); /* make sure WQE is populated before valid bit is set */
441392
442393 set_64bit_val (wqe , 24 , hdr );
443- if (info -> push_wqe ) {
444- irdma_qp_push_wqe (qp , wqe , quanta , wqe_idx , post_sq );
445- } else {
446- if (post_sq )
447- irdma_uk_qp_post_wr (qp );
448- }
394+
395+ if (post_sq )
396+ irdma_uk_qp_post_wr (qp );
449397
450398 return 0 ;
451399}
@@ -468,8 +416,6 @@ int irdma_uk_send(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
468416 bool read_fence = false;
469417 u16 quanta ;
470418
471- info -> push_wqe = qp -> push_db ;
472-
473419 op_info = & info -> op .send ;
474420 if (qp -> max_sq_frag_cnt < op_info -> num_sges )
475421 return - EINVAL ;
@@ -530,7 +476,6 @@ int irdma_uk_send(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
530476 FIELD_PREP (IRDMAQPSQ_REPORTRTT , (info -> report_rtt ? 1 : 0 )) |
531477 FIELD_PREP (IRDMAQPSQ_OPCODE , info -> op_type ) |
532478 FIELD_PREP (IRDMAQPSQ_ADDFRAGCNT , addl_frag_cnt ) |
533- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
534479 FIELD_PREP (IRDMAQPSQ_READFENCE , read_fence ) |
535480 FIELD_PREP (IRDMAQPSQ_LOCALFENCE , info -> local_fence ) |
536481 FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -541,12 +486,9 @@ int irdma_uk_send(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
541486 dma_wmb (); /* make sure WQE is populated before valid bit is set */
542487
543488 set_64bit_val (wqe , 24 , hdr );
544- if (info -> push_wqe ) {
545- irdma_qp_push_wqe (qp , wqe , quanta , wqe_idx , post_sq );
546- } else {
547- if (post_sq )
548- irdma_uk_qp_post_wr (qp );
549- }
489+
490+ if (post_sq )
491+ irdma_uk_qp_post_wr (qp );
550492
551493 return 0 ;
552494}
@@ -720,7 +662,6 @@ int irdma_uk_inline_rdma_write(struct irdma_qp_uk *qp,
720662 u32 i , total_size = 0 ;
721663 u16 quanta ;
722664
723- info -> push_wqe = qp -> push_db ;
724665 op_info = & info -> op .rdma_write ;
725666
726667 if (unlikely (qp -> max_sq_frag_cnt < op_info -> num_lo_sges ))
@@ -750,7 +691,6 @@ int irdma_uk_inline_rdma_write(struct irdma_qp_uk *qp,
750691 FIELD_PREP (IRDMAQPSQ_REPORTRTT , info -> report_rtt ? 1 : 0 ) |
751692 FIELD_PREP (IRDMAQPSQ_INLINEDATAFLAG , 1 ) |
752693 FIELD_PREP (IRDMAQPSQ_IMMDATAFLAG , info -> imm_data_valid ? 1 : 0 ) |
753- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ? 1 : 0 ) |
754694 FIELD_PREP (IRDMAQPSQ_READFENCE , read_fence ) |
755695 FIELD_PREP (IRDMAQPSQ_LOCALFENCE , info -> local_fence ) |
756696 FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -767,12 +707,8 @@ int irdma_uk_inline_rdma_write(struct irdma_qp_uk *qp,
767707
768708 set_64bit_val (wqe , 24 , hdr );
769709
770- if (info -> push_wqe ) {
771- irdma_qp_push_wqe (qp , wqe , quanta , wqe_idx , post_sq );
772- } else {
773- if (post_sq )
774- irdma_uk_qp_post_wr (qp );
775- }
710+ if (post_sq )
711+ irdma_uk_qp_post_wr (qp );
776712
777713 return 0 ;
778714}
@@ -794,7 +730,6 @@ int irdma_uk_inline_send(struct irdma_qp_uk *qp,
794730 u32 i , total_size = 0 ;
795731 u16 quanta ;
796732
797- info -> push_wqe = qp -> push_db ;
798733 op_info = & info -> op .send ;
799734
800735 if (unlikely (qp -> max_sq_frag_cnt < op_info -> num_sges ))
@@ -827,7 +762,6 @@ int irdma_uk_inline_send(struct irdma_qp_uk *qp,
827762 (info -> imm_data_valid ? 1 : 0 )) |
828763 FIELD_PREP (IRDMAQPSQ_REPORTRTT , (info -> report_rtt ? 1 : 0 )) |
829764 FIELD_PREP (IRDMAQPSQ_INLINEDATAFLAG , 1 ) |
830- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
831765 FIELD_PREP (IRDMAQPSQ_READFENCE , read_fence ) |
832766 FIELD_PREP (IRDMAQPSQ_LOCALFENCE , info -> local_fence ) |
833767 FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -845,12 +779,8 @@ int irdma_uk_inline_send(struct irdma_qp_uk *qp,
845779
846780 set_64bit_val (wqe , 24 , hdr );
847781
848- if (info -> push_wqe ) {
849- irdma_qp_push_wqe (qp , wqe , quanta , wqe_idx , post_sq );
850- } else {
851- if (post_sq )
852- irdma_uk_qp_post_wr (qp );
853- }
782+ if (post_sq )
783+ irdma_uk_qp_post_wr (qp );
854784
855785 return 0 ;
856786}
@@ -872,7 +802,6 @@ int irdma_uk_stag_local_invalidate(struct irdma_qp_uk *qp,
872802 bool local_fence = false;
873803 struct ib_sge sge = {};
874804
875- info -> push_wqe = qp -> push_db ;
876805 op_info = & info -> op .inv_local_stag ;
877806 local_fence = info -> local_fence ;
878807
@@ -889,7 +818,6 @@ int irdma_uk_stag_local_invalidate(struct irdma_qp_uk *qp,
889818 set_64bit_val (wqe , 16 , 0 );
890819
891820 hdr = FIELD_PREP (IRDMAQPSQ_OPCODE , IRDMA_OP_TYPE_INV_STAG ) |
892- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
893821 FIELD_PREP (IRDMAQPSQ_READFENCE , info -> read_fence ) |
894822 FIELD_PREP (IRDMAQPSQ_LOCALFENCE , local_fence ) |
895823 FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -899,13 +827,8 @@ int irdma_uk_stag_local_invalidate(struct irdma_qp_uk *qp,
899827
900828 set_64bit_val (wqe , 24 , hdr );
901829
902- if (info -> push_wqe ) {
903- irdma_qp_push_wqe (qp , wqe , IRDMA_QP_WQE_MIN_QUANTA , wqe_idx ,
904- post_sq );
905- } else {
906- if (post_sq )
907- irdma_uk_qp_post_wr (qp );
908- }
830+ if (post_sq )
831+ irdma_uk_qp_post_wr (qp );
909832
910833 return 0 ;
911834}
@@ -1124,7 +1047,6 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
11241047
11251048 info -> q_type = (u8 )FIELD_GET (IRDMA_CQ_SQ , qword3 );
11261049 info -> error = (bool )FIELD_GET (IRDMA_CQ_ERROR , qword3 );
1127- info -> push_dropped = (bool )FIELD_GET (IRDMACQ_PSHDROP , qword3 );
11281050 info -> ipv4 = (bool )FIELD_GET (IRDMACQ_IPV4 , qword3 );
11291051 if (info -> error ) {
11301052 info -> major_err = FIELD_GET (IRDMA_CQ_MAJERR , qword3 );
@@ -1213,11 +1135,6 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
12131135 return irdma_uk_cq_poll_cmpl (cq , info );
12141136 }
12151137 }
1216- /*cease posting push mode on push drop*/
1217- if (info -> push_dropped ) {
1218- qp -> push_mode = false;
1219- qp -> push_dropped = true;
1220- }
12211138 if (info -> comp_status != IRDMA_COMPL_STATUS_FLUSHED ) {
12221139 info -> wr_id = qp -> sq_wrtrk_array [wqe_idx ].wrid ;
12231140 if (!info -> comp_status )
@@ -1521,7 +1438,6 @@ int irdma_uk_qp_init(struct irdma_qp_uk *qp, struct irdma_qp_uk_init_info *info)
15211438 qp -> wqe_alloc_db = info -> wqe_alloc_db ;
15221439 qp -> qp_id = info -> qp_id ;
15231440 qp -> sq_size = info -> sq_size ;
1524- qp -> push_mode = false;
15251441 qp -> max_sq_frag_cnt = info -> max_sq_frag_cnt ;
15261442 sq_ring_size = qp -> sq_size << info -> sq_shift ;
15271443 IRDMA_RING_INIT (qp -> sq_ring , sq_ring_size );
@@ -1616,7 +1532,6 @@ int irdma_nop(struct irdma_qp_uk *qp, u64 wr_id, bool signaled, bool post_sq)
16161532 u32 wqe_idx ;
16171533 struct irdma_post_sq_info info = {};
16181534
1619- info .push_wqe = false;
16201535 info .wr_id = wr_id ;
16211536 wqe = irdma_qp_get_next_send_wqe (qp , & wqe_idx , IRDMA_QP_WQE_MIN_QUANTA ,
16221537 0 , & info );
0 commit comments