From 2854bb23cd5bef39fd845b7bdfac7799438bb920 Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Wed, 20 Apr 2016 00:00:08 +0530 Subject: iscsi-target: add int (*iscsit_xmit_pdu)() Add int (*iscsit_xmit_pdu)() to struct iscsit_transport, iscsi-target uses this callback to transmit an iSCSI PDU. cxgbit.ko needs this callback to avoid duplicating iscsit_immediate_queue() and iscsit_response_queue() code. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger --- include/target/iscsi/iscsi_transport.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 90e37faa2ede..24b613a09aee 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h @@ -22,6 +22,8 @@ struct iscsit_transport { int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); + int (*iscsit_xmit_pdu)(struct iscsi_conn *, struct iscsi_cmd *, + struct iscsi_datain_req *, const void *, u32); enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); }; -- cgit v1.2.3 From 7ec811a8e9c3b8289a863d0dac717e08a5093403 Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Wed, 20 Apr 2016 00:00:09 +0530 Subject: iscsi-target: add void (*iscsit_release_cmd)() Add void (*iscsit_release_cmd)() to struct iscsit_transport, iscsi-target uses this callback to release transport driver resources associated with an iSCSI cmd. cxgbit.ko needs this callback to release DDP resource and sg page in case of PASSTHROUGH_SG_TO_MEM_NOALLOC. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target_util.c | 3 +++ include/target/iscsi/iscsi_transport.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index 428b0d9e3dba..a5330171ebe5 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -725,6 +725,9 @@ void __iscsit_free_cmd(struct iscsi_cmd *cmd, bool scsi_cmd, iscsit_remove_cmd_from_immediate_queue(cmd, conn); iscsit_remove_cmd_from_response_queue(cmd, conn); } + + if (conn && conn->conn_transport->iscsit_release_cmd) + conn->conn_transport->iscsit_release_cmd(conn, cmd); } void iscsit_free_cmd(struct iscsi_cmd *cmd, bool shutdown) diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 24b613a09aee..3b0053efdfba 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h @@ -24,6 +24,7 @@ struct iscsit_transport { void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); int (*iscsit_xmit_pdu)(struct iscsi_conn *, struct iscsi_cmd *, struct iscsi_datain_req *, const void *, u32); + void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *); enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); }; -- cgit v1.2.3 From 187e84f7c2e4fa0028241c253c24658ef658e5d3 Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Wed, 20 Apr 2016 00:00:10 +0530 Subject: iscsi-target: add void (*iscsit_get_rx_pdu)() Add void (*iscsit_get_rx_pdu)() to struct iscsit_transport, iscsi-target uses this callback to receive and process Rx iSCSI PDUs. cxgbit.ko needs this callback to reuse iscsi-target Rx thread. Signed-off-by: Varun Prakash Acked-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- drivers/infiniband/ulp/isert/ib_isert.c | 10 ++++++++++ drivers/target/iscsi/iscsi_target.c | 10 ++-------- include/target/iscsi/iscsi_transport.h | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 411e4464ca23..9118d7c04a71 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -3273,6 +3273,15 @@ static void isert_free_conn(struct iscsi_conn *conn) isert_put_conn(isert_conn); } +static void isert_get_rx_pdu(struct iscsi_conn *conn) +{ + struct completion comp; + + init_completion(&comp); + + wait_for_completion_interruptible(&comp); +} + static struct iscsit_transport iser_target_transport = { .name = "IB/iSER", .transport_type = ISCSI_INFINIBAND, @@ -3291,6 +3300,7 @@ static struct iscsit_transport iser_target_transport = { .iscsit_queue_data_in = isert_put_datain, .iscsit_queue_status = isert_put_response, .iscsit_aborted_task = isert_aborted_task, + .iscsit_get_rx_pdu = isert_get_rx_pdu, .iscsit_get_sup_prot_ops = isert_get_sup_prot_ops, }; diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 0724c8355e29..9fa9f0b3a0f4 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -3951,14 +3951,8 @@ int iscsi_target_rx_thread(void *arg) if (rc < 0 || iscsi_target_check_conn_state(conn)) return 0; - if (conn->conn_transport->transport_type == ISCSI_INFINIBAND) { - struct completion comp; - - init_completion(&comp); - rc = wait_for_completion_interruptible(&comp); - if (rc < 0) - goto transport_err; - + if (conn->conn_transport->iscsit_get_rx_pdu) { + conn->conn_transport->iscsit_get_rx_pdu(conn); goto transport_err; } diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 3b0053efdfba..ccc68a0334c2 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h @@ -25,6 +25,7 @@ struct iscsit_transport { int (*iscsit_xmit_pdu)(struct iscsi_conn *, struct iscsi_cmd *, struct iscsi_datain_req *, const void *, u32); void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *); + void (*iscsit_get_rx_pdu)(struct iscsi_conn *); enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); }; -- cgit v1.2.3 From 42bc3e57877f2357ccbbc3ad6e6c7d9be44579f9 Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Wed, 20 Apr 2016 00:00:12 +0530 Subject: iscsi-target: add int (*iscsit_validate_params)() Add int (*iscsit_validate_params)() to struct iscsit_transport, iscsi-target uses this callback for validating conn operational parameters. cxgbit.ko needs this callback to check and update the value of MAXXMITDATASEGMENTLENGTH. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target_login.c | 10 ++++++++++ include/target/iscsi/iscsi_transport.h | 1 + 2 files changed, 11 insertions(+) (limited to 'include') diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 8436d56c5f0c..83574eea0be7 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -1387,6 +1387,16 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) goto old_sess_out; } + if (conn->conn_transport->iscsit_validate_params) { + ret = conn->conn_transport->iscsit_validate_params(conn); + if (ret < 0) { + if (zero_tsih) + goto new_sess_out; + else + goto old_sess_out; + } + } + ret = iscsi_target_start_negotiation(login, conn); if (ret < 0) goto new_sess_out; diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index ccc68a0334c2..46aa219be1ae 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h @@ -26,6 +26,7 @@ struct iscsit_transport { struct iscsi_datain_req *, const void *, u32); void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *); void (*iscsit_get_rx_pdu)(struct iscsi_conn *); + int (*iscsit_validate_params)(struct iscsi_conn *); enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); }; -- cgit v1.2.3 From 8567270d8de6192eb2632b45421b1fde9bcda2f2 Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Wed, 20 Apr 2016 00:00:13 +0530 Subject: iscsi-target: add void (*iscsit_get_r2t_ttt)() Add void (*iscsit_get_r2t_ttt)() to struct iscsit_transport, iscsi-target uses this callback to get r2t->targ_xfer_tag. cxgbit.ko needs this callback for Direct Data Placement of Data Out pdus, adapter uses ttt in Data Out pdus for placing data directly in to the host buffers. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target.c | 5 ++++- include/target/iscsi/iscsi_transport.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index a827b7afe42c..a28eb87d6efc 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -3039,7 +3039,10 @@ static int iscsit_send_r2t( int_to_scsilun(cmd->se_cmd.orig_fe_lun, (struct scsi_lun *)&hdr->lun); hdr->itt = cmd->init_task_tag; - r2t->targ_xfer_tag = session_get_next_ttt(conn->sess); + if (conn->conn_transport->iscsit_get_r2t_ttt) + conn->conn_transport->iscsit_get_r2t_ttt(conn, cmd, r2t); + else + r2t->targ_xfer_tag = session_get_next_ttt(conn->sess); hdr->ttt = cpu_to_be32(r2t->targ_xfer_tag); hdr->statsn = cpu_to_be32(conn->stat_sn); hdr->exp_cmdsn = cpu_to_be32(conn->sess->exp_cmd_sn); diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 46aa219be1ae..32704b214be5 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h @@ -27,6 +27,8 @@ struct iscsit_transport { void (*iscsit_release_cmd)(struct iscsi_conn *, struct iscsi_cmd *); void (*iscsit_get_rx_pdu)(struct iscsi_conn *); int (*iscsit_validate_params)(struct iscsi_conn *); + void (*iscsit_get_r2t_ttt)(struct iscsi_conn *, struct iscsi_cmd *, + struct iscsi_r2t *); enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); }; -- cgit v1.2.3 From c0b7373be811307c5ff1de8c8547aae3597d24aa Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Wed, 20 Apr 2016 00:00:14 +0530 Subject: iscsi-target: move iscsit_thread_check_cpumask() Move iscsit_thread_check_cpumask() to header file so that ISCSI_HW_OFFLOAD and other transport drivers can call this function to ensure both tx and rx thread runs on same cpu. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target.c | 26 -------------------------- include/target/iscsi/iscsi_target_core.h | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) (limited to 'include') diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index a28eb87d6efc..28fc7fb5035f 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -3580,32 +3580,6 @@ void iscsit_thread_get_cpumask(struct iscsi_conn *conn) cpumask_setall(conn->conn_cpumask); } -static inline void iscsit_thread_check_cpumask( - struct iscsi_conn *conn, - struct task_struct *p, - int mode) -{ - /* - * mode == 1 signals iscsi_target_tx_thread() usage. - * mode == 0 signals iscsi_target_rx_thread() usage. - */ - if (mode == 1) { - if (!conn->conn_tx_reset_cpumask) - return; - conn->conn_tx_reset_cpumask = 0; - } else { - if (!conn->conn_rx_reset_cpumask) - return; - conn->conn_rx_reset_cpumask = 0; - } - /* - * Update the CPU mask for this single kthread so that - * both TX and RX kthreads are scheduled to run on the - * same CPU. - */ - set_cpus_allowed_ptr(p, conn->conn_cpumask); -} - static int iscsit_immediate_queue(struct iscsi_conn *conn, struct iscsi_cmd *cmd, int state) { diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h index c3371fa548cb..01c41f2b66d1 100644 --- a/include/target/iscsi/iscsi_target_core.h +++ b/include/target/iscsi/iscsi_target_core.h @@ -890,4 +890,30 @@ static inline u32 session_get_next_ttt(struct iscsi_session *session) } extern struct iscsi_cmd *iscsit_find_cmd_from_itt(struct iscsi_conn *, itt_t); + +static inline void iscsit_thread_check_cpumask( + struct iscsi_conn *conn, + struct task_struct *p, + int mode) +{ + /* + * mode == 1 signals iscsi_target_tx_thread() usage. + * mode == 0 signals iscsi_target_rx_thread() usage. + */ + if (mode == 1) { + if (!conn->conn_tx_reset_cpumask) + return; + conn->conn_tx_reset_cpumask = 0; + } else { + if (!conn->conn_rx_reset_cpumask) + return; + conn->conn_rx_reset_cpumask = 0; + } + /* + * Update the CPU mask for this single kthread so that + * both TX and RX kthreads are scheduled to run on the + * same CPU. + */ + set_cpus_allowed_ptr(p, conn->conn_cpumask); +} #endif /* ISCSI_TARGET_CORE_H */ -- cgit v1.2.3 From 1c46960e3310adf6ac95078210fdb16987c3b31d Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Wed, 20 Apr 2016 00:00:16 +0530 Subject: iscsi-target: add new offload transport type Add new transport type ISCSI_HW_OFFLOAD, hw offload transport drivers will use this transport type. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target_configfs.c | 76 ++++++++++++++++++++++++++++ include/target/iscsi/iscsi_target_core.h | 1 + 2 files changed, 77 insertions(+) (limited to 'include') diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index 97e5b69e0668..3565e07ad8a6 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c @@ -182,12 +182,88 @@ out: return rc; } +static ssize_t lio_target_np_hw_offload_show(struct config_item *item, + char *page) +{ + struct iscsi_tpg_np *tpg_np = to_iscsi_tpg_np(item); + struct iscsi_tpg_np *tpg_np_hw_offload; + ssize_t rb; + + tpg_np_hw_offload = iscsit_tpg_locate_child_np(tpg_np, + ISCSI_HW_OFFLOAD); + if (tpg_np_hw_offload) + rb = sprintf(page, "1\n"); + else + rb = sprintf(page, "0\n"); + + return rb; +} + +static ssize_t lio_target_np_hw_offload_store(struct config_item *item, + const char *page, size_t count) +{ + struct iscsi_tpg_np *tpg_np = to_iscsi_tpg_np(item); + struct iscsi_np *np; + struct iscsi_portal_group *tpg; + struct iscsi_tpg_np *tpg_np_hw_offload = NULL; + u32 op; + int rc = 0; + + rc = kstrtou32(page, 0, &op); + if (rc) + return rc; + + if ((op != 1) && (op != 0)) { + pr_err("Illegal value for tpg_enable: %u\n", op); + return -EINVAL; + } + + np = tpg_np->tpg_np; + if (!np) { + pr_err("Unable to locate struct iscsi_np from" + " struct iscsi_tpg_np\n"); + return -EINVAL; + } + + tpg = tpg_np->tpg; + if (iscsit_get_tpg(tpg) < 0) + return -EINVAL; + + if (op) { + tpg_np_hw_offload = iscsit_tpg_add_network_portal(tpg, + &np->np_sockaddr, tpg_np, ISCSI_HW_OFFLOAD); + + if (IS_ERR(tpg_np_hw_offload)) { + rc = PTR_ERR(tpg_np_hw_offload); + goto out; + } + } else { + tpg_np_hw_offload = iscsit_tpg_locate_child_np(tpg_np, + ISCSI_HW_OFFLOAD); + + if (tpg_np_hw_offload) { + rc = iscsit_tpg_del_network_portal(tpg, + tpg_np_hw_offload); + if (rc < 0) + goto out; + } + } + + iscsit_put_tpg(tpg); + return count; +out: + iscsit_put_tpg(tpg); + return rc; +} + CONFIGFS_ATTR(lio_target_np_, sctp); CONFIGFS_ATTR(lio_target_np_, iser); +CONFIGFS_ATTR(lio_target_np_, hw_offload); static struct configfs_attribute *lio_target_portal_attrs[] = { &lio_target_np_attr_sctp, &lio_target_np_attr_iser, + &lio_target_np_attr_hw_offload, NULL, }; diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h index 01c41f2b66d1..110c1fde7c68 100644 --- a/include/target/iscsi/iscsi_target_core.h +++ b/include/target/iscsi/iscsi_target_core.h @@ -74,6 +74,7 @@ enum iscsit_transport_type { ISCSI_IWARP_TCP = 3, ISCSI_IWARP_SCTP = 4, ISCSI_INFINIBAND = 5, + ISCSI_HW_OFFLOAD = 6, }; /* RFC-3720 7.1.4 Standard Connection State Diagram for a Target */ -- cgit v1.2.3 From d2faaefb8d4c63fbc680512b04f9eb57667e2682 Mon Sep 17 00:00:00 2001 From: Varun Prakash Date: Wed, 20 Apr 2016 00:00:19 +0530 Subject: iscsi-target: export symbols export symbols for ISCSI_HW_OFFLOAD transport drivers. Signed-off-by: Varun Prakash Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target.c | 25 ++++++++++------- drivers/target/iscsi/iscsi_target_datain_values.c | 1 + drivers/target/iscsi/iscsi_target_login.c | 3 ++- drivers/target/iscsi/iscsi_target_nego.c | 1 + drivers/target/iscsi/iscsi_target_parameters.c | 1 + drivers/target/iscsi/iscsi_target_util.c | 2 ++ include/target/iscsi/iscsi_transport.h | 33 +++++++++++++++++++++++ 7 files changed, 56 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 8021223ca288..487d8f37b23a 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -478,17 +478,16 @@ int iscsit_del_np(struct iscsi_np *np) return 0; } -static int iscsit_immediate_queue(struct iscsi_conn *, struct iscsi_cmd *, int); -static int iscsit_response_queue(struct iscsi_conn *, struct iscsi_cmd *, int); static void iscsit_get_rx_pdu(struct iscsi_conn *); -static int iscsit_queue_rsp(struct iscsi_conn *conn, struct iscsi_cmd *cmd) +int iscsit_queue_rsp(struct iscsi_conn *conn, struct iscsi_cmd *cmd) { iscsit_add_cmd_to_response_queue(cmd, cmd->conn, cmd->i_state); return 0; } +EXPORT_SYMBOL(iscsit_queue_rsp); -static void iscsit_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd) +void iscsit_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd) { bool scsi_cmd = (cmd->iscsi_opcode == ISCSI_OP_SCSI_CMD); @@ -499,6 +498,7 @@ static void iscsit_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd) __iscsit_free_cmd(cmd, scsi_cmd, true); } +EXPORT_SYMBOL(iscsit_aborted_task); static void iscsit_do_crypto_hash_buf(struct ahash_request *, const void *, u32, u32, u8 *, u8 *); @@ -799,7 +799,7 @@ static void __exit iscsi_target_cleanup_module(void) kfree(iscsit_global); } -static int iscsit_add_reject( +int iscsit_add_reject( struct iscsi_conn *conn, u8 reason, unsigned char *buf) @@ -829,6 +829,7 @@ static int iscsit_add_reject( return -1; } +EXPORT_SYMBOL(iscsit_add_reject); static int iscsit_add_reject_from_cmd( struct iscsi_cmd *cmd, @@ -884,6 +885,7 @@ int iscsit_reject_cmd(struct iscsi_cmd *cmd, u8 reason, unsigned char *buf) { return iscsit_add_reject_from_cmd(cmd, reason, false, buf); } +EXPORT_SYMBOL(iscsit_reject_cmd); /* * Map some portion of the allocated scatterlist to an iovec, suitable for @@ -2500,7 +2502,7 @@ iscsit_handle_logout_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd, } EXPORT_SYMBOL(iscsit_handle_logout_cmd); -static int iscsit_handle_snack( +int iscsit_handle_snack( struct iscsi_conn *conn, unsigned char *buf) { @@ -2553,6 +2555,7 @@ static int iscsit_handle_snack( return 0; } +EXPORT_SYMBOL(iscsit_handle_snack); static void iscsit_rx_thread_wait_for_tcp(struct iscsi_conn *conn) { @@ -2733,7 +2736,7 @@ static void iscsit_tx_thread_wait_for_tcp(struct iscsi_conn *conn) } } -static void +void iscsit_build_datain_pdu(struct iscsi_cmd *cmd, struct iscsi_conn *conn, struct iscsi_datain *datain, struct iscsi_data_rsp *hdr, bool set_statsn) @@ -2777,6 +2780,7 @@ iscsit_build_datain_pdu(struct iscsi_cmd *cmd, struct iscsi_conn *conn, cmd->init_task_tag, ntohl(hdr->statsn), ntohl(hdr->datasn), ntohl(hdr->offset), datain->length, conn->cid); } +EXPORT_SYMBOL(iscsit_build_datain_pdu); static int iscsit_send_datain(struct iscsi_cmd *cmd, struct iscsi_conn *conn) { @@ -3153,6 +3157,7 @@ int iscsit_build_r2ts_for_cmd( return 0; } +EXPORT_SYMBOL(iscsit_build_r2ts_for_cmd); void iscsit_build_rsp_pdu(struct iscsi_cmd *cmd, struct iscsi_conn *conn, bool inc_stat_sn, struct iscsi_scsi_rsp *hdr) @@ -3581,7 +3586,7 @@ void iscsit_thread_get_cpumask(struct iscsi_conn *conn) cpumask_setall(conn->conn_cpumask); } -static int +int iscsit_immediate_queue(struct iscsi_conn *conn, struct iscsi_cmd *cmd, int state) { int ret; @@ -3623,6 +3628,7 @@ iscsit_immediate_queue(struct iscsi_conn *conn, struct iscsi_cmd *cmd, int state err: return -1; } +EXPORT_SYMBOL(iscsit_immediate_queue); static int iscsit_handle_immediate_queue(struct iscsi_conn *conn) @@ -3647,7 +3653,7 @@ iscsit_handle_immediate_queue(struct iscsi_conn *conn) return 0; } -static int +int iscsit_response_queue(struct iscsi_conn *conn, struct iscsi_cmd *cmd, int state) { int ret; @@ -3752,6 +3758,7 @@ check_rsp_state: err: return -1; } +EXPORT_SYMBOL(iscsit_response_queue); static int iscsit_handle_response_queue(struct iscsi_conn *conn) { diff --git a/drivers/target/iscsi/iscsi_target_datain_values.c b/drivers/target/iscsi/iscsi_target_datain_values.c index fb3b52b124ac..647d4a5dca52 100644 --- a/drivers/target/iscsi/iscsi_target_datain_values.c +++ b/drivers/target/iscsi/iscsi_target_datain_values.c @@ -524,3 +524,4 @@ struct iscsi_datain_req *iscsit_get_datain_values( return NULL; } +EXPORT_SYMBOL(iscsit_get_datain_values); diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index 83574eea0be7..a09498f16690 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -258,7 +258,7 @@ static void iscsi_login_set_conn_values( mutex_unlock(&auth_id_lock); } -static __printf(2, 3) int iscsi_change_param_sprintf( +__printf(2, 3) int iscsi_change_param_sprintf( struct iscsi_conn *conn, const char *fmt, ...) { @@ -279,6 +279,7 @@ static __printf(2, 3) int iscsi_change_param_sprintf( return 0; } +EXPORT_SYMBOL(iscsi_change_param_sprintf); /* * This is the leading connection of a new session, diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 9fc9117d0f22..ca061320f5eb 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -269,6 +269,7 @@ int iscsi_target_check_login_request( return 0; } +EXPORT_SYMBOL(iscsi_target_check_login_request); static int iscsi_target_check_first_request( struct iscsi_conn *conn, diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c index 3a1f9a7e6bb6..0efa80bb8962 100644 --- a/drivers/target/iscsi/iscsi_target_parameters.c +++ b/drivers/target/iscsi/iscsi_target_parameters.c @@ -680,6 +680,7 @@ struct iscsi_param *iscsi_find_param_from_key( pr_err("Unable to locate key \"%s\".\n", key); return NULL; } +EXPORT_SYMBOL(iscsi_find_param_from_key); int iscsi_extract_key_value(char *textbuf, char **key, char **value) { diff --git a/drivers/target/iscsi/iscsi_target_util.c b/drivers/target/iscsi/iscsi_target_util.c index a5330171ebe5..43e176f1048e 100644 --- a/drivers/target/iscsi/iscsi_target_util.c +++ b/drivers/target/iscsi/iscsi_target_util.c @@ -514,6 +514,7 @@ void iscsit_add_cmd_to_immediate_queue( wake_up(&conn->queues_wq); } +EXPORT_SYMBOL(iscsit_add_cmd_to_immediate_queue); struct iscsi_queue_req *iscsit_get_cmd_from_immediate_queue(struct iscsi_conn *conn) { @@ -776,6 +777,7 @@ void iscsit_free_cmd(struct iscsi_cmd *cmd, bool shutdown) break; } } +EXPORT_SYMBOL(iscsit_free_cmd); int iscsit_check_session_usage_count(struct iscsi_session *sess) { diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 32704b214be5..3c2e10aac49c 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h @@ -84,6 +84,18 @@ extern void iscsit_build_reject(struct iscsi_cmd *, struct iscsi_conn *, extern int iscsit_build_logout_rsp(struct iscsi_cmd *, struct iscsi_conn *, struct iscsi_logout_rsp *); extern int iscsit_logout_post_handler(struct iscsi_cmd *, struct iscsi_conn *); +extern int iscsit_queue_rsp(struct iscsi_conn *, struct iscsi_cmd *); +extern void iscsit_aborted_task(struct iscsi_conn *, struct iscsi_cmd *); +extern int iscsit_add_reject(struct iscsi_conn *, u8, unsigned char *); +extern int iscsit_reject_cmd(struct iscsi_cmd *, u8, unsigned char *); +extern int iscsit_handle_snack(struct iscsi_conn *, unsigned char *); +extern void iscsit_build_datain_pdu(struct iscsi_cmd *, struct iscsi_conn *, + struct iscsi_datain *, + struct iscsi_data_rsp *, bool); +extern int iscsit_build_r2ts_for_cmd(struct iscsi_conn *, struct iscsi_cmd *, + bool); +extern int iscsit_immediate_queue(struct iscsi_conn *, struct iscsi_cmd *, int); +extern int iscsit_response_queue(struct iscsi_conn *, struct iscsi_cmd *, int); /* * From iscsi_target_device.c */ @@ -109,3 +121,24 @@ extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, int); extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *, unsigned char *, __be32); extern void iscsit_release_cmd(struct iscsi_cmd *); +extern void iscsit_free_cmd(struct iscsi_cmd *, bool); +extern void iscsit_add_cmd_to_immediate_queue(struct iscsi_cmd *, + struct iscsi_conn *, u8); + +/* + * From iscsi_target_nego.c + */ +extern int iscsi_target_check_login_request(struct iscsi_conn *, + struct iscsi_login *); + +/* + * From iscsi_target_login.c + */ +extern __printf(2, 3) int iscsi_change_param_sprintf( + struct iscsi_conn *, const char *, ...); + +/* + * From iscsi_target_parameters.c + */ +extern struct iscsi_param *iscsi_find_param_from_key( + char *, struct iscsi_param_list *); -- cgit v1.2.3 From fba81f8831b20272a97a990e5d47c332e9b1f65d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 2 May 2016 15:45:20 +0200 Subject: target: remove acl_stop Ensure we can use list_empty on the sess_acl_list to remove the need for this flag. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_tpg.c | 13 +++++-------- drivers/target/target_core_transport.c | 4 ++-- include/target/target_core_base.h | 1 - 3 files changed, 7 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index 88db4938600b..b1ac600f5b45 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -336,30 +336,27 @@ struct se_node_acl *core_tpg_add_initiator_node_acl( return acl; } -static void target_shutdown_sessions(struct se_node_acl *acl, bool acl_stop) +static void target_shutdown_sessions(struct se_node_acl *acl) { struct se_session *sess; unsigned long flags; int ret; - spin_lock_irqsave(&acl->nacl_sess_lock, flags); - if (acl_stop) - acl->acl_stop = 1; restart: + spin_lock_irqsave(&acl->nacl_sess_lock, flags); list_for_each_entry(sess, &acl->acl_sess_list, sess_acl_list) { if (sess->sess_tearing_down) continue; if (!target_get_session(sess)) continue; - list_del(&sess->sess_acl_list); + list_del_init(&sess->sess_acl_list); spin_unlock_irqrestore(&acl->nacl_sess_lock, flags); ret = acl->se_tpg->se_tpg_tfo->shutdown_session(sess); target_put_session(sess); if (ret) target_put_session(sess); - spin_lock_irqsave(&acl->nacl_sess_lock, flags); goto restart; } spin_unlock_irqrestore(&acl->nacl_sess_lock, flags); @@ -375,7 +372,7 @@ void core_tpg_del_initiator_node_acl(struct se_node_acl *acl) list_del(&acl->acl_list); mutex_unlock(&tpg->acl_node_mutex); - target_shutdown_sessions(acl, true); + target_shutdown_sessions(acl); target_put_nacl(acl); /* @@ -415,7 +412,7 @@ int core_tpg_set_initiator_node_queue_depth( /* * Shutdown all pending sessions to force session reinstatement. */ - target_shutdown_sessions(acl, false); + target_shutdown_sessions(acl); pr_debug("Successfully changed queue depth to: %d for Initiator" " Node: %s on %s Target Portal Group: %u\n", acl->queue_depth, diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index ab2bf12975e1..ccd3a0eda0c8 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -499,8 +499,8 @@ void transport_deregister_session_configfs(struct se_session *se_sess) se_nacl = se_sess->se_node_acl; if (se_nacl) { spin_lock_irqsave(&se_nacl->nacl_sess_lock, flags); - if (se_nacl->acl_stop == 0) - list_del(&se_sess->sess_acl_list); + if (!list_empty(&se_sess->sess_acl_list)) + list_del_init(&se_sess->sess_acl_list); /* * If the session list is empty, then clear the pointer. * Otherwise, set the struct se_session pointer from the tail diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 3e0dd86360a2..1d4e1cb7f373 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -536,7 +536,6 @@ struct se_node_acl { char initiatorname[TRANSPORT_IQN_LEN]; /* Used to signal demo mode created ACL, disabled by default */ bool dynamic_node_acl; - bool acl_stop:1; u32 queue_depth; u32 acl_index; enum target_prot_type saved_prot_type; -- cgit v1.2.3 From d94331fab6d4d48280a5cea646352db90777966d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 2 May 2016 15:45:25 +0200 Subject: target: remove sess_kref and ->shutdown_session Both of them are unused now that drivers handle any delayed session shutdown internally. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_tpg.c | 14 +++----------- drivers/target/target_core_transport.c | 23 ----------------------- include/target/target_core_base.h | 1 - include/target/target_core_fabric.h | 6 ------ 4 files changed, 3 insertions(+), 41 deletions(-) (limited to 'include') diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index a81a37045403..d99752c6cd60 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -340,26 +340,18 @@ static void target_shutdown_sessions(struct se_node_acl *acl) { struct se_session *sess; unsigned long flags; - int ret; restart: spin_lock_irqsave(&acl->nacl_sess_lock, flags); list_for_each_entry(sess, &acl->acl_sess_list, sess_acl_list) { if (sess->sess_tearing_down) continue; - if (!target_get_session(sess)) - continue; list_del_init(&sess->sess_acl_list); - spin_unlock_irqrestore(&acl->nacl_sess_lock, flags); - if (acl->se_tpg->se_tpg_tfo->shutdown_session) - ret = acl->se_tpg->se_tpg_tfo->shutdown_session(sess); - else - ret = 1; - target_put_session(sess); - if (ret) - target_put_session(sess); + + if (acl->se_tpg->se_tpg_tfo->close_session) + acl->se_tpg->se_tpg_tfo->close_session(sess); goto restart; } spin_unlock_irqrestore(&acl->nacl_sess_lock, flags); diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 2914d4c68fea..6c089afe553a 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -239,7 +239,6 @@ struct se_session *transport_init_session(enum target_prot_op sup_prot_ops) INIT_LIST_HEAD(&se_sess->sess_cmd_list); INIT_LIST_HEAD(&se_sess->sess_wait_list); spin_lock_init(&se_sess->sess_cmd_lock); - kref_init(&se_sess->sess_kref); se_sess->sup_prot_ops = sup_prot_ops; return se_sess; @@ -430,28 +429,6 @@ target_alloc_session(struct se_portal_group *tpg, } EXPORT_SYMBOL(target_alloc_session); -static void target_release_session(struct kref *kref) -{ - struct se_session *se_sess = container_of(kref, - struct se_session, sess_kref); - struct se_portal_group *se_tpg = se_sess->se_tpg; - - if (se_tpg->se_tpg_tfo->close_session) - se_tpg->se_tpg_tfo->close_session(se_sess); -} - -int target_get_session(struct se_session *se_sess) -{ - return kref_get_unless_zero(&se_sess->sess_kref); -} -EXPORT_SYMBOL(target_get_session); - -void target_put_session(struct se_session *se_sess) -{ - kref_put(&se_sess->sess_kref, target_release_session); -} -EXPORT_SYMBOL(target_put_session); - ssize_t target_show_dynamic_sessions(struct se_portal_group *se_tpg, char *page) { struct se_session *se_sess; diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 1d4e1cb7f373..b316b44d03f3 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -602,7 +602,6 @@ struct se_session { struct list_head sess_cmd_list; struct list_head sess_wait_list; spinlock_t sess_cmd_lock; - struct kref sess_kref; void *sess_cmd_map; struct percpu_ida sess_tag_pool; }; diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 8ff6d40a294f..ec79da3b43df 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h @@ -50,10 +50,6 @@ struct target_core_fabric_ops { */ int (*check_stop_free)(struct se_cmd *); void (*release_cmd)(struct se_cmd *); - /* - * Called with spin_lock_bh(struct se_portal_group->session_lock held. - */ - int (*shutdown_session)(struct se_session *); void (*close_session)(struct se_session *); u32 (*sess_get_index)(struct se_session *); /* @@ -123,8 +119,6 @@ void __transport_register_session(struct se_portal_group *, struct se_node_acl *, struct se_session *, void *); void transport_register_session(struct se_portal_group *, struct se_node_acl *, struct se_session *, void *); -int target_get_session(struct se_session *); -void target_put_session(struct se_session *); ssize_t target_show_dynamic_sessions(struct se_portal_group *, char *); void transport_free_session(struct se_session *); void target_put_nacl(struct se_node_acl *); -- cgit v1.2.3 From bd027d856d3d7260017d0dc932201ce5fd7561f9 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sat, 14 May 2016 22:23:34 -0700 Subject: iscsi-target: Convert transport drivers to signal rdma_shutdown Instead of special casing the handful of callers that check for iser-target rdma verbs specific shutdown, use a simple flag at iscsit_transport->rdma_shutdown so each driver can signal this. Also, update iscsi-target/tcp + cxgbit to rdma_shutdown = false. Cc: Varun Prakash Cc: Hariprasad Shenai Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- drivers/infiniband/ulp/isert/ib_isert.c | 1 + drivers/target/iscsi/cxgbit/cxgbit_main.c | 1 + drivers/target/iscsi/iscsi_target.c | 10 ++++------ include/target/iscsi/iscsi_transport.h | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 9118d7c04a71..eb32ba535434 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -3285,6 +3285,7 @@ static void isert_get_rx_pdu(struct iscsi_conn *conn) static struct iscsit_transport iser_target_transport = { .name = "IB/iSER", .transport_type = ISCSI_INFINIBAND, + .rdma_shutdown = true, .priv_size = sizeof(struct isert_cmd), .owner = THIS_MODULE, .iscsit_setup_np = isert_setup_np, diff --git a/drivers/target/iscsi/cxgbit/cxgbit_main.c b/drivers/target/iscsi/cxgbit/cxgbit_main.c index 39162987d009..c25f5313322c 100644 --- a/drivers/target/iscsi/cxgbit/cxgbit_main.c +++ b/drivers/target/iscsi/cxgbit/cxgbit_main.c @@ -625,6 +625,7 @@ static enum target_prot_op cxgbit_get_sup_prot_ops(struct iscsi_conn *conn) static struct iscsit_transport cxgbit_transport = { .name = DRV_NAME, .transport_type = ISCSI_HW_OFFLOAD, + .rdma_shutdown = false, .priv_size = sizeof(struct cxgbit_cmd), .owner = THIS_MODULE, .iscsit_setup_np = cxgbit_setup_np, diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index bc743d2a71a2..50f3d3a0dd7b 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -670,6 +670,7 @@ static enum target_prot_op iscsit_get_sup_prot_ops(struct iscsi_conn *conn) static struct iscsit_transport iscsi_target_transport = { .name = "iSCSI/TCP", .transport_type = ISCSI_TCP, + .rdma_shutdown = false, .owner = NULL, .iscsit_setup_np = iscsit_setup_np, .iscsit_accept_np = iscsit_accept_np, @@ -4087,8 +4088,7 @@ int iscsit_close_connection( * this for iser since isert_rx_opcode() does not wait on logout failure, * and to avoid iscsi_conn pointer dereference in iser-target code. */ - if ((conn->conn_transport->transport_type == ISCSI_TCP) || - (conn->conn_transport->transport_type == ISCSI_HW_OFFLOAD)) + if (!conn->conn_transport->rdma_shutdown) complete(&conn->conn_logout_comp); if (!strcmp(current->comm, ISCSI_RX_THREAD_NAME)) { @@ -4399,8 +4399,7 @@ static void iscsit_logout_post_handler_closesession( * always sleep waiting for RX/TX thread shutdown to complete * within iscsit_close_connection(). */ - if ((conn->conn_transport->transport_type == ISCSI_TCP) || - (conn->conn_transport->transport_type == ISCSI_HW_OFFLOAD)) + if (!conn->conn_transport->rdma_shutdown) sleep = cmpxchg(&conn->tx_thread_active, true, false); atomic_set(&conn->conn_logout_remove, 0); @@ -4417,8 +4416,7 @@ static void iscsit_logout_post_handler_samecid( { int sleep = 1; - if ((conn->conn_transport->transport_type == ISCSI_TCP) || - (conn->conn_transport->transport_type == ISCSI_HW_OFFLOAD)) + if (!conn->conn_transport->rdma_shutdown) sleep = cmpxchg(&conn->tx_thread_active, true, false); atomic_set(&conn->conn_logout_remove, 0); diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h index 3c2e10aac49c..40ac7cd80150 100644 --- a/include/target/iscsi/iscsi_transport.h +++ b/include/target/iscsi/iscsi_transport.h @@ -6,6 +6,7 @@ struct iscsit_transport { #define ISCSIT_TRANSPORT_NAME 16 char name[ISCSIT_TRANSPORT_NAME]; int transport_type; + bool rdma_shutdown; int priv_size; struct module *owner; struct list_head t_node; -- cgit v1.2.3 From ff7199b04f08e1a72637ba66cd2c05842dc592d0 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sat, 14 May 2016 22:28:51 -0700 Subject: cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attribute Instead of having cxgbit use type ISCSI_HW_OFFLOAD + 'hw_offload' tpg_np attribute, it should be using it's own driver specific type + attribute Cc: Varun Prakash Cc: Hariprasad Shenai Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/cxgbit/cxgbit_main.c | 2 +- drivers/target/iscsi/iscsi_target_configfs.c | 14 +++++++------- include/target/iscsi/iscsi_target_core.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/drivers/target/iscsi/cxgbit/cxgbit_main.c b/drivers/target/iscsi/cxgbit/cxgbit_main.c index c25f5313322c..60dccd02bd85 100644 --- a/drivers/target/iscsi/cxgbit/cxgbit_main.c +++ b/drivers/target/iscsi/cxgbit/cxgbit_main.c @@ -624,7 +624,7 @@ static enum target_prot_op cxgbit_get_sup_prot_ops(struct iscsi_conn *conn) static struct iscsit_transport cxgbit_transport = { .name = DRV_NAME, - .transport_type = ISCSI_HW_OFFLOAD, + .transport_type = ISCSI_CXGBIT, .rdma_shutdown = false, .priv_size = sizeof(struct cxgbit_cmd), .owner = THIS_MODULE, diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index 33d811ac9539..923c032f0b95 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c @@ -131,22 +131,22 @@ static ssize_t lio_target_np_iser_store(struct config_item *item, } CONFIGFS_ATTR(lio_target_np_, iser); -static ssize_t lio_target_np_hw_offload_show(struct config_item *item, char *page) +static ssize_t lio_target_np_cxgbit_show(struct config_item *item, char *page) { - return lio_target_np_driver_show(item, page, ISCSI_HW_OFFLOAD); + return lio_target_np_driver_show(item, page, ISCSI_CXGBIT); } -static ssize_t lio_target_np_hw_offload_store(struct config_item *item, - const char *page, size_t count) +static ssize_t lio_target_np_cxgbit_store(struct config_item *item, + const char *page, size_t count) { return lio_target_np_driver_store(item, page, count, - ISCSI_HW_OFFLOAD, ""); + ISCSI_CXGBIT, "cxgbit"); } -CONFIGFS_ATTR(lio_target_np_, hw_offload); +CONFIGFS_ATTR(lio_target_np_, cxgbit); static struct configfs_attribute *lio_target_portal_attrs[] = { &lio_target_np_attr_iser, - &lio_target_np_attr_hw_offload, + &lio_target_np_attr_cxgbit, NULL, }; diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h index 110c1fde7c68..4ac24f5a3308 100644 --- a/include/target/iscsi/iscsi_target_core.h +++ b/include/target/iscsi/iscsi_target_core.h @@ -74,7 +74,7 @@ enum iscsit_transport_type { ISCSI_IWARP_TCP = 3, ISCSI_IWARP_SCTP = 4, ISCSI_INFINIBAND = 5, - ISCSI_HW_OFFLOAD = 6, + ISCSI_CXGBIT = 6, }; /* RFC-3720 7.1.4 Standard Connection State Diagram for a Target */ -- cgit v1.2.3