qedi_fw_iscsi.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. * QLogic iSCSI Offload Driver
  3. * Copyright (c) 2016 Cavium Inc.
  4. *
  5. * This software is available under the terms of the GNU General Public License
  6. * (GPL) Version 2, available from the file COPYING in the main directory of
  7. * this source tree.
  8. */
  9. #ifndef _QEDI_FW_ISCSI_H_
  10. #define _QEDI_FW_ISCSI_H_
  11. #include "qedi_fw_scsi.h"
  12. struct iscsi_task_params {
  13. struct e4_iscsi_task_context *context;
  14. struct iscsi_wqe *sqe;
  15. u32 tx_io_size;
  16. u32 rx_io_size;
  17. u16 conn_icid;
  18. u16 itid;
  19. u8 cq_rss_number;
  20. };
  21. struct iscsi_conn_params {
  22. u32 first_burst_length;
  23. u32 max_send_pdu_length;
  24. u32 max_burst_length;
  25. bool initial_r2t;
  26. bool immediate_data;
  27. };
  28. /* @brief init_initiator_read_iscsi_task - initializes iSCSI Initiator Read
  29. * task context.
  30. *
  31. * @param task_params - Pointer to task parameters struct
  32. * @param conn_params - Connection Parameters
  33. * @param cmd_params - command specific parameters
  34. * @param cmd_pdu_header - PDU Header Parameters
  35. * @param sgl_task_params - Pointer to SGL task params
  36. * @param dif_task_params - Pointer to DIF parameters struct
  37. */
  38. int init_initiator_rw_iscsi_task(struct iscsi_task_params *task_params,
  39. struct iscsi_conn_params *conn_params,
  40. struct scsi_initiator_cmd_params *cmd_params,
  41. struct iscsi_cmd_hdr *cmd_pdu_header,
  42. struct scsi_sgl_task_params *tx_sgl_params,
  43. struct scsi_sgl_task_params *rx_sgl_params,
  44. struct scsi_dif_task_params *dif_task_params);
  45. /* @brief init_initiator_login_request_task - initializes iSCSI Initiator Login
  46. * Request task context.
  47. *
  48. * @param task_params - Pointer to task parameters struct
  49. * @param login_req_pdu_header - PDU Header Parameters
  50. * @param tx_sgl_task_params - Pointer to SGL task params
  51. * @param rx_sgl_task_params - Pointer to SGL task params
  52. */
  53. int init_initiator_login_request_task(struct iscsi_task_params *task_params,
  54. struct iscsi_login_req_hdr *login_header,
  55. struct scsi_sgl_task_params *tx_params,
  56. struct scsi_sgl_task_params *rx_params);
  57. /* @brief init_initiator_nop_out_task - initializes iSCSI Initiator NOP Out
  58. * task context.
  59. *
  60. * @param task_params - Pointer to task parameters struct
  61. * @param nop_out_pdu_header - PDU Header Parameters
  62. * @param tx_sgl_task_params - Pointer to SGL task params
  63. * @param rx_sgl_task_params - Pointer to SGL task params
  64. */
  65. int init_initiator_nop_out_task(struct iscsi_task_params *task_params,
  66. struct iscsi_nop_out_hdr *nop_out_pdu_header,
  67. struct scsi_sgl_task_params *tx_sgl_params,
  68. struct scsi_sgl_task_params *rx_sgl_params);
  69. /* @brief init_initiator_logout_request_task - initializes iSCSI Initiator
  70. * Logout Request task context.
  71. *
  72. * @param task_params - Pointer to task parameters struct
  73. * @param logout_pdu_header - PDU Header Parameters
  74. * @param tx_sgl_task_params - Pointer to SGL task params
  75. * @param rx_sgl_task_params - Pointer to SGL task params
  76. */
  77. int init_initiator_logout_request_task(struct iscsi_task_params *task_params,
  78. struct iscsi_logout_req_hdr *logout_hdr,
  79. struct scsi_sgl_task_params *tx_params,
  80. struct scsi_sgl_task_params *rx_params);
  81. /* @brief init_initiator_tmf_request_task - initializes iSCSI Initiator TMF
  82. * task context.
  83. *
  84. * @param task_params - Pointer to task parameters struct
  85. * @param tmf_pdu_header - PDU Header Parameters
  86. */
  87. int init_initiator_tmf_request_task(struct iscsi_task_params *task_params,
  88. struct iscsi_tmf_request_hdr *tmf_header);
  89. /* @brief init_initiator_text_request_task - initializes iSCSI Initiator Text
  90. * Request task context.
  91. *
  92. * @param task_params - Pointer to task parameters struct
  93. * @param text_request_pdu_header - PDU Header Parameters
  94. * @param tx_sgl_task_params - Pointer to Tx SGL task params
  95. * @param rx_sgl_task_params - Pointer to Rx SGL task params
  96. */
  97. int init_initiator_text_request_task(struct iscsi_task_params *task_params,
  98. struct iscsi_text_request_hdr *text_header,
  99. struct scsi_sgl_task_params *tx_params,
  100. struct scsi_sgl_task_params *rx_params);
  101. /* @brief init_cleanup_task - initializes Clean task (SQE)
  102. *
  103. * @param task_params - Pointer to task parameters struct
  104. */
  105. int init_cleanup_task(struct iscsi_task_params *task_params);
  106. #endif