IB/iser: remove unused macros
Subsystems (2)
Max Gurtovoy
maintainerPATCH 1/3 IB/iser: remove unused macros
The removed macros are old leftovers.
Reviewed-by Sergey Gorenko <[email protected]>
Signed-off-by Max Gurtovoy <[email protected]>
--- drivers/infiniband/ulp/iser/iser_verbs.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/infiniband/ulp/iser/iser_verbs.c +0 -6
@@ -37,12 +37,6 @@#include "iscsi_iser.h" -#define ISCSI_ISER_MAX_CONN 8 -#define ISER_MAX_RX_LEN (ISER_QP_MAX_RECV_DTOS * ISCSI_ISER_MAX_CONN) -#define ISER_MAX_TX_LEN (ISER_QP_MAX_REQ_DTOS * ISCSI_ISER_MAX_CONN) -#define ISER_MAX_CQ_LEN (ISER_MAX_RX_LEN + ISER_MAX_TX_LEN + \ - ISCSI_ISER_MAX_CONN) -static void iser_qp_event_callback (struct ib_event *cause,void *context) { iser_err("qp event %s (%d)\n",
Signature · 1 line
2.18.1
Max Gurtovoy
maintainerPATCH 2/3 IB/iser: centralize setting desc type and done callback
Move this common logic into iser_create_send_desc instead of duplicating the code.
Reviewed-by Sergey Gorenko <[email protected]>
Signed-off-by Max Gurtovoy <[email protected]>
--- drivers/infiniband/ulp/iser/iser_initiator.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/infiniband/ulp/iser/iser_initiator.c +9 -7
@@ -141,10 +141,14 @@ static int iser_prepare_write_cmd(struct iscsi_task *task, unsigned int imm_sz,/* creates a new tx descriptor and adds header regd buffer */ static void iser_create_send_desc (struct iser_conn *iser_conn, -struct iser_tx_desc *tx_desc) +struct iser_tx_desc *tx_desc,enum iser_desc_type type, +void (*done)(struct ib_cq *cq,struct ib_wc *wc)) {struct iser_device *device = iser_conn->ib_conn.device; + tx_desc->type = type; + tx_desc->cqe.done = done; +ib_dma_sync_single_for_cpu (device->ib_device, tx_desc->dma_addr,ISER_HEADERS_LEN ,DMA_TO_DEVICE );
@@ -349,9 +353,8 @@ int iser_send_command(struct iscsi_conn *conn, struct iscsi_task *task) edtl =ntohl (hdr->data_length);/* build the tx desc regd header and add it to the tx desc dto */ - tx_desc->type =ISCSI_TX_SCSI_COMMAND ; - tx_desc->cqe.done = iser_cmd_comp; -iser_create_send_desc (iser_conn, tx_desc); +iser_create_send_desc (iser_conn, tx_desc,ISCSI_TX_SCSI_COMMAND , + iser_cmd_comp);if (hdr->flags &ISCSI_FLAG_CMD_READ ) { data_buf = &iser_task->data[ISER_DIR_IN ];
@@ -478,9 +481,8 @@ int iser_send_control(struct iscsi_conn *conn, struct iscsi_task *task)struct iser_device *device;/* build the tx desc regd header and add it to the tx desc dto */ - mdesc->type =ISCSI_TX_CONTROL ; - mdesc->cqe.done = iser_ctrl_comp; -iser_create_send_desc (iser_conn, mdesc); +iser_create_send_desc (iser_conn, mdesc,ISCSI_TX_CONTROL , + iser_ctrl_comp); device = iser_conn->ib_conn.device;
Signature · 1 line
2.18.1
Re: [PATCH 2/3] IB/iser: centralize setting desc type and done callback
Reviewed-by Sagi Grimberg <[email protected]>
Max Gurtovoy
maintainerPATCH 3/3 IB/iser: remove redundant new line
In reply to Max GurtovoyThis commit doesn't change any logic.
Reviewed-by Sergey Gorenko <[email protected]>
Signed-off-by Max Gurtovoy <[email protected]>
--- drivers/infiniband/ulp/iser/iser_initiator.c | 1 - 1 file changed, 1 deletion(-)
drivers/infiniband/ulp/iser/iser_initiator.c +0 -1
@@ -460,7 +460,6 @@ int iser_send_data_out(struct iscsi_conn *conn, struct iscsi_task *task,iser_dbg ("data-out itt: %d, offset: %ld, sz: %ld\n" , itt, buf_offset, data_seg_len); - err =iser_post_send (&iser_conn->ib_conn, tx_desc);if (!err)return 0 ;
Signature · 1 line
2.18.1
Re: [PATCH 3/3] IB/iser: remove redundant new line
Reviewed-by Sagi Grimberg <[email protected]>
Reviewed-by Sagi Grimberg <[email protected]>
Leon Romanovsky
AppliedQuoted 3 lines · Max Gurtovoy
The removed macros are old leftovers.
Applied, thanks!
[1/3] IB/iser: remove unused macros
https://git.kernel.org/rdma/rdma/c/b7727e231dad51 [2/3] IB/iser: centralize setting desc type and done callback https://git.kernel.org/rdma/rdma/c/92363895b6c31b [3/3] IB/iser: remove redundant new line https://git.kernel.org/rdma/rdma/c/070fc1c0e272a0
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>