* [PATCH 0/4] Do some cleanups in irdma driver
@ 2021-10-11 11:01 yanjun.zhu
2021-10-11 11:01 ` [PATCH 1/4] RDMA/irdma: compact the uk.c file yanjun.zhu
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: yanjun.zhu @ 2021-10-11 11:01 UTC (permalink / raw)
To: mustafa.ismail, shiraz.saleem, dledford, jgg, linux-rdma, leonro,
yanjun.zhu
From: Zhu Yanjun <yanjun.zhu@linux.dev>
Some functions are not used. So these functions are removed.
Zhu Yanjun (4):
RDMA/irdma: compact the uk.c file
RDMA/irdma: compact the ctrl.c
RDMA/irdma: compact the utils.c file
RDMA/irdma: compact the file uk.c
drivers/infiniband/hw/irdma/ctrl.c | 38 -------------------
drivers/infiniband/hw/irdma/osdep.h | 1 -
drivers/infiniband/hw/irdma/protos.h | 2 -
drivers/infiniband/hw/irdma/type.h | 2 +-
drivers/infiniband/hw/irdma/uk.c | 57 ----------------------------
drivers/infiniband/hw/irdma/user.h | 4 +-
drivers/infiniband/hw/irdma/utils.c | 45 ----------------------
7 files changed, 2 insertions(+), 147 deletions(-)
--
2.27.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] RDMA/irdma: compact the uk.c file
2021-10-11 11:01 [PATCH 0/4] Do some cleanups in irdma driver yanjun.zhu
@ 2021-10-11 11:01 ` yanjun.zhu
2021-10-11 14:07 ` Saleem, Shiraz
2021-10-11 11:01 ` [PATCH 2/4] RDMA/irdma: compact the ctrl.c yanjun.zhu
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: yanjun.zhu @ 2021-10-11 11:01 UTC (permalink / raw)
To: mustafa.ismail, shiraz.saleem, dledford, jgg, linux-rdma, leonro,
yanjun.zhu
From: Zhu Yanjun <yanjun.zhu@linux.dev>
The function irdma_uk_mw_bind is not used. So remove it.
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
drivers/infiniband/hw/irdma/uk.c | 57 ------------------------------
drivers/infiniband/hw/irdma/user.h | 4 +--
2 files changed, 1 insertion(+), 60 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/uk.c b/drivers/infiniband/hw/irdma/uk.c
index 5fb92de1f015..ebcd93bb9e9d 100644
--- a/drivers/infiniband/hw/irdma/uk.c
+++ b/drivers/infiniband/hw/irdma/uk.c
@@ -866,63 +866,6 @@ irdma_uk_stag_local_invalidate(struct irdma_qp_uk *qp,
return 0;
}
-/**
- * irdma_uk_mw_bind - bind Memory Window
- * @qp: hw qp ptr
- * @info: post sq information
- * @post_sq: flag to post sq
- */
-enum irdma_status_code irdma_uk_mw_bind(struct irdma_qp_uk *qp,
- struct irdma_post_sq_info *info,
- bool post_sq)
-{
- __le64 *wqe;
- struct irdma_bind_window *op_info;
- u64 hdr;
- u32 wqe_idx;
- bool local_fence = false;
-
- info->push_wqe = qp->push_db ? true : false;
- op_info = &info->op.bind_window;
- local_fence |= info->local_fence;
-
- wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, IRDMA_QP_WQE_MIN_QUANTA,
- 0, info);
- if (!wqe)
- return IRDMA_ERR_QP_TOOMANY_WRS_POSTED;
-
- irdma_clr_wqes(qp, wqe_idx);
-
- qp->wqe_ops.iw_set_mw_bind_wqe(wqe, op_info);
-
- hdr = FIELD_PREP(IRDMAQPSQ_OPCODE, IRDMA_OP_TYPE_BIND_MW) |
- FIELD_PREP(IRDMAQPSQ_STAGRIGHTS,
- ((op_info->ena_reads << 2) | (op_info->ena_writes << 3))) |
- FIELD_PREP(IRDMAQPSQ_VABASEDTO,
- (op_info->addressing_type == IRDMA_ADDR_TYPE_VA_BASED ? 1 : 0)) |
- FIELD_PREP(IRDMAQPSQ_MEMWINDOWTYPE,
- (op_info->mem_window_type_1 ? 1 : 0)) |
- FIELD_PREP(IRDMAQPSQ_PUSHWQE, info->push_wqe) |
- FIELD_PREP(IRDMAQPSQ_READFENCE, info->read_fence) |
- FIELD_PREP(IRDMAQPSQ_LOCALFENCE, local_fence) |
- FIELD_PREP(IRDMAQPSQ_SIGCOMPL, info->signaled) |
- FIELD_PREP(IRDMAQPSQ_VALID, qp->swqe_polarity);
-
- dma_wmb(); /* make sure WQE is populated before valid bit is set */
-
- set_64bit_val(wqe, 24, hdr);
-
- if (info->push_wqe) {
- irdma_qp_push_wqe(qp, wqe, IRDMA_QP_WQE_MIN_QUANTA, wqe_idx,
- post_sq);
- } else {
- if (post_sq)
- irdma_uk_qp_post_wr(qp);
- }
-
- return 0;
-}
-
/**
* irdma_uk_post_receive - post receive wqe
* @qp: hw qp ptr
diff --git a/drivers/infiniband/hw/irdma/user.h b/drivers/infiniband/hw/irdma/user.h
index 3dcbb1fbf2c6..31d5e4e3f442 100644
--- a/drivers/infiniband/hw/irdma/user.h
+++ b/drivers/infiniband/hw/irdma/user.h
@@ -283,9 +283,7 @@ enum irdma_status_code irdma_uk_inline_rdma_write(struct irdma_qp_uk *qp,
enum irdma_status_code irdma_uk_inline_send(struct irdma_qp_uk *qp,
struct irdma_post_sq_info *info,
bool post_sq);
-enum irdma_status_code irdma_uk_mw_bind(struct irdma_qp_uk *qp,
- struct irdma_post_sq_info *info,
- bool post_sq);
+
enum irdma_status_code irdma_uk_post_nop(struct irdma_qp_uk *qp, u64 wr_id,
bool signaled, bool post_sq);
enum irdma_status_code irdma_uk_post_receive(struct irdma_qp_uk *qp,
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] RDMA/irdma: compact the ctrl.c
2021-10-11 11:01 [PATCH 0/4] Do some cleanups in irdma driver yanjun.zhu
2021-10-11 11:01 ` [PATCH 1/4] RDMA/irdma: compact the uk.c file yanjun.zhu
@ 2021-10-11 11:01 ` yanjun.zhu
2021-10-11 14:07 ` Saleem, Shiraz
2021-10-11 11:01 ` [PATCH 3/4] RDMA/irdma: compact the utils.c file yanjun.zhu
2021-10-11 11:01 ` [PATCH 4/4] RDMA/irdma: compact the file uk.c yanjun.zhu
3 siblings, 1 reply; 9+ messages in thread
From: yanjun.zhu @ 2021-10-11 11:01 UTC (permalink / raw)
To: mustafa.ismail, shiraz.saleem, dledford, jgg, linux-rdma, leonro,
yanjun.zhu
From: Zhu Yanjun <yanjun.zhu@linux.dev>
The function irdma_sc_send_lsmm_nostag is not used. So remove it.
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
drivers/infiniband/hw/irdma/ctrl.c | 38 ------------------------------
drivers/infiniband/hw/irdma/type.h | 2 +-
2 files changed, 1 insertion(+), 39 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c
index f1e5515256e0..729fa8a3f6f8 100644
--- a/drivers/infiniband/hw/irdma/ctrl.c
+++ b/drivers/infiniband/hw/irdma/ctrl.c
@@ -1419,44 +1419,6 @@ void irdma_sc_send_lsmm(struct irdma_sc_qp *qp, void *lsmm_buf, u32 size,
irdma_sc_gen_rts_ae(qp);
}
-/**
- * irdma_sc_send_lsmm_nostag - for privilege qp
- * @qp: sc qp struct
- * @lsmm_buf: buffer with lsmm message
- * @size: size of lsmm buffer
- */
-void irdma_sc_send_lsmm_nostag(struct irdma_sc_qp *qp, void *lsmm_buf, u32 size)
-{
- __le64 *wqe;
- u64 hdr;
- struct irdma_qp_uk *qp_uk;
-
- qp_uk = &qp->qp_uk;
- wqe = qp_uk->sq_base->elem;
-
- set_64bit_val(wqe, 0, (uintptr_t)lsmm_buf);
-
- if (qp->qp_uk.uk_attrs->hw_rev == IRDMA_GEN_1)
- set_64bit_val(wqe, 8,
- FIELD_PREP(IRDMAQPSQ_GEN1_FRAG_LEN, size));
- else
- set_64bit_val(wqe, 8,
- FIELD_PREP(IRDMAQPSQ_FRAG_LEN, size) |
- FIELD_PREP(IRDMAQPSQ_VALID, qp->qp_uk.swqe_polarity));
- set_64bit_val(wqe, 16, 0);
-
- hdr = FIELD_PREP(IRDMAQPSQ_OPCODE, IRDMAQP_OP_RDMA_SEND) |
- FIELD_PREP(IRDMAQPSQ_STREAMMODE, 1) |
- FIELD_PREP(IRDMAQPSQ_WAITFORRCVPDU, 1) |
- FIELD_PREP(IRDMAQPSQ_VALID, qp->qp_uk.swqe_polarity);
- dma_wmb(); /* make sure WQE is written before valid bit is set */
-
- set_64bit_val(wqe, 24, hdr);
-
- print_hex_dump_debug("WQE: SEND_LSMM_NOSTAG WQE", DUMP_PREFIX_OFFSET,
- 16, 8, wqe, IRDMA_QP_WQE_MIN_SIZE, false);
-}
-
/**
* irdma_sc_send_rtt - send last read0 or write0
* @qp: sc qp struct
diff --git a/drivers/infiniband/hw/irdma/type.h b/drivers/infiniband/hw/irdma/type.h
index 874bc25a938b..4312f2070534 100644
--- a/drivers/infiniband/hw/irdma/type.h
+++ b/drivers/infiniband/hw/irdma/type.h
@@ -1256,7 +1256,7 @@ enum irdma_status_code irdma_sc_qp_modify(struct irdma_sc_qp *qp,
u64 scratch, bool post_sq);
void irdma_sc_send_lsmm(struct irdma_sc_qp *qp, void *lsmm_buf, u32 size,
irdma_stag stag);
-void irdma_sc_send_lsmm_nostag(struct irdma_sc_qp *qp, void *lsmm_buf, u32 size);
+
void irdma_sc_send_rtt(struct irdma_sc_qp *qp, bool read);
void irdma_sc_qp_setctx(struct irdma_sc_qp *qp, __le64 *qp_ctx,
struct irdma_qp_host_ctx_info *info);
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] RDMA/irdma: compact the utils.c file
2021-10-11 11:01 [PATCH 0/4] Do some cleanups in irdma driver yanjun.zhu
2021-10-11 11:01 ` [PATCH 1/4] RDMA/irdma: compact the uk.c file yanjun.zhu
2021-10-11 11:01 ` [PATCH 2/4] RDMA/irdma: compact the ctrl.c yanjun.zhu
@ 2021-10-11 11:01 ` yanjun.zhu
2021-10-11 14:07 ` Saleem, Shiraz
2021-10-11 11:01 ` [PATCH 4/4] RDMA/irdma: compact the file uk.c yanjun.zhu
3 siblings, 1 reply; 9+ messages in thread
From: yanjun.zhu @ 2021-10-11 11:01 UTC (permalink / raw)
To: mustafa.ismail, shiraz.saleem, dledford, jgg, linux-rdma, leonro,
yanjun.zhu
From: Zhu Yanjun <yanjun.zhu@linux.dev>
The function irdma_get_hw_addr is not used. So remove it.
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
drivers/infiniband/hw/irdma/osdep.h | 1 -
drivers/infiniband/hw/irdma/utils.c | 11 -----------
2 files changed, 12 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/osdep.h b/drivers/infiniband/hw/irdma/osdep.h
index b2ab52335ca6..63d8bb3a6903 100644
--- a/drivers/infiniband/hw/irdma/osdep.h
+++ b/drivers/infiniband/hw/irdma/osdep.h
@@ -37,7 +37,6 @@ struct irdma_hw;
struct irdma_pci_f;
struct ib_device *to_ibdev(struct irdma_sc_dev *dev);
-u8 __iomem *irdma_get_hw_addr(void *dev);
void irdma_ieq_mpa_crc_ae(struct irdma_sc_dev *dev, struct irdma_sc_qp *qp);
enum irdma_status_code irdma_vf_wait_vchnl_resp(struct irdma_sc_dev *dev);
bool irdma_vf_clear_to_send(struct irdma_sc_dev *dev);
diff --git a/drivers/infiniband/hw/irdma/utils.c b/drivers/infiniband/hw/irdma/utils.c
index ac91ea5296db..84bc7b659d76 100644
--- a/drivers/infiniband/hw/irdma/utils.c
+++ b/drivers/infiniband/hw/irdma/utils.c
@@ -767,17 +767,6 @@ struct ib_qp *irdma_get_qp(struct ib_device *device, int qpn)
return &iwdev->rf->qp_table[qpn]->ibqp;
}
-/**
- * irdma_get_hw_addr - return hw addr
- * @par: points to shared dev
- */
-u8 __iomem *irdma_get_hw_addr(void *par)
-{
- struct irdma_sc_dev *dev = par;
-
- return dev->hw->hw_addr;
-}
-
/**
* irdma_remove_cqp_head - return head entry and remove
* @dev: device
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] RDMA/irdma: compact the file uk.c
2021-10-11 11:01 [PATCH 0/4] Do some cleanups in irdma driver yanjun.zhu
` (2 preceding siblings ...)
2021-10-11 11:01 ` [PATCH 3/4] RDMA/irdma: compact the utils.c file yanjun.zhu
@ 2021-10-11 11:01 ` yanjun.zhu
2021-10-11 14:07 ` Saleem, Shiraz
3 siblings, 1 reply; 9+ messages in thread
From: yanjun.zhu @ 2021-10-11 11:01 UTC (permalink / raw)
To: mustafa.ismail, shiraz.saleem, dledford, jgg, linux-rdma, leonro,
yanjun.zhu
From: Zhu Yanjun <yanjun.zhu@linux.dev>
The function irdma_cqp_up_map_cmd is not used. So remove it.
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
drivers/infiniband/hw/irdma/protos.h | 2 --
drivers/infiniband/hw/irdma/utils.c | 34 ----------------------------
2 files changed, 36 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/protos.h b/drivers/infiniband/hw/irdma/protos.h
index 78f598fdbccf..a17c0ffb0cc8 100644
--- a/drivers/infiniband/hw/irdma/protos.h
+++ b/drivers/infiniband/hw/irdma/protos.h
@@ -37,8 +37,6 @@ void irdma_hw_stats_read_all(struct irdma_vsi_pestat *stats,
enum irdma_status_code
irdma_cqp_ws_node_cmd(struct irdma_sc_dev *dev, u8 cmd,
struct irdma_ws_node_info *node_info);
-enum irdma_status_code irdma_cqp_up_map_cmd(struct irdma_sc_dev *dev, u8 cmd,
- struct irdma_up_info *map_info);
enum irdma_status_code irdma_cqp_ceq_cmd(struct irdma_sc_dev *dev,
struct irdma_sc_ceq *sc_ceq, u8 op);
enum irdma_status_code irdma_cqp_aeq_cmd(struct irdma_sc_dev *dev,
diff --git a/drivers/infiniband/hw/irdma/utils.c b/drivers/infiniband/hw/irdma/utils.c
index 84bc7b659d76..0ebce57e8756 100644
--- a/drivers/infiniband/hw/irdma/utils.c
+++ b/drivers/infiniband/hw/irdma/utils.c
@@ -2048,40 +2048,6 @@ irdma_cqp_ws_node_cmd(struct irdma_sc_dev *dev, u8 cmd,
return status;
}
-/**
- * irdma_cqp_up_map_cmd - Set the up-up mapping
- * @dev: pointer to device structure
- * @cmd: map command
- * @map_info: pointer to up map info
- */
-enum irdma_status_code irdma_cqp_up_map_cmd(struct irdma_sc_dev *dev, u8 cmd,
- struct irdma_up_info *map_info)
-{
- struct irdma_pci_f *rf = dev_to_rf(dev);
- struct irdma_cqp *iwcqp = &rf->cqp;
- struct irdma_sc_cqp *cqp = &iwcqp->sc_cqp;
- struct irdma_cqp_request *cqp_request;
- struct cqp_cmds_info *cqp_info;
- enum irdma_status_code status;
-
- cqp_request = irdma_alloc_and_get_cqp_request(iwcqp, false);
- if (!cqp_request)
- return IRDMA_ERR_NO_MEMORY;
-
- cqp_info = &cqp_request->info;
- memset(cqp_info, 0, sizeof(*cqp_info));
- cqp_info->cqp_cmd = cmd;
- cqp_info->post_sq = 1;
- cqp_info->in.u.up_map.info = *map_info;
- cqp_info->in.u.up_map.cqp = cqp;
- cqp_info->in.u.up_map.scratch = (uintptr_t)cqp_request;
-
- status = irdma_handle_cqp_op(rf, cqp_request);
- irdma_put_cqp_request(&rf->cqp, cqp_request);
-
- return status;
-}
-
/**
* irdma_ah_cqp_op - perform an AH cqp operation
* @rf: RDMA PCI function
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH 1/4] RDMA/irdma: compact the uk.c file
2021-10-11 11:01 ` [PATCH 1/4] RDMA/irdma: compact the uk.c file yanjun.zhu
@ 2021-10-11 14:07 ` Saleem, Shiraz
0 siblings, 0 replies; 9+ messages in thread
From: Saleem, Shiraz @ 2021-10-11 14:07 UTC (permalink / raw)
To: yanjun.zhu, Ismail, Mustafa, dledford, jgg, linux-rdma, leonro
> Subject: [PATCH 1/4] RDMA/irdma: compact the uk.c file
>
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> The function irdma_uk_mw_bind is not used. So remove it.
>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
> drivers/infiniband/hw/irdma/uk.c | 57 ------------------------------
> drivers/infiniband/hw/irdma/user.h | 4 +--
> 2 files changed, 1 insertion(+), 60 deletions(-)
>
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 2/4] RDMA/irdma: compact the ctrl.c
2021-10-11 11:01 ` [PATCH 2/4] RDMA/irdma: compact the ctrl.c yanjun.zhu
@ 2021-10-11 14:07 ` Saleem, Shiraz
0 siblings, 0 replies; 9+ messages in thread
From: Saleem, Shiraz @ 2021-10-11 14:07 UTC (permalink / raw)
To: yanjun.zhu, Ismail, Mustafa, dledford, jgg, linux-rdma, leonro
> Subject: [PATCH 2/4] RDMA/irdma: compact the ctrl.c
>
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> The function irdma_sc_send_lsmm_nostag is not used. So remove it.
>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
> drivers/infiniband/hw/irdma/ctrl.c | 38 ------------------------------
> drivers/infiniband/hw/irdma/type.h | 2 +-
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 3/4] RDMA/irdma: compact the utils.c file
2021-10-11 11:01 ` [PATCH 3/4] RDMA/irdma: compact the utils.c file yanjun.zhu
@ 2021-10-11 14:07 ` Saleem, Shiraz
0 siblings, 0 replies; 9+ messages in thread
From: Saleem, Shiraz @ 2021-10-11 14:07 UTC (permalink / raw)
To: yanjun.zhu, Ismail, Mustafa, dledford, jgg, linux-rdma, leonro
> Subject: [PATCH 3/4] RDMA/irdma: compact the utils.c file
>
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> The function irdma_get_hw_addr is not used. So remove it.
>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
> drivers/infiniband/hw/irdma/osdep.h | 1 - drivers/infiniband/hw/irdma/utils.c | 11 ---
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 4/4] RDMA/irdma: compact the file uk.c
2021-10-11 11:01 ` [PATCH 4/4] RDMA/irdma: compact the file uk.c yanjun.zhu
@ 2021-10-11 14:07 ` Saleem, Shiraz
0 siblings, 0 replies; 9+ messages in thread
From: Saleem, Shiraz @ 2021-10-11 14:07 UTC (permalink / raw)
To: yanjun.zhu, Ismail, Mustafa, dledford, jgg, linux-rdma, leonro
> Subject: [PATCH 4/4] RDMA/irdma: compact the file uk.c
>
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>
> The function irdma_cqp_up_map_cmd is not used. So remove it.
>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
> drivers/infiniband/hw/irdma/protos.h | 2 -- drivers/infiniband/hw/irdma/utils.c | 34
> ----------------------------
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-10-11 14:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11 11:01 [PATCH 0/4] Do some cleanups in irdma driver yanjun.zhu
2021-10-11 11:01 ` [PATCH 1/4] RDMA/irdma: compact the uk.c file yanjun.zhu
2021-10-11 14:07 ` Saleem, Shiraz
2021-10-11 11:01 ` [PATCH 2/4] RDMA/irdma: compact the ctrl.c yanjun.zhu
2021-10-11 14:07 ` Saleem, Shiraz
2021-10-11 11:01 ` [PATCH 3/4] RDMA/irdma: compact the utils.c file yanjun.zhu
2021-10-11 14:07 ` Saleem, Shiraz
2021-10-11 11:01 ` [PATCH 4/4] RDMA/irdma: compact the file uk.c yanjun.zhu
2021-10-11 14:07 ` Saleem, Shiraz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.