Skip to content

Commit 1d11d26

Browse files
shirazsaleemjgunthorpe
authored andcommitted
RDMA/i40iw: Remove push code from i40iw
The push feature does not work as expected in x722 and has historically been disabled in the driver. Purge all remaining code related to the push feature in i40iw. Link: https://lore.kernel.org/r/20201125005616.1800-3-shiraz.saleem@intel.com Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 2b0a999 commit 1d11d26

File tree

8 files changed

+18
-224
lines changed

8 files changed

+18
-224
lines changed

drivers/infiniband/hw/i40iw/i40iw.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ struct i40iw_device {
274274
u8 max_sge;
275275
u8 iw_status;
276276
u8 send_term_ok;
277-
bool push_mode; /* Initialized from parameter passed to driver */
278277

279278
/* x710 specific */
280279
struct mutex pbl_mutex;

drivers/infiniband/hw/i40iw/i40iw_ctrl.c

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -819,46 +819,6 @@ static enum i40iw_status_code i40iw_sc_poll_for_cqp_op_done(
819819
return ret_code;
820820
}
821821

822-
/**
823-
* i40iw_sc_manage_push_page - Handle push page
824-
* @cqp: struct for cqp hw
825-
* @info: push page info
826-
* @scratch: u64 saved to be used during cqp completion
827-
* @post_sq: flag for cqp db to ring
828-
*/
829-
static enum i40iw_status_code i40iw_sc_manage_push_page(
830-
struct i40iw_sc_cqp *cqp,
831-
struct i40iw_cqp_manage_push_page_info *info,
832-
u64 scratch,
833-
bool post_sq)
834-
{
835-
u64 *wqe;
836-
u64 header;
837-
838-
if (info->push_idx >= I40IW_MAX_PUSH_PAGE_COUNT)
839-
return I40IW_ERR_INVALID_PUSH_PAGE_INDEX;
840-
841-
wqe = i40iw_sc_cqp_get_next_send_wqe(cqp, scratch);
842-
if (!wqe)
843-
return I40IW_ERR_RING_FULL;
844-
845-
set_64bit_val(wqe, 16, info->qs_handle);
846-
847-
header = LS_64(info->push_idx, I40IW_CQPSQ_MPP_PPIDX) |
848-
LS_64(I40IW_CQP_OP_MANAGE_PUSH_PAGES, I40IW_CQPSQ_OPCODE) |
849-
LS_64(cqp->polarity, I40IW_CQPSQ_WQEVALID) |
850-
LS_64(info->free_page, I40IW_CQPSQ_MPP_FREE_PAGE);
851-
852-
i40iw_insert_wqe_hdr(wqe, header);
853-
854-
i40iw_debug_buf(cqp->dev, I40IW_DEBUG_WQE, "MANAGE_PUSH_PAGES WQE",
855-
wqe, I40IW_CQP_WQE_SIZE * 8);
856-
857-
if (post_sq)
858-
i40iw_sc_cqp_post_sq(cqp);
859-
return 0;
860-
}
861-
862822
/**
863823
* i40iw_sc_manage_hmc_pm_func_table - manage of function table
864824
* @cqp: struct for cqp hw
@@ -2859,9 +2819,7 @@ static enum i40iw_status_code i40iw_sc_qp_setctx(
28592819
LS_64(qp->rcv_tph_en, I40IWQPC_RCVTPHEN) |
28602820
LS_64(qp->xmit_tph_en, I40IWQPC_XMITTPHEN) |
28612821
LS_64(qp->rq_tph_en, I40IWQPC_RQTPHEN) |
2862-
LS_64(qp->sq_tph_en, I40IWQPC_SQTPHEN) |
2863-
LS_64(info->push_idx, I40IWQPC_PPIDX) |
2864-
LS_64(info->push_mode_en, I40IWQPC_PMENA);
2822+
LS_64(qp->sq_tph_en, I40IWQPC_SQTPHEN);
28652823

28662824
set_64bit_val(qp_ctx, 8, qp->sq_pa);
28672825
set_64bit_val(qp_ctx, 16, qp->rq_pa);
@@ -4291,13 +4249,6 @@ static enum i40iw_status_code i40iw_exec_cqp_cmd(struct i40iw_sc_dev *dev,
42914249
pcmdinfo->in.u.add_arp_cache_entry.scratch,
42924250
pcmdinfo->post_sq);
42934251
break;
4294-
case OP_MANAGE_PUSH_PAGE:
4295-
status = i40iw_sc_manage_push_page(
4296-
pcmdinfo->in.u.manage_push_page.cqp,
4297-
&pcmdinfo->in.u.manage_push_page.info,
4298-
pcmdinfo->in.u.manage_push_page.scratch,
4299-
pcmdinfo->post_sq);
4300-
break;
43014252
case OP_UPDATE_PE_SDS:
43024253
/* case I40IW_CQP_OP_UPDATE_PE_SDS */
43034254
status = i40iw_update_pe_sds(
@@ -5173,7 +5124,6 @@ static const struct i40iw_mr_ops iw_mr_ops = {
51735124
};
51745125

51755126
static const struct i40iw_cqp_misc_ops iw_cqp_misc_ops = {
5176-
.manage_push_page = i40iw_sc_manage_push_page,
51775127
.manage_hmc_pm_func_table = i40iw_sc_manage_hmc_pm_func_table,
51785128
.set_hmc_resource_profile = i40iw_sc_set_hmc_resource_profile,
51795129
.commit_fpm_values = i40iw_sc_commit_fpm_values,

drivers/infiniband/hw/i40iw/i40iw_d.h

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@
4040
#define I40IW_DB_ADDR_OFFSET (4 * 1024 * 1024 - 64 * 1024)
4141
#define I40IW_VF_DB_ADDR_OFFSET (64 * 1024)
4242

43-
#define I40IW_PUSH_OFFSET (4 * 1024 * 1024)
44-
#define I40IW_PF_FIRST_PUSH_PAGE_INDEX 16
45-
#define I40IW_VF_PUSH_OFFSET ((8 + 64) * 1024)
46-
#define I40IW_VF_FIRST_PUSH_PAGE_INDEX 2
47-
4843
#define I40IW_PE_DB_SIZE_4M 1
4944
#define I40IW_PE_DB_SIZE_8M 2
5045

@@ -402,7 +397,6 @@
402397
#define I40IW_CQP_OP_MANAGE_LOC_MAC_IP_TABLE 0x0e
403398
#define I40IW_CQP_OP_MANAGE_ARP 0x0f
404399
#define I40IW_CQP_OP_MANAGE_VF_PBLE_BP 0x10
405-
#define I40IW_CQP_OP_MANAGE_PUSH_PAGES 0x11
406400
#define I40IW_CQP_OP_QUERY_RDMA_FEATURES 0x12
407401
#define I40IW_CQP_OP_UPLOAD_CONTEXT 0x13
408402
#define I40IW_CQP_OP_ALLOCATE_LOC_MAC_IP_TABLE_ENTRY 0x14
@@ -843,7 +837,6 @@
843837
#define I40IW_CQPSQ_MVPBP_PD_PLPBA_MASK \
844838
(0x1fffffffffffffffULL << I40IW_CQPSQ_MVPBP_PD_PLPBA_SHIFT)
845839

846-
/* Manage Push Page - MPP */
847840
#define I40IW_INVALID_PUSH_PAGE_INDEX 0xffff
848841

849842
#define I40IW_CQPSQ_MPP_QS_HANDLE_SHIFT 0
@@ -1352,9 +1345,6 @@
13521345
#define I40IWQPSQ_ADDFRAGCNT_SHIFT 38
13531346
#define I40IWQPSQ_ADDFRAGCNT_MASK (0x7ULL << I40IWQPSQ_ADDFRAGCNT_SHIFT)
13541347

1355-
#define I40IWQPSQ_PUSHWQE_SHIFT 56
1356-
#define I40IWQPSQ_PUSHWQE_MASK (1ULL << I40IWQPSQ_PUSHWQE_SHIFT)
1357-
13581348
#define I40IWQPSQ_STREAMMODE_SHIFT 58
13591349
#define I40IWQPSQ_STREAMMODE_MASK (1ULL << I40IWQPSQ_STREAMMODE_SHIFT)
13601350

@@ -1740,18 +1730,17 @@ enum i40iw_alignment {
17401730
#define OP_MW_ALLOC 20
17411731
#define OP_QP_FLUSH_WQES 21
17421732
#define OP_ADD_ARP_CACHE_ENTRY 22
1743-
#define OP_MANAGE_PUSH_PAGE 23
1744-
#define OP_UPDATE_PE_SDS 24
1745-
#define OP_MANAGE_HMC_PM_FUNC_TABLE 25
1746-
#define OP_SUSPEND 26
1747-
#define OP_RESUME 27
1748-
#define OP_MANAGE_VF_PBLE_BP 28
1749-
#define OP_QUERY_FPM_VALUES 29
1750-
#define OP_COMMIT_FPM_VALUES 30
1751-
#define OP_REQUESTED_COMMANDS 31
1752-
#define OP_COMPLETED_COMMANDS 32
1753-
#define OP_GEN_AE 33
1754-
#define OP_QUERY_RDMA_FEATURES 34
1755-
#define OP_SIZE_CQP_STAT_ARRAY 35
1733+
#define OP_UPDATE_PE_SDS 23
1734+
#define OP_MANAGE_HMC_PM_FUNC_TABLE 24
1735+
#define OP_SUSPEND 25
1736+
#define OP_RESUME 26
1737+
#define OP_MANAGE_VF_PBLE_BP 27
1738+
#define OP_QUERY_FPM_VALUES 28
1739+
#define OP_COMMIT_FPM_VALUES 29
1740+
#define OP_REQUESTED_COMMANDS 30
1741+
#define OP_COMPLETED_COMMANDS 31
1742+
#define OP_GEN_AE 32
1743+
#define OP_QUERY_RDMA_FEATURES 33
1744+
#define OP_SIZE_CQP_STAT_ARRAY 34
17561745

17571746
#endif

drivers/infiniband/hw/i40iw/i40iw_status.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ enum i40iw_status_code {
6161
I40IW_ERR_QUEUE_EMPTY = -22,
6262
I40IW_ERR_INVALID_ALIGNMENT = -23,
6363
I40IW_ERR_FLUSHED_QUEUE = -24,
64-
I40IW_ERR_INVALID_PUSH_PAGE_INDEX = -25,
6564
I40IW_ERR_INVALID_INLINE_DATA_SIZE = -26,
6665
I40IW_ERR_TIMEOUT = -27,
6766
I40IW_ERR_OPCODE_MISMATCH = -28,

drivers/infiniband/hw/i40iw/i40iw_type.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ struct i40iw_sc_qp {
387387
u8 *q2_buf;
388388
u64 qp_compl_ctx;
389389
u16 qs_handle;
390-
u16 push_idx;
391390
u8 sq_tph_val;
392391
u8 rq_tph_val;
393392
u8 qp_state;
@@ -749,8 +748,6 @@ struct i40iw_qp_host_ctx_info {
749748
struct i40iwarp_offload_info *iwarp_info;
750749
u32 send_cq_num;
751750
u32 rcv_cq_num;
752-
u16 push_idx;
753-
bool push_mode_en;
754751
bool tcp_info_valid;
755752
bool iwarp_info_valid;
756753
bool err_rq_idx_valid;
@@ -937,12 +934,6 @@ struct i40iw_local_mac_ipaddr_entry_info {
937934
u8 entry_idx;
938935
};
939936

940-
struct i40iw_cqp_manage_push_page_info {
941-
u32 push_idx;
942-
u16 qs_handle;
943-
u8 free_page;
944-
};
945-
946937
struct i40iw_qp_flush_info {
947938
u16 sq_minor_code;
948939
u16 sq_major_code;
@@ -1114,9 +1105,6 @@ struct i40iw_mr_ops {
11141105
};
11151106

11161107
struct i40iw_cqp_misc_ops {
1117-
enum i40iw_status_code (*manage_push_page)(struct i40iw_sc_cqp *,
1118-
struct i40iw_cqp_manage_push_page_info *,
1119-
u64, bool);
11201108
enum i40iw_status_code (*manage_hmc_pm_func_table)(struct i40iw_sc_cqp *,
11211109
u64, u8, bool, bool);
11221110
enum i40iw_status_code (*set_hmc_resource_profile)(struct i40iw_sc_cqp *,
@@ -1253,12 +1241,6 @@ struct cqp_info {
12531241
u64 scratch;
12541242
} manage_vf_pble_bp;
12551243

1256-
struct {
1257-
struct i40iw_sc_cqp *cqp;
1258-
struct i40iw_cqp_manage_push_page_info info;
1259-
u64 scratch;
1260-
} manage_push_page;
1261-
12621244
struct {
12631245
struct i40iw_sc_dev *dev;
12641246
struct i40iw_upload_context_info info;

drivers/infiniband/hw/i40iw/i40iw_uk.c

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,6 @@ void i40iw_qp_post_wr(struct i40iw_qp_uk *qp)
114114
qp->initial_ring.head = qp->sq_ring.head;
115115
}
116116

117-
/**
118-
* i40iw_qp_ring_push_db - ring qp doorbell
119-
* @qp: hw qp ptr
120-
* @wqe_idx: wqe index
121-
*/
122-
static void i40iw_qp_ring_push_db(struct i40iw_qp_uk *qp, u32 wqe_idx)
123-
{
124-
set_32bit_val(qp->push_db, 0, LS_32((wqe_idx >> 2), I40E_PFPE_WQEALLOC_WQE_DESC_INDEX) | qp->qp_id);
125-
qp->initial_ring.head = I40IW_RING_GETCURRENT_HEAD(qp->sq_ring);
126-
}
127-
128117
/**
129118
* i40iw_qp_get_next_send_wqe - return next wqe ptr
130119
* @qp: hw qp ptr
@@ -426,7 +415,6 @@ static enum i40iw_status_code i40iw_inline_rdma_write(struct i40iw_qp_uk *qp,
426415
u64 *wqe;
427416
u8 *dest, *src;
428417
struct i40iw_inline_rdma_write *op_info;
429-
u64 *push;
430418
u64 header = 0;
431419
u32 wqe_idx;
432420
enum i40iw_status_code ret_code;
@@ -453,7 +441,6 @@ static enum i40iw_status_code i40iw_inline_rdma_write(struct i40iw_qp_uk *qp,
453441
LS_64(I40IWQP_OP_RDMA_WRITE, I40IWQPSQ_OPCODE) |
454442
LS_64(op_info->len, I40IWQPSQ_INLINEDATALEN) |
455443
LS_64(1, I40IWQPSQ_INLINEDATAFLAG) |
456-
LS_64((qp->push_db ? 1 : 0), I40IWQPSQ_PUSHWQE) |
457444
LS_64(read_fence, I40IWQPSQ_READFENCE) |
458445
LS_64(info->local_fence, I40IWQPSQ_LOCALFENCE) |
459446
LS_64(info->signaled, I40IWQPSQ_SIGCOMPL) |
@@ -475,14 +462,8 @@ static enum i40iw_status_code i40iw_inline_rdma_write(struct i40iw_qp_uk *qp,
475462

476463
set_64bit_val(wqe, 24, header);
477464

478-
if (qp->push_db) {
479-
push = (u64 *)((uintptr_t)qp->push_wqe + (wqe_idx & 0x3) * 0x20);
480-
memcpy(push, wqe, (op_info->len > 16) ? op_info->len + 16 : 32);
481-
i40iw_qp_ring_push_db(qp, wqe_idx);
482-
} else {
483-
if (post_sq)
484-
i40iw_qp_post_wr(qp);
485-
}
465+
if (post_sq)
466+
i40iw_qp_post_wr(qp);
486467

487468
return 0;
488469
}
@@ -507,7 +488,6 @@ static enum i40iw_status_code i40iw_inline_send(struct i40iw_qp_uk *qp,
507488
enum i40iw_status_code ret_code;
508489
bool read_fence = false;
509490
u8 wqe_size;
510-
u64 *push;
511491

512492
op_info = &info->op.inline_send;
513493
if (op_info->len > I40IW_MAX_INLINE_DATA_SIZE)
@@ -526,7 +506,6 @@ static enum i40iw_status_code i40iw_inline_send(struct i40iw_qp_uk *qp,
526506
LS_64(info->op_type, I40IWQPSQ_OPCODE) |
527507
LS_64(op_info->len, I40IWQPSQ_INLINEDATALEN) |
528508
LS_64(1, I40IWQPSQ_INLINEDATAFLAG) |
529-
LS_64((qp->push_db ? 1 : 0), I40IWQPSQ_PUSHWQE) |
530509
LS_64(read_fence, I40IWQPSQ_READFENCE) |
531510
LS_64(info->local_fence, I40IWQPSQ_LOCALFENCE) |
532511
LS_64(info->signaled, I40IWQPSQ_SIGCOMPL) |
@@ -548,14 +527,8 @@ static enum i40iw_status_code i40iw_inline_send(struct i40iw_qp_uk *qp,
548527

549528
set_64bit_val(wqe, 24, header);
550529

551-
if (qp->push_db) {
552-
push = (u64 *)((uintptr_t)qp->push_wqe + (wqe_idx & 0x3) * 0x20);
553-
memcpy(push, wqe, (op_info->len > 16) ? op_info->len + 16 : 32);
554-
i40iw_qp_ring_push_db(qp, wqe_idx);
555-
} else {
556-
if (post_sq)
557-
i40iw_qp_post_wr(qp);
558-
}
530+
if (post_sq)
531+
i40iw_qp_post_wr(qp);
559532

560533
return 0;
561534
}
@@ -772,7 +745,6 @@ static enum i40iw_status_code i40iw_cq_poll_completion(struct i40iw_cq_uk *cq,
772745

773746
q_type = (u8)RS_64(qword3, I40IW_CQ_SQ);
774747
info->error = (bool)RS_64(qword3, I40IW_CQ_ERROR);
775-
info->push_dropped = (bool)RS_64(qword3, I40IWCQ_PSHDROP);
776748
if (info->error) {
777749
info->comp_status = I40IW_COMPL_STATUS_FLUSHED;
778750
info->major_err = (bool)RS_64(qword3, I40IW_CQ_MAJERR);
@@ -951,7 +923,6 @@ enum i40iw_status_code i40iw_get_rqdepth(u32 rq_size, u8 shift, u32 *rqdepth)
951923

952924
static const struct i40iw_qp_uk_ops iw_qp_uk_ops = {
953925
.iw_qp_post_wr = i40iw_qp_post_wr,
954-
.iw_qp_ring_push_db = i40iw_qp_ring_push_db,
955926
.iw_rdma_write = i40iw_rdma_write,
956927
.iw_rdma_read = i40iw_rdma_read,
957928
.iw_send = i40iw_send,
@@ -1009,11 +980,7 @@ enum i40iw_status_code i40iw_qp_uk_init(struct i40iw_qp_uk *qp,
1009980

1010981
qp->wqe_alloc_reg = info->wqe_alloc_reg;
1011982
qp->qp_id = info->qp_id;
1012-
1013983
qp->sq_size = info->sq_size;
1014-
qp->push_db = info->push_db;
1015-
qp->push_wqe = info->push_wqe;
1016-
1017984
qp->max_sq_frag_cnt = info->max_sq_frag_cnt;
1018985
sq_ring_size = qp->sq_size << sqshift;
1019986

drivers/infiniband/hw/i40iw/i40iw_user.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,11 @@ enum i40iw_device_capabilities_const {
6464
I40IW_MAX_SGE_RD = 1,
6565
I40IW_MAX_OUTBOUND_MESSAGE_SIZE = 2147483647,
6666
I40IW_MAX_INBOUND_MESSAGE_SIZE = 2147483647,
67-
I40IW_MAX_PUSH_PAGE_COUNT = 4096,
6867
I40IW_MAX_PE_ENABLED_VF_COUNT = 32,
6968
I40IW_MAX_VF_FPM_ID = 47,
7069
I40IW_MAX_VF_PER_PF = 127,
7170
I40IW_MAX_SQ_PAYLOAD_SIZE = 2145386496,
7271
I40IW_MAX_INLINE_DATA_SIZE = 48,
73-
I40IW_MAX_PUSHMODE_INLINE_DATA_SIZE = 48,
7472
I40IW_MAX_IRD_SIZE = 64,
7573
I40IW_MAX_ORD_SIZE = 127,
7674
I40IW_MAX_WQ_ENTRIES = 2048,
@@ -272,15 +270,13 @@ struct i40iw_cq_poll_info {
272270
u16 minor_err;
273271
u8 op_type;
274272
bool stag_invalid_set;
275-
bool push_dropped;
276273
bool error;
277274
bool is_srq;
278275
bool solicited_event;
279276
};
280277

281278
struct i40iw_qp_uk_ops {
282279
void (*iw_qp_post_wr)(struct i40iw_qp_uk *);
283-
void (*iw_qp_ring_push_db)(struct i40iw_qp_uk *, u32);
284280
enum i40iw_status_code (*iw_rdma_write)(struct i40iw_qp_uk *,
285281
struct i40iw_post_sq_info *, bool);
286282
enum i40iw_status_code (*iw_rdma_read)(struct i40iw_qp_uk *,
@@ -340,8 +336,6 @@ struct i40iw_qp_uk {
340336
struct i40iw_sq_uk_wr_trk_info *sq_wrtrk_array;
341337
u64 *rq_wrid_array;
342338
u64 *shadow_area;
343-
u32 *push_db;
344-
u64 *push_wqe;
345339
struct i40iw_ring sq_ring;
346340
struct i40iw_ring rq_ring;
347341
struct i40iw_ring initial_ring;
@@ -381,8 +375,6 @@ struct i40iw_qp_uk_init_info {
381375
u64 *shadow_area;
382376
struct i40iw_sq_uk_wr_trk_info *sq_wrtrk_array;
383377
u64 *rq_wrid_array;
384-
u32 *push_db;
385-
u64 *push_wqe;
386378
u32 qp_id;
387379
u32 sq_size;
388380
u32 rq_size;

0 commit comments

Comments
 (0)