diff options
author | Varun Prakash <varun@chelsio.com> | 2016-04-19 14:30:08 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-05-10 02:12:05 -0400 |
commit | 2854bb23cd5bef39fd845b7bdfac7799438bb920 (patch) | |
tree | 0d33043babaac13a4dde9a11d27cafd68f6c5cfb | |
parent | fdddf932269a75c3dd1c68d82b9a0fbc1821a2a8 (diff) |
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 <varun@chelsio.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 546 | ||||
-rw-r--r-- | include/target/iscsi/iscsi_transport.h | 2 |
2 files changed, 197 insertions, 351 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 961202f4e9aa..0724c8355e29 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -499,6 +499,168 @@ static void iscsit_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd) | |||
499 | __iscsit_free_cmd(cmd, scsi_cmd, true); | 499 | __iscsit_free_cmd(cmd, scsi_cmd, true); |
500 | } | 500 | } |
501 | 501 | ||
502 | static void iscsit_do_crypto_hash_buf(struct ahash_request *, const void *, | ||
503 | u32, u32, u8 *, u8 *); | ||
504 | static void iscsit_tx_thread_wait_for_tcp(struct iscsi_conn *); | ||
505 | |||
506 | static int | ||
507 | iscsit_xmit_nondatain_pdu(struct iscsi_conn *conn, struct iscsi_cmd *cmd, | ||
508 | const void *data_buf, u32 data_buf_len) | ||
509 | { | ||
510 | struct iscsi_hdr *hdr = (struct iscsi_hdr *)cmd->pdu; | ||
511 | struct kvec *iov; | ||
512 | u32 niov = 0, tx_size = ISCSI_HDR_LEN; | ||
513 | int ret; | ||
514 | |||
515 | iov = &cmd->iov_misc[0]; | ||
516 | iov[niov].iov_base = cmd->pdu; | ||
517 | iov[niov++].iov_len = ISCSI_HDR_LEN; | ||
518 | |||
519 | if (conn->conn_ops->HeaderDigest) { | ||
520 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
521 | |||
522 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, | ||
523 | ISCSI_HDR_LEN, 0, NULL, | ||
524 | (u8 *)header_digest); | ||
525 | |||
526 | iov[0].iov_len += ISCSI_CRC_LEN; | ||
527 | tx_size += ISCSI_CRC_LEN; | ||
528 | pr_debug("Attaching CRC32C HeaderDigest" | ||
529 | " to opcode 0x%x 0x%08x\n", | ||
530 | hdr->opcode, *header_digest); | ||
531 | } | ||
532 | |||
533 | if (data_buf_len) { | ||
534 | u32 padding = ((-data_buf_len) & 3); | ||
535 | |||
536 | iov[niov].iov_base = (void *)data_buf; | ||
537 | iov[niov++].iov_len = data_buf_len; | ||
538 | tx_size += data_buf_len; | ||
539 | |||
540 | if (padding != 0) { | ||
541 | iov[niov].iov_base = &cmd->pad_bytes; | ||
542 | iov[niov++].iov_len = padding; | ||
543 | tx_size += padding; | ||
544 | pr_debug("Attaching %u additional" | ||
545 | " padding bytes.\n", padding); | ||
546 | } | ||
547 | |||
548 | if (conn->conn_ops->DataDigest) { | ||
549 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, | ||
550 | data_buf, data_buf_len, | ||
551 | padding, | ||
552 | (u8 *)&cmd->pad_bytes, | ||
553 | (u8 *)&cmd->data_crc); | ||
554 | |||
555 | iov[niov].iov_base = &cmd->data_crc; | ||
556 | iov[niov++].iov_len = ISCSI_CRC_LEN; | ||
557 | tx_size += ISCSI_CRC_LEN; | ||
558 | pr_debug("Attached DataDigest for %u" | ||
559 | " bytes opcode 0x%x, CRC 0x%08x\n", | ||
560 | data_buf_len, hdr->opcode, cmd->data_crc); | ||
561 | } | ||
562 | } | ||
563 | |||
564 | cmd->iov_misc_count = niov; | ||
565 | cmd->tx_size = tx_size; | ||
566 | |||
567 | ret = iscsit_send_tx_data(cmd, conn, 1); | ||
568 | if (ret < 0) { | ||
569 | iscsit_tx_thread_wait_for_tcp(conn); | ||
570 | return ret; | ||
571 | } | ||
572 | |||
573 | return 0; | ||
574 | } | ||
575 | |||
576 | static int iscsit_map_iovec(struct iscsi_cmd *, struct kvec *, u32, u32); | ||
577 | static void iscsit_unmap_iovec(struct iscsi_cmd *); | ||
578 | static u32 iscsit_do_crypto_hash_sg(struct ahash_request *, struct iscsi_cmd *, | ||
579 | u32, u32, u32, u8 *); | ||
580 | static int | ||
581 | iscsit_xmit_datain_pdu(struct iscsi_conn *conn, struct iscsi_cmd *cmd, | ||
582 | const struct iscsi_datain *datain) | ||
583 | { | ||
584 | struct kvec *iov; | ||
585 | u32 iov_count = 0, tx_size = 0; | ||
586 | int ret, iov_ret; | ||
587 | |||
588 | iov = &cmd->iov_data[0]; | ||
589 | iov[iov_count].iov_base = cmd->pdu; | ||
590 | iov[iov_count++].iov_len = ISCSI_HDR_LEN; | ||
591 | tx_size += ISCSI_HDR_LEN; | ||
592 | |||
593 | if (conn->conn_ops->HeaderDigest) { | ||
594 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
595 | |||
596 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, cmd->pdu, | ||
597 | ISCSI_HDR_LEN, 0, NULL, | ||
598 | (u8 *)header_digest); | ||
599 | |||
600 | iov[0].iov_len += ISCSI_CRC_LEN; | ||
601 | tx_size += ISCSI_CRC_LEN; | ||
602 | |||
603 | pr_debug("Attaching CRC32 HeaderDigest for DataIN PDU 0x%08x\n", | ||
604 | *header_digest); | ||
605 | } | ||
606 | |||
607 | iov_ret = iscsit_map_iovec(cmd, &cmd->iov_data[1], | ||
608 | datain->offset, datain->length); | ||
609 | if (iov_ret < 0) | ||
610 | return -1; | ||
611 | |||
612 | iov_count += iov_ret; | ||
613 | tx_size += datain->length; | ||
614 | |||
615 | cmd->padding = ((-datain->length) & 3); | ||
616 | if (cmd->padding) { | ||
617 | iov[iov_count].iov_base = cmd->pad_bytes; | ||
618 | iov[iov_count++].iov_len = cmd->padding; | ||
619 | tx_size += cmd->padding; | ||
620 | |||
621 | pr_debug("Attaching %u padding bytes\n", cmd->padding); | ||
622 | } | ||
623 | |||
624 | if (conn->conn_ops->DataDigest) { | ||
625 | cmd->data_crc = iscsit_do_crypto_hash_sg(conn->conn_tx_hash, | ||
626 | cmd, datain->offset, | ||
627 | datain->length, | ||
628 | cmd->padding, | ||
629 | cmd->pad_bytes); | ||
630 | |||
631 | iov[iov_count].iov_base = &cmd->data_crc; | ||
632 | iov[iov_count++].iov_len = ISCSI_CRC_LEN; | ||
633 | tx_size += ISCSI_CRC_LEN; | ||
634 | |||
635 | pr_debug("Attached CRC32C DataDigest %d bytes, crc 0x%08x\n", | ||
636 | datain->length + cmd->padding, cmd->data_crc); | ||
637 | } | ||
638 | |||
639 | cmd->iov_data_count = iov_count; | ||
640 | cmd->tx_size = tx_size; | ||
641 | |||
642 | ret = iscsit_fe_sendpage_sg(cmd, conn); | ||
643 | |||
644 | iscsit_unmap_iovec(cmd); | ||
645 | |||
646 | if (ret < 0) { | ||
647 | iscsit_tx_thread_wait_for_tcp(conn); | ||
648 | return ret; | ||
649 | } | ||
650 | |||
651 | return 0; | ||
652 | } | ||
653 | |||
654 | static int iscsit_xmit_pdu(struct iscsi_conn *conn, struct iscsi_cmd *cmd, | ||
655 | struct iscsi_datain_req *dr, const void *buf, | ||
656 | u32 buf_len) | ||
657 | { | ||
658 | if (dr) | ||
659 | return iscsit_xmit_datain_pdu(conn, cmd, buf); | ||
660 | else | ||
661 | return iscsit_xmit_nondatain_pdu(conn, cmd, buf, buf_len); | ||
662 | } | ||
663 | |||
502 | static enum target_prot_op iscsit_get_sup_prot_ops(struct iscsi_conn *conn) | 664 | static enum target_prot_op iscsit_get_sup_prot_ops(struct iscsi_conn *conn) |
503 | { | 665 | { |
504 | return TARGET_PROT_NORMAL; | 666 | return TARGET_PROT_NORMAL; |
@@ -519,6 +681,7 @@ static struct iscsit_transport iscsi_target_transport = { | |||
519 | .iscsit_queue_data_in = iscsit_queue_rsp, | 681 | .iscsit_queue_data_in = iscsit_queue_rsp, |
520 | .iscsit_queue_status = iscsit_queue_rsp, | 682 | .iscsit_queue_status = iscsit_queue_rsp, |
521 | .iscsit_aborted_task = iscsit_aborted_task, | 683 | .iscsit_aborted_task = iscsit_aborted_task, |
684 | .iscsit_xmit_pdu = iscsit_xmit_pdu, | ||
522 | .iscsit_get_sup_prot_ops = iscsit_get_sup_prot_ops, | 685 | .iscsit_get_sup_prot_ops = iscsit_get_sup_prot_ops, |
523 | }; | 686 | }; |
524 | 687 | ||
@@ -2534,7 +2697,6 @@ static int iscsit_send_conn_drop_async_message( | |||
2534 | { | 2697 | { |
2535 | struct iscsi_async *hdr; | 2698 | struct iscsi_async *hdr; |
2536 | 2699 | ||
2537 | cmd->tx_size = ISCSI_HDR_LEN; | ||
2538 | cmd->iscsi_opcode = ISCSI_OP_ASYNC_EVENT; | 2700 | cmd->iscsi_opcode = ISCSI_OP_ASYNC_EVENT; |
2539 | 2701 | ||
2540 | hdr = (struct iscsi_async *) cmd->pdu; | 2702 | hdr = (struct iscsi_async *) cmd->pdu; |
@@ -2552,25 +2714,11 @@ static int iscsit_send_conn_drop_async_message( | |||
2552 | hdr->param2 = cpu_to_be16(conn->sess->sess_ops->DefaultTime2Wait); | 2714 | hdr->param2 = cpu_to_be16(conn->sess->sess_ops->DefaultTime2Wait); |
2553 | hdr->param3 = cpu_to_be16(conn->sess->sess_ops->DefaultTime2Retain); | 2715 | hdr->param3 = cpu_to_be16(conn->sess->sess_ops->DefaultTime2Retain); |
2554 | 2716 | ||
2555 | if (conn->conn_ops->HeaderDigest) { | ||
2556 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
2557 | |||
2558 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, | ||
2559 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
2560 | |||
2561 | cmd->tx_size += ISCSI_CRC_LEN; | ||
2562 | pr_debug("Attaching CRC32C HeaderDigest to" | ||
2563 | " Async Message 0x%08x\n", *header_digest); | ||
2564 | } | ||
2565 | |||
2566 | cmd->iov_misc[0].iov_base = cmd->pdu; | ||
2567 | cmd->iov_misc[0].iov_len = cmd->tx_size; | ||
2568 | cmd->iov_misc_count = 1; | ||
2569 | |||
2570 | pr_debug("Sending Connection Dropped Async Message StatSN:" | 2717 | pr_debug("Sending Connection Dropped Async Message StatSN:" |
2571 | " 0x%08x, for CID: %hu on CID: %hu\n", cmd->stat_sn, | 2718 | " 0x%08x, for CID: %hu on CID: %hu\n", cmd->stat_sn, |
2572 | cmd->logout_cid, conn->cid); | 2719 | cmd->logout_cid, conn->cid); |
2573 | return 0; | 2720 | |
2721 | return conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, NULL, 0); | ||
2574 | } | 2722 | } |
2575 | 2723 | ||
2576 | static void iscsit_tx_thread_wait_for_tcp(struct iscsi_conn *conn) | 2724 | static void iscsit_tx_thread_wait_for_tcp(struct iscsi_conn *conn) |
@@ -2633,9 +2781,7 @@ static int iscsit_send_datain(struct iscsi_cmd *cmd, struct iscsi_conn *conn) | |||
2633 | struct iscsi_data_rsp *hdr = (struct iscsi_data_rsp *)&cmd->pdu[0]; | 2781 | struct iscsi_data_rsp *hdr = (struct iscsi_data_rsp *)&cmd->pdu[0]; |
2634 | struct iscsi_datain datain; | 2782 | struct iscsi_datain datain; |
2635 | struct iscsi_datain_req *dr; | 2783 | struct iscsi_datain_req *dr; |
2636 | struct kvec *iov; | 2784 | int eodr = 0, ret; |
2637 | u32 iov_count = 0, tx_size = 0; | ||
2638 | int eodr = 0, ret, iov_ret; | ||
2639 | bool set_statsn = false; | 2785 | bool set_statsn = false; |
2640 | 2786 | ||
2641 | memset(&datain, 0, sizeof(struct iscsi_datain)); | 2787 | memset(&datain, 0, sizeof(struct iscsi_datain)); |
@@ -2677,64 +2823,9 @@ static int iscsit_send_datain(struct iscsi_cmd *cmd, struct iscsi_conn *conn) | |||
2677 | 2823 | ||
2678 | iscsit_build_datain_pdu(cmd, conn, &datain, hdr, set_statsn); | 2824 | iscsit_build_datain_pdu(cmd, conn, &datain, hdr, set_statsn); |
2679 | 2825 | ||
2680 | iov = &cmd->iov_data[0]; | 2826 | ret = conn->conn_transport->iscsit_xmit_pdu(conn, cmd, dr, &datain, 0); |
2681 | iov[iov_count].iov_base = cmd->pdu; | 2827 | if (ret < 0) |
2682 | iov[iov_count++].iov_len = ISCSI_HDR_LEN; | ||
2683 | tx_size += ISCSI_HDR_LEN; | ||
2684 | |||
2685 | if (conn->conn_ops->HeaderDigest) { | ||
2686 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
2687 | |||
2688 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, cmd->pdu, | ||
2689 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
2690 | |||
2691 | iov[0].iov_len += ISCSI_CRC_LEN; | ||
2692 | tx_size += ISCSI_CRC_LEN; | ||
2693 | |||
2694 | pr_debug("Attaching CRC32 HeaderDigest" | ||
2695 | " for DataIN PDU 0x%08x\n", *header_digest); | ||
2696 | } | ||
2697 | |||
2698 | iov_ret = iscsit_map_iovec(cmd, &cmd->iov_data[1], | ||
2699 | datain.offset, datain.length); | ||
2700 | if (iov_ret < 0) | ||
2701 | return -1; | ||
2702 | |||
2703 | iov_count += iov_ret; | ||
2704 | tx_size += datain.length; | ||
2705 | |||
2706 | cmd->padding = ((-datain.length) & 3); | ||
2707 | if (cmd->padding) { | ||
2708 | iov[iov_count].iov_base = cmd->pad_bytes; | ||
2709 | iov[iov_count++].iov_len = cmd->padding; | ||
2710 | tx_size += cmd->padding; | ||
2711 | |||
2712 | pr_debug("Attaching %u padding bytes\n", | ||
2713 | cmd->padding); | ||
2714 | } | ||
2715 | if (conn->conn_ops->DataDigest) { | ||
2716 | cmd->data_crc = iscsit_do_crypto_hash_sg(conn->conn_tx_hash, cmd, | ||
2717 | datain.offset, datain.length, cmd->padding, cmd->pad_bytes); | ||
2718 | |||
2719 | iov[iov_count].iov_base = &cmd->data_crc; | ||
2720 | iov[iov_count++].iov_len = ISCSI_CRC_LEN; | ||
2721 | tx_size += ISCSI_CRC_LEN; | ||
2722 | |||
2723 | pr_debug("Attached CRC32C DataDigest %d bytes, crc" | ||
2724 | " 0x%08x\n", datain.length+cmd->padding, cmd->data_crc); | ||
2725 | } | ||
2726 | |||
2727 | cmd->iov_data_count = iov_count; | ||
2728 | cmd->tx_size = tx_size; | ||
2729 | |||
2730 | ret = iscsit_fe_sendpage_sg(cmd, conn); | ||
2731 | |||
2732 | iscsit_unmap_iovec(cmd); | ||
2733 | |||
2734 | if (ret < 0) { | ||
2735 | iscsit_tx_thread_wait_for_tcp(conn); | ||
2736 | return ret; | 2828 | return ret; |
2737 | } | ||
2738 | 2829 | ||
2739 | if (dr->dr_complete) { | 2830 | if (dr->dr_complete) { |
2740 | eodr = (cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) ? | 2831 | eodr = (cmd->se_cmd.se_cmd_flags & SCF_TRANSPORT_TASK_SENSE) ? |
@@ -2843,34 +2934,14 @@ EXPORT_SYMBOL(iscsit_build_logout_rsp); | |||
2843 | static int | 2934 | static int |
2844 | iscsit_send_logout(struct iscsi_cmd *cmd, struct iscsi_conn *conn) | 2935 | iscsit_send_logout(struct iscsi_cmd *cmd, struct iscsi_conn *conn) |
2845 | { | 2936 | { |
2846 | struct kvec *iov; | 2937 | int rc; |
2847 | int niov = 0, tx_size, rc; | ||
2848 | 2938 | ||
2849 | rc = iscsit_build_logout_rsp(cmd, conn, | 2939 | rc = iscsit_build_logout_rsp(cmd, conn, |
2850 | (struct iscsi_logout_rsp *)&cmd->pdu[0]); | 2940 | (struct iscsi_logout_rsp *)&cmd->pdu[0]); |
2851 | if (rc < 0) | 2941 | if (rc < 0) |
2852 | return rc; | 2942 | return rc; |
2853 | 2943 | ||
2854 | tx_size = ISCSI_HDR_LEN; | 2944 | return conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, NULL, 0); |
2855 | iov = &cmd->iov_misc[0]; | ||
2856 | iov[niov].iov_base = cmd->pdu; | ||
2857 | iov[niov++].iov_len = ISCSI_HDR_LEN; | ||
2858 | |||
2859 | if (conn->conn_ops->HeaderDigest) { | ||
2860 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
2861 | |||
2862 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, &cmd->pdu[0], | ||
2863 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
2864 | |||
2865 | iov[0].iov_len += ISCSI_CRC_LEN; | ||
2866 | tx_size += ISCSI_CRC_LEN; | ||
2867 | pr_debug("Attaching CRC32C HeaderDigest to" | ||
2868 | " Logout Response 0x%08x\n", *header_digest); | ||
2869 | } | ||
2870 | cmd->iov_misc_count = niov; | ||
2871 | cmd->tx_size = tx_size; | ||
2872 | |||
2873 | return 0; | ||
2874 | } | 2945 | } |
2875 | 2946 | ||
2876 | void | 2947 | void |
@@ -2910,34 +2981,16 @@ static int iscsit_send_unsolicited_nopin( | |||
2910 | int want_response) | 2981 | int want_response) |
2911 | { | 2982 | { |
2912 | struct iscsi_nopin *hdr = (struct iscsi_nopin *)&cmd->pdu[0]; | 2983 | struct iscsi_nopin *hdr = (struct iscsi_nopin *)&cmd->pdu[0]; |
2913 | int tx_size = ISCSI_HDR_LEN, ret; | 2984 | int ret; |
2914 | 2985 | ||
2915 | iscsit_build_nopin_rsp(cmd, conn, hdr, false); | 2986 | iscsit_build_nopin_rsp(cmd, conn, hdr, false); |
2916 | 2987 | ||
2917 | if (conn->conn_ops->HeaderDigest) { | ||
2918 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
2919 | |||
2920 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, | ||
2921 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
2922 | |||
2923 | tx_size += ISCSI_CRC_LEN; | ||
2924 | pr_debug("Attaching CRC32C HeaderDigest to" | ||
2925 | " NopIN 0x%08x\n", *header_digest); | ||
2926 | } | ||
2927 | |||
2928 | cmd->iov_misc[0].iov_base = cmd->pdu; | ||
2929 | cmd->iov_misc[0].iov_len = tx_size; | ||
2930 | cmd->iov_misc_count = 1; | ||
2931 | cmd->tx_size = tx_size; | ||
2932 | |||
2933 | pr_debug("Sending Unsolicited NOPIN TTT: 0x%08x StatSN:" | 2988 | pr_debug("Sending Unsolicited NOPIN TTT: 0x%08x StatSN:" |
2934 | " 0x%08x CID: %hu\n", hdr->ttt, cmd->stat_sn, conn->cid); | 2989 | " 0x%08x CID: %hu\n", hdr->ttt, cmd->stat_sn, conn->cid); |
2935 | 2990 | ||
2936 | ret = iscsit_send_tx_data(cmd, conn, 1); | 2991 | ret = conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, NULL, 0); |
2937 | if (ret < 0) { | 2992 | if (ret < 0) |
2938 | iscsit_tx_thread_wait_for_tcp(conn); | ||
2939 | return ret; | 2993 | return ret; |
2940 | } | ||
2941 | 2994 | ||
2942 | spin_lock_bh(&cmd->istate_lock); | 2995 | spin_lock_bh(&cmd->istate_lock); |
2943 | cmd->i_state = want_response ? | 2996 | cmd->i_state = want_response ? |
@@ -2951,75 +3004,24 @@ static int | |||
2951 | iscsit_send_nopin(struct iscsi_cmd *cmd, struct iscsi_conn *conn) | 3004 | iscsit_send_nopin(struct iscsi_cmd *cmd, struct iscsi_conn *conn) |
2952 | { | 3005 | { |
2953 | struct iscsi_nopin *hdr = (struct iscsi_nopin *)&cmd->pdu[0]; | 3006 | struct iscsi_nopin *hdr = (struct iscsi_nopin *)&cmd->pdu[0]; |
2954 | struct kvec *iov; | ||
2955 | u32 padding = 0; | ||
2956 | int niov = 0, tx_size; | ||
2957 | 3007 | ||
2958 | iscsit_build_nopin_rsp(cmd, conn, hdr, true); | 3008 | iscsit_build_nopin_rsp(cmd, conn, hdr, true); |
2959 | 3009 | ||
2960 | tx_size = ISCSI_HDR_LEN; | ||
2961 | iov = &cmd->iov_misc[0]; | ||
2962 | iov[niov].iov_base = cmd->pdu; | ||
2963 | iov[niov++].iov_len = ISCSI_HDR_LEN; | ||
2964 | |||
2965 | if (conn->conn_ops->HeaderDigest) { | ||
2966 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
2967 | |||
2968 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, | ||
2969 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
2970 | |||
2971 | iov[0].iov_len += ISCSI_CRC_LEN; | ||
2972 | tx_size += ISCSI_CRC_LEN; | ||
2973 | pr_debug("Attaching CRC32C HeaderDigest" | ||
2974 | " to NopIn 0x%08x\n", *header_digest); | ||
2975 | } | ||
2976 | |||
2977 | /* | 3010 | /* |
2978 | * NOPOUT Ping Data is attached to struct iscsi_cmd->buf_ptr. | 3011 | * NOPOUT Ping Data is attached to struct iscsi_cmd->buf_ptr. |
2979 | * NOPOUT DataSegmentLength is at struct iscsi_cmd->buf_ptr_size. | 3012 | * NOPOUT DataSegmentLength is at struct iscsi_cmd->buf_ptr_size. |
2980 | */ | 3013 | */ |
2981 | if (cmd->buf_ptr_size) { | 3014 | pr_debug("Echoing back %u bytes of ping data.\n", cmd->buf_ptr_size); |
2982 | iov[niov].iov_base = cmd->buf_ptr; | ||
2983 | iov[niov++].iov_len = cmd->buf_ptr_size; | ||
2984 | tx_size += cmd->buf_ptr_size; | ||
2985 | |||
2986 | pr_debug("Echoing back %u bytes of ping" | ||
2987 | " data.\n", cmd->buf_ptr_size); | ||
2988 | 3015 | ||
2989 | padding = ((-cmd->buf_ptr_size) & 3); | 3016 | return conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, |
2990 | if (padding != 0) { | 3017 | cmd->buf_ptr, |
2991 | iov[niov].iov_base = &cmd->pad_bytes; | 3018 | cmd->buf_ptr_size); |
2992 | iov[niov++].iov_len = padding; | ||
2993 | tx_size += padding; | ||
2994 | pr_debug("Attaching %u additional" | ||
2995 | " padding bytes.\n", padding); | ||
2996 | } | ||
2997 | if (conn->conn_ops->DataDigest) { | ||
2998 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, | ||
2999 | cmd->buf_ptr, cmd->buf_ptr_size, | ||
3000 | padding, (u8 *)&cmd->pad_bytes, | ||
3001 | (u8 *)&cmd->data_crc); | ||
3002 | |||
3003 | iov[niov].iov_base = &cmd->data_crc; | ||
3004 | iov[niov++].iov_len = ISCSI_CRC_LEN; | ||
3005 | tx_size += ISCSI_CRC_LEN; | ||
3006 | pr_debug("Attached DataDigest for %u" | ||
3007 | " bytes of ping data, CRC 0x%08x\n", | ||
3008 | cmd->buf_ptr_size, cmd->data_crc); | ||
3009 | } | ||
3010 | } | ||
3011 | |||
3012 | cmd->iov_misc_count = niov; | ||
3013 | cmd->tx_size = tx_size; | ||
3014 | |||
3015 | return 0; | ||
3016 | } | 3019 | } |
3017 | 3020 | ||
3018 | static int iscsit_send_r2t( | 3021 | static int iscsit_send_r2t( |
3019 | struct iscsi_cmd *cmd, | 3022 | struct iscsi_cmd *cmd, |
3020 | struct iscsi_conn *conn) | 3023 | struct iscsi_conn *conn) |
3021 | { | 3024 | { |
3022 | int tx_size = 0; | ||
3023 | struct iscsi_r2t *r2t; | 3025 | struct iscsi_r2t *r2t; |
3024 | struct iscsi_r2t_rsp *hdr; | 3026 | struct iscsi_r2t_rsp *hdr; |
3025 | int ret; | 3027 | int ret; |
@@ -3044,38 +3046,18 @@ static int iscsit_send_r2t( | |||
3044 | hdr->data_offset = cpu_to_be32(r2t->offset); | 3046 | hdr->data_offset = cpu_to_be32(r2t->offset); |
3045 | hdr->data_length = cpu_to_be32(r2t->xfer_len); | 3047 | hdr->data_length = cpu_to_be32(r2t->xfer_len); |
3046 | 3048 | ||
3047 | cmd->iov_misc[0].iov_base = cmd->pdu; | ||
3048 | cmd->iov_misc[0].iov_len = ISCSI_HDR_LEN; | ||
3049 | tx_size += ISCSI_HDR_LEN; | ||
3050 | |||
3051 | if (conn->conn_ops->HeaderDigest) { | ||
3052 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
3053 | |||
3054 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, | ||
3055 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
3056 | |||
3057 | cmd->iov_misc[0].iov_len += ISCSI_CRC_LEN; | ||
3058 | tx_size += ISCSI_CRC_LEN; | ||
3059 | pr_debug("Attaching CRC32 HeaderDigest for R2T" | ||
3060 | " PDU 0x%08x\n", *header_digest); | ||
3061 | } | ||
3062 | |||
3063 | pr_debug("Built %sR2T, ITT: 0x%08x, TTT: 0x%08x, StatSN:" | 3049 | pr_debug("Built %sR2T, ITT: 0x%08x, TTT: 0x%08x, StatSN:" |
3064 | " 0x%08x, R2TSN: 0x%08x, Offset: %u, DDTL: %u, CID: %hu\n", | 3050 | " 0x%08x, R2TSN: 0x%08x, Offset: %u, DDTL: %u, CID: %hu\n", |
3065 | (!r2t->recovery_r2t) ? "" : "Recovery ", cmd->init_task_tag, | 3051 | (!r2t->recovery_r2t) ? "" : "Recovery ", cmd->init_task_tag, |
3066 | r2t->targ_xfer_tag, ntohl(hdr->statsn), r2t->r2t_sn, | 3052 | r2t->targ_xfer_tag, ntohl(hdr->statsn), r2t->r2t_sn, |
3067 | r2t->offset, r2t->xfer_len, conn->cid); | 3053 | r2t->offset, r2t->xfer_len, conn->cid); |
3068 | 3054 | ||
3069 | cmd->iov_misc_count = 1; | ||
3070 | cmd->tx_size = tx_size; | ||
3071 | |||
3072 | spin_lock_bh(&cmd->r2t_lock); | 3055 | spin_lock_bh(&cmd->r2t_lock); |
3073 | r2t->sent_r2t = 1; | 3056 | r2t->sent_r2t = 1; |
3074 | spin_unlock_bh(&cmd->r2t_lock); | 3057 | spin_unlock_bh(&cmd->r2t_lock); |
3075 | 3058 | ||
3076 | ret = iscsit_send_tx_data(cmd, conn, 1); | 3059 | ret = conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, NULL, 0); |
3077 | if (ret < 0) { | 3060 | if (ret < 0) { |
3078 | iscsit_tx_thread_wait_for_tcp(conn); | ||
3079 | return ret; | 3061 | return ret; |
3080 | } | 3062 | } |
3081 | 3063 | ||
@@ -3204,18 +3186,12 @@ EXPORT_SYMBOL(iscsit_build_rsp_pdu); | |||
3204 | static int iscsit_send_response(struct iscsi_cmd *cmd, struct iscsi_conn *conn) | 3186 | static int iscsit_send_response(struct iscsi_cmd *cmd, struct iscsi_conn *conn) |
3205 | { | 3187 | { |
3206 | struct iscsi_scsi_rsp *hdr = (struct iscsi_scsi_rsp *)&cmd->pdu[0]; | 3188 | struct iscsi_scsi_rsp *hdr = (struct iscsi_scsi_rsp *)&cmd->pdu[0]; |
3207 | struct kvec *iov; | ||
3208 | u32 padding = 0, tx_size = 0; | ||
3209 | int iov_count = 0; | ||
3210 | bool inc_stat_sn = (cmd->i_state == ISTATE_SEND_STATUS); | 3189 | bool inc_stat_sn = (cmd->i_state == ISTATE_SEND_STATUS); |
3190 | void *data_buf = NULL; | ||
3191 | u32 padding = 0, data_buf_len = 0; | ||
3211 | 3192 | ||
3212 | iscsit_build_rsp_pdu(cmd, conn, inc_stat_sn, hdr); | 3193 | iscsit_build_rsp_pdu(cmd, conn, inc_stat_sn, hdr); |
3213 | 3194 | ||
3214 | iov = &cmd->iov_misc[0]; | ||
3215 | iov[iov_count].iov_base = cmd->pdu; | ||
3216 | iov[iov_count++].iov_len = ISCSI_HDR_LEN; | ||
3217 | tx_size += ISCSI_HDR_LEN; | ||
3218 | |||
3219 | /* | 3195 | /* |
3220 | * Attach SENSE DATA payload to iSCSI Response PDU | 3196 | * Attach SENSE DATA payload to iSCSI Response PDU |
3221 | */ | 3197 | */ |
@@ -3227,56 +3203,23 @@ static int iscsit_send_response(struct iscsi_cmd *cmd, struct iscsi_conn *conn) | |||
3227 | 3203 | ||
3228 | padding = -(cmd->se_cmd.scsi_sense_length) & 3; | 3204 | padding = -(cmd->se_cmd.scsi_sense_length) & 3; |
3229 | hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length); | 3205 | hton24(hdr->dlength, (u32)cmd->se_cmd.scsi_sense_length); |
3230 | iov[iov_count].iov_base = cmd->sense_buffer; | 3206 | data_buf = cmd->sense_buffer; |
3231 | iov[iov_count++].iov_len = | 3207 | data_buf_len = cmd->se_cmd.scsi_sense_length + padding; |
3232 | (cmd->se_cmd.scsi_sense_length + padding); | ||
3233 | tx_size += cmd->se_cmd.scsi_sense_length; | ||
3234 | 3208 | ||
3235 | if (padding) { | 3209 | if (padding) { |
3236 | memset(cmd->sense_buffer + | 3210 | memset(cmd->sense_buffer + |
3237 | cmd->se_cmd.scsi_sense_length, 0, padding); | 3211 | cmd->se_cmd.scsi_sense_length, 0, padding); |
3238 | tx_size += padding; | ||
3239 | pr_debug("Adding %u bytes of padding to" | 3212 | pr_debug("Adding %u bytes of padding to" |
3240 | " SENSE.\n", padding); | 3213 | " SENSE.\n", padding); |
3241 | } | 3214 | } |
3242 | 3215 | ||
3243 | if (conn->conn_ops->DataDigest) { | ||
3244 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, | ||
3245 | cmd->sense_buffer, | ||
3246 | (cmd->se_cmd.scsi_sense_length + padding), | ||
3247 | 0, NULL, (u8 *)&cmd->data_crc); | ||
3248 | |||
3249 | iov[iov_count].iov_base = &cmd->data_crc; | ||
3250 | iov[iov_count++].iov_len = ISCSI_CRC_LEN; | ||
3251 | tx_size += ISCSI_CRC_LEN; | ||
3252 | |||
3253 | pr_debug("Attaching CRC32 DataDigest for" | ||
3254 | " SENSE, %u bytes CRC 0x%08x\n", | ||
3255 | (cmd->se_cmd.scsi_sense_length + padding), | ||
3256 | cmd->data_crc); | ||
3257 | } | ||
3258 | |||
3259 | pr_debug("Attaching SENSE DATA: %u bytes to iSCSI" | 3216 | pr_debug("Attaching SENSE DATA: %u bytes to iSCSI" |
3260 | " Response PDU\n", | 3217 | " Response PDU\n", |
3261 | cmd->se_cmd.scsi_sense_length); | 3218 | cmd->se_cmd.scsi_sense_length); |
3262 | } | 3219 | } |
3263 | 3220 | ||
3264 | if (conn->conn_ops->HeaderDigest) { | 3221 | return conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, data_buf, |
3265 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | 3222 | data_buf_len); |
3266 | |||
3267 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, cmd->pdu, | ||
3268 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
3269 | |||
3270 | iov[0].iov_len += ISCSI_CRC_LEN; | ||
3271 | tx_size += ISCSI_CRC_LEN; | ||
3272 | pr_debug("Attaching CRC32 HeaderDigest for Response" | ||
3273 | " PDU 0x%08x\n", *header_digest); | ||
3274 | } | ||
3275 | |||
3276 | cmd->iov_misc_count = iov_count; | ||
3277 | cmd->tx_size = tx_size; | ||
3278 | |||
3279 | return 0; | ||
3280 | } | 3223 | } |
3281 | 3224 | ||
3282 | static u8 iscsit_convert_tcm_tmr_rsp(struct se_tmr_req *se_tmr) | 3225 | static u8 iscsit_convert_tcm_tmr_rsp(struct se_tmr_req *se_tmr) |
@@ -3323,30 +3266,10 @@ static int | |||
3323 | iscsit_send_task_mgt_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn) | 3266 | iscsit_send_task_mgt_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn) |
3324 | { | 3267 | { |
3325 | struct iscsi_tm_rsp *hdr = (struct iscsi_tm_rsp *)&cmd->pdu[0]; | 3268 | struct iscsi_tm_rsp *hdr = (struct iscsi_tm_rsp *)&cmd->pdu[0]; |
3326 | u32 tx_size = 0; | ||
3327 | 3269 | ||
3328 | iscsit_build_task_mgt_rsp(cmd, conn, hdr); | 3270 | iscsit_build_task_mgt_rsp(cmd, conn, hdr); |
3329 | 3271 | ||
3330 | cmd->iov_misc[0].iov_base = cmd->pdu; | 3272 | return conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, NULL, 0); |
3331 | cmd->iov_misc[0].iov_len = ISCSI_HDR_LEN; | ||
3332 | tx_size += ISCSI_HDR_LEN; | ||
3333 | |||
3334 | if (conn->conn_ops->HeaderDigest) { | ||
3335 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
3336 | |||
3337 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, | ||
3338 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
3339 | |||
3340 | cmd->iov_misc[0].iov_len += ISCSI_CRC_LEN; | ||
3341 | tx_size += ISCSI_CRC_LEN; | ||
3342 | pr_debug("Attaching CRC32 HeaderDigest for Task" | ||
3343 | " Mgmt Response PDU 0x%08x\n", *header_digest); | ||
3344 | } | ||
3345 | |||
3346 | cmd->iov_misc_count = 1; | ||
3347 | cmd->tx_size = tx_size; | ||
3348 | |||
3349 | return 0; | ||
3350 | } | 3273 | } |
3351 | 3274 | ||
3352 | static bool iscsit_check_inaddr_any(struct iscsi_np *np) | 3275 | static bool iscsit_check_inaddr_any(struct iscsi_np *np) |
@@ -3583,53 +3506,15 @@ static int iscsit_send_text_rsp( | |||
3583 | struct iscsi_conn *conn) | 3506 | struct iscsi_conn *conn) |
3584 | { | 3507 | { |
3585 | struct iscsi_text_rsp *hdr = (struct iscsi_text_rsp *)cmd->pdu; | 3508 | struct iscsi_text_rsp *hdr = (struct iscsi_text_rsp *)cmd->pdu; |
3586 | struct kvec *iov; | 3509 | int text_length; |
3587 | u32 tx_size = 0; | ||
3588 | int text_length, iov_count = 0, rc; | ||
3589 | |||
3590 | rc = iscsit_build_text_rsp(cmd, conn, hdr, ISCSI_TCP); | ||
3591 | if (rc < 0) | ||
3592 | return rc; | ||
3593 | |||
3594 | text_length = rc; | ||
3595 | iov = &cmd->iov_misc[0]; | ||
3596 | iov[iov_count].iov_base = cmd->pdu; | ||
3597 | iov[iov_count++].iov_len = ISCSI_HDR_LEN; | ||
3598 | iov[iov_count].iov_base = cmd->buf_ptr; | ||
3599 | iov[iov_count++].iov_len = text_length; | ||
3600 | |||
3601 | tx_size += (ISCSI_HDR_LEN + text_length); | ||
3602 | |||
3603 | if (conn->conn_ops->HeaderDigest) { | ||
3604 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
3605 | |||
3606 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, | ||
3607 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
3608 | 3510 | ||
3609 | iov[0].iov_len += ISCSI_CRC_LEN; | 3511 | text_length = iscsit_build_text_rsp(cmd, conn, hdr, ISCSI_TCP); |
3610 | tx_size += ISCSI_CRC_LEN; | 3512 | if (text_length < 0) |
3611 | pr_debug("Attaching CRC32 HeaderDigest for" | 3513 | return text_length; |
3612 | " Text Response PDU 0x%08x\n", *header_digest); | ||
3613 | } | ||
3614 | |||
3615 | if (conn->conn_ops->DataDigest) { | ||
3616 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, | ||
3617 | cmd->buf_ptr, text_length, | ||
3618 | 0, NULL, (u8 *)&cmd->data_crc); | ||
3619 | |||
3620 | iov[iov_count].iov_base = &cmd->data_crc; | ||
3621 | iov[iov_count++].iov_len = ISCSI_CRC_LEN; | ||
3622 | tx_size += ISCSI_CRC_LEN; | ||
3623 | |||
3624 | pr_debug("Attaching DataDigest for %u bytes of text" | ||
3625 | " data, CRC 0x%08x\n", text_length, | ||
3626 | cmd->data_crc); | ||
3627 | } | ||
3628 | |||
3629 | cmd->iov_misc_count = iov_count; | ||
3630 | cmd->tx_size = tx_size; | ||
3631 | 3514 | ||
3632 | return 0; | 3515 | return conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, |
3516 | cmd->buf_ptr, | ||
3517 | text_length); | ||
3633 | } | 3518 | } |
3634 | 3519 | ||
3635 | void | 3520 | void |
@@ -3654,49 +3539,15 @@ static int iscsit_send_reject( | |||
3654 | struct iscsi_conn *conn) | 3539 | struct iscsi_conn *conn) |
3655 | { | 3540 | { |
3656 | struct iscsi_reject *hdr = (struct iscsi_reject *)&cmd->pdu[0]; | 3541 | struct iscsi_reject *hdr = (struct iscsi_reject *)&cmd->pdu[0]; |
3657 | struct kvec *iov; | ||
3658 | u32 iov_count = 0, tx_size; | ||
3659 | 3542 | ||
3660 | iscsit_build_reject(cmd, conn, hdr); | 3543 | iscsit_build_reject(cmd, conn, hdr); |
3661 | 3544 | ||
3662 | iov = &cmd->iov_misc[0]; | ||
3663 | iov[iov_count].iov_base = cmd->pdu; | ||
3664 | iov[iov_count++].iov_len = ISCSI_HDR_LEN; | ||
3665 | iov[iov_count].iov_base = cmd->buf_ptr; | ||
3666 | iov[iov_count++].iov_len = ISCSI_HDR_LEN; | ||
3667 | |||
3668 | tx_size = (ISCSI_HDR_LEN + ISCSI_HDR_LEN); | ||
3669 | |||
3670 | if (conn->conn_ops->HeaderDigest) { | ||
3671 | u32 *header_digest = (u32 *)&cmd->pdu[ISCSI_HDR_LEN]; | ||
3672 | |||
3673 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, hdr, | ||
3674 | ISCSI_HDR_LEN, 0, NULL, (u8 *)header_digest); | ||
3675 | |||
3676 | iov[0].iov_len += ISCSI_CRC_LEN; | ||
3677 | tx_size += ISCSI_CRC_LEN; | ||
3678 | pr_debug("Attaching CRC32 HeaderDigest for" | ||
3679 | " REJECT PDU 0x%08x\n", *header_digest); | ||
3680 | } | ||
3681 | |||
3682 | if (conn->conn_ops->DataDigest) { | ||
3683 | iscsit_do_crypto_hash_buf(conn->conn_tx_hash, cmd->buf_ptr, | ||
3684 | ISCSI_HDR_LEN, 0, NULL, (u8 *)&cmd->data_crc); | ||
3685 | |||
3686 | iov[iov_count].iov_base = &cmd->data_crc; | ||
3687 | iov[iov_count++].iov_len = ISCSI_CRC_LEN; | ||
3688 | tx_size += ISCSI_CRC_LEN; | ||
3689 | pr_debug("Attaching CRC32 DataDigest for REJECT" | ||
3690 | " PDU 0x%08x\n", cmd->data_crc); | ||
3691 | } | ||
3692 | |||
3693 | cmd->iov_misc_count = iov_count; | ||
3694 | cmd->tx_size = tx_size; | ||
3695 | |||
3696 | pr_debug("Built Reject PDU StatSN: 0x%08x, Reason: 0x%02x," | 3545 | pr_debug("Built Reject PDU StatSN: 0x%08x, Reason: 0x%02x," |
3697 | " CID: %hu\n", ntohl(hdr->statsn), hdr->reason, conn->cid); | 3546 | " CID: %hu\n", ntohl(hdr->statsn), hdr->reason, conn->cid); |
3698 | 3547 | ||
3699 | return 0; | 3548 | return conn->conn_transport->iscsit_xmit_pdu(conn, cmd, NULL, |
3549 | cmd->buf_ptr, | ||
3550 | ISCSI_HDR_LEN); | ||
3700 | } | 3551 | } |
3701 | 3552 | ||
3702 | void iscsit_thread_get_cpumask(struct iscsi_conn *conn) | 3553 | void iscsit_thread_get_cpumask(struct iscsi_conn *conn) |
@@ -3889,13 +3740,6 @@ check_rsp_state: | |||
3889 | if (ret < 0) | 3740 | if (ret < 0) |
3890 | goto err; | 3741 | goto err; |
3891 | 3742 | ||
3892 | if (iscsit_send_tx_data(cmd, conn, 1) < 0) { | ||
3893 | iscsit_tx_thread_wait_for_tcp(conn); | ||
3894 | iscsit_unmap_iovec(cmd); | ||
3895 | goto err; | ||
3896 | } | ||
3897 | iscsit_unmap_iovec(cmd); | ||
3898 | |||
3899 | switch (state) { | 3743 | switch (state) { |
3900 | case ISTATE_SEND_LOGOUTRSP: | 3744 | case ISTATE_SEND_LOGOUTRSP: |
3901 | if (!iscsit_logout_post_handler(cmd, conn)) | 3745 | if (!iscsit_logout_post_handler(cmd, conn)) |
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 { | |||
22 | int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); | 22 | int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); |
23 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); | 23 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); |
24 | void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); | 24 | void (*iscsit_aborted_task)(struct iscsi_conn *, struct iscsi_cmd *); |
25 | int (*iscsit_xmit_pdu)(struct iscsi_conn *, struct iscsi_cmd *, | ||
26 | struct iscsi_datain_req *, const void *, u32); | ||
25 | enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); | 27 | enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn *); |
26 | }; | 28 | }; |
27 | 29 | ||