@@ -127,10 +127,7 @@ void irdma_uk_qp_post_wr(struct irdma_qp_uk *qp)
127
127
hw_sq_tail = (u32 )FIELD_GET (IRDMA_QP_DBSA_HW_SQ_TAIL , temp );
128
128
sw_sq_head = IRDMA_RING_CURRENT_HEAD (qp -> sq_ring );
129
129
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 ) {
134
131
if (sw_sq_head > qp -> initial_ring .head ) {
135
132
if (hw_sq_tail >= qp -> initial_ring .head &&
136
133
hw_sq_tail < sw_sq_head )
@@ -146,38 +143,6 @@ void irdma_uk_qp_post_wr(struct irdma_qp_uk *qp)
146
143
qp -> initial_ring .head = qp -> sq_ring .head ;
147
144
}
148
145
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
-
181
146
/**
182
147
* irdma_qp_get_next_send_wqe - pad with NOP if needed, return where next WR should go
183
148
* @qp: hw qp ptr
@@ -192,7 +157,6 @@ __le64 *irdma_qp_get_next_send_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx,
192
157
{
193
158
__le64 * wqe ;
194
159
__le64 * wqe_0 = NULL ;
195
- u32 nop_wqe_idx ;
196
160
u16 avail_quanta ;
197
161
u16 i ;
198
162
@@ -209,14 +173,10 @@ __le64 *irdma_qp_get_next_send_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx,
209
173
IRDMA_SQ_RING_FREE_QUANTA (qp -> sq_ring ))
210
174
return NULL ;
211
175
212
- nop_wqe_idx = IRDMA_RING_CURRENT_HEAD (qp -> sq_ring );
213
176
for (i = 0 ; i < avail_quanta ; i ++ ) {
214
177
irdma_nop_1 (qp );
215
178
IRDMA_RING_MOVE_HEAD_NOCHECK (qp -> sq_ring );
216
179
}
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);
220
180
}
221
181
222
182
* 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,
282
242
bool read_fence = false;
283
243
u16 quanta ;
284
244
285
- info -> push_wqe = qp -> push_db ;
286
-
287
245
op_info = & info -> op .rdma_write ;
288
246
if (op_info -> num_lo_sges > qp -> max_sq_frag_cnt )
289
247
return - EINVAL ;
@@ -344,7 +302,6 @@ int irdma_uk_rdma_write(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
344
302
FIELD_PREP (IRDMAQPSQ_IMMDATAFLAG , info -> imm_data_valid ) |
345
303
FIELD_PREP (IRDMAQPSQ_REPORTRTT , info -> report_rtt ) |
346
304
FIELD_PREP (IRDMAQPSQ_ADDFRAGCNT , addl_frag_cnt ) |
347
- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
348
305
FIELD_PREP (IRDMAQPSQ_READFENCE , read_fence ) |
349
306
FIELD_PREP (IRDMAQPSQ_LOCALFENCE , info -> local_fence ) |
350
307
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,
353
310
dma_wmb (); /* make sure WQE is populated before valid bit is set */
354
311
355
312
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 );
362
316
363
317
return 0 ;
364
318
}
@@ -383,8 +337,6 @@ int irdma_uk_rdma_read(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
383
337
u16 quanta ;
384
338
u64 hdr ;
385
339
386
- info -> push_wqe = qp -> push_db ;
387
-
388
340
op_info = & info -> op .rdma_read ;
389
341
if (qp -> max_sq_frag_cnt < op_info -> num_lo_sges )
390
342
return - EINVAL ;
@@ -431,7 +383,6 @@ int irdma_uk_rdma_read(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
431
383
FIELD_PREP (IRDMAQPSQ_ADDFRAGCNT , addl_frag_cnt ) |
432
384
FIELD_PREP (IRDMAQPSQ_OPCODE ,
433
385
(inv_stag ? IRDMAQP_OP_RDMA_READ_LOC_INV : IRDMAQP_OP_RDMA_READ )) |
434
- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
435
386
FIELD_PREP (IRDMAQPSQ_READFENCE , info -> read_fence ) |
436
387
FIELD_PREP (IRDMAQPSQ_LOCALFENCE , local_fence ) |
437
388
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,
440
391
dma_wmb (); /* make sure WQE is populated before valid bit is set */
441
392
442
393
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 );
449
397
450
398
return 0 ;
451
399
}
@@ -468,8 +416,6 @@ int irdma_uk_send(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
468
416
bool read_fence = false;
469
417
u16 quanta ;
470
418
471
- info -> push_wqe = qp -> push_db ;
472
-
473
419
op_info = & info -> op .send ;
474
420
if (qp -> max_sq_frag_cnt < op_info -> num_sges )
475
421
return - EINVAL ;
@@ -530,7 +476,6 @@ int irdma_uk_send(struct irdma_qp_uk *qp, struct irdma_post_sq_info *info,
530
476
FIELD_PREP (IRDMAQPSQ_REPORTRTT , (info -> report_rtt ? 1 : 0 )) |
531
477
FIELD_PREP (IRDMAQPSQ_OPCODE , info -> op_type ) |
532
478
FIELD_PREP (IRDMAQPSQ_ADDFRAGCNT , addl_frag_cnt ) |
533
- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
534
479
FIELD_PREP (IRDMAQPSQ_READFENCE , read_fence ) |
535
480
FIELD_PREP (IRDMAQPSQ_LOCALFENCE , info -> local_fence ) |
536
481
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,
541
486
dma_wmb (); /* make sure WQE is populated before valid bit is set */
542
487
543
488
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 );
550
492
551
493
return 0 ;
552
494
}
@@ -720,7 +662,6 @@ int irdma_uk_inline_rdma_write(struct irdma_qp_uk *qp,
720
662
u32 i , total_size = 0 ;
721
663
u16 quanta ;
722
664
723
- info -> push_wqe = qp -> push_db ;
724
665
op_info = & info -> op .rdma_write ;
725
666
726
667
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,
750
691
FIELD_PREP (IRDMAQPSQ_REPORTRTT , info -> report_rtt ? 1 : 0 ) |
751
692
FIELD_PREP (IRDMAQPSQ_INLINEDATAFLAG , 1 ) |
752
693
FIELD_PREP (IRDMAQPSQ_IMMDATAFLAG , info -> imm_data_valid ? 1 : 0 ) |
753
- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ? 1 : 0 ) |
754
694
FIELD_PREP (IRDMAQPSQ_READFENCE , read_fence ) |
755
695
FIELD_PREP (IRDMAQPSQ_LOCALFENCE , info -> local_fence ) |
756
696
FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -767,12 +707,8 @@ int irdma_uk_inline_rdma_write(struct irdma_qp_uk *qp,
767
707
768
708
set_64bit_val (wqe , 24 , hdr );
769
709
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 );
776
712
777
713
return 0 ;
778
714
}
@@ -794,7 +730,6 @@ int irdma_uk_inline_send(struct irdma_qp_uk *qp,
794
730
u32 i , total_size = 0 ;
795
731
u16 quanta ;
796
732
797
- info -> push_wqe = qp -> push_db ;
798
733
op_info = & info -> op .send ;
799
734
800
735
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,
827
762
(info -> imm_data_valid ? 1 : 0 )) |
828
763
FIELD_PREP (IRDMAQPSQ_REPORTRTT , (info -> report_rtt ? 1 : 0 )) |
829
764
FIELD_PREP (IRDMAQPSQ_INLINEDATAFLAG , 1 ) |
830
- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
831
765
FIELD_PREP (IRDMAQPSQ_READFENCE , read_fence ) |
832
766
FIELD_PREP (IRDMAQPSQ_LOCALFENCE , info -> local_fence ) |
833
767
FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -845,12 +779,8 @@ int irdma_uk_inline_send(struct irdma_qp_uk *qp,
845
779
846
780
set_64bit_val (wqe , 24 , hdr );
847
781
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 );
854
784
855
785
return 0 ;
856
786
}
@@ -872,7 +802,6 @@ int irdma_uk_stag_local_invalidate(struct irdma_qp_uk *qp,
872
802
bool local_fence = false;
873
803
struct ib_sge sge = {};
874
804
875
- info -> push_wqe = qp -> push_db ;
876
805
op_info = & info -> op .inv_local_stag ;
877
806
local_fence = info -> local_fence ;
878
807
@@ -889,7 +818,6 @@ int irdma_uk_stag_local_invalidate(struct irdma_qp_uk *qp,
889
818
set_64bit_val (wqe , 16 , 0 );
890
819
891
820
hdr = FIELD_PREP (IRDMAQPSQ_OPCODE , IRDMA_OP_TYPE_INV_STAG ) |
892
- FIELD_PREP (IRDMAQPSQ_PUSHWQE , info -> push_wqe ) |
893
821
FIELD_PREP (IRDMAQPSQ_READFENCE , info -> read_fence ) |
894
822
FIELD_PREP (IRDMAQPSQ_LOCALFENCE , local_fence ) |
895
823
FIELD_PREP (IRDMAQPSQ_SIGCOMPL , info -> signaled ) |
@@ -899,13 +827,8 @@ int irdma_uk_stag_local_invalidate(struct irdma_qp_uk *qp,
899
827
900
828
set_64bit_val (wqe , 24 , hdr );
901
829
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 );
909
832
910
833
return 0 ;
911
834
}
@@ -1124,7 +1047,6 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
1124
1047
1125
1048
info -> q_type = (u8 )FIELD_GET (IRDMA_CQ_SQ , qword3 );
1126
1049
info -> error = (bool )FIELD_GET (IRDMA_CQ_ERROR , qword3 );
1127
- info -> push_dropped = (bool )FIELD_GET (IRDMACQ_PSHDROP , qword3 );
1128
1050
info -> ipv4 = (bool )FIELD_GET (IRDMACQ_IPV4 , qword3 );
1129
1051
if (info -> error ) {
1130
1052
info -> major_err = FIELD_GET (IRDMA_CQ_MAJERR , qword3 );
@@ -1213,11 +1135,6 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
1213
1135
return irdma_uk_cq_poll_cmpl (cq , info );
1214
1136
}
1215
1137
}
1216
- /*cease posting push mode on push drop*/
1217
- if (info -> push_dropped ) {
1218
- qp -> push_mode = false;
1219
- qp -> push_dropped = true;
1220
- }
1221
1138
if (info -> comp_status != IRDMA_COMPL_STATUS_FLUSHED ) {
1222
1139
info -> wr_id = qp -> sq_wrtrk_array [wqe_idx ].wrid ;
1223
1140
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)
1521
1438
qp -> wqe_alloc_db = info -> wqe_alloc_db ;
1522
1439
qp -> qp_id = info -> qp_id ;
1523
1440
qp -> sq_size = info -> sq_size ;
1524
- qp -> push_mode = false;
1525
1441
qp -> max_sq_frag_cnt = info -> max_sq_frag_cnt ;
1526
1442
sq_ring_size = qp -> sq_size << info -> sq_shift ;
1527
1443
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)
1616
1532
u32 wqe_idx ;
1617
1533
struct irdma_post_sq_info info = {};
1618
1534
1619
- info .push_wqe = false;
1620
1535
info .wr_id = wr_id ;
1621
1536
wqe = irdma_qp_get_next_send_wqe (qp , & wqe_idx , IRDMA_QP_WQE_MIN_QUANTA ,
1622
1537
0 , & info );
0 commit comments