From b277d2aa9a4d969002c4157bf77b76b9ad9ca04a Mon Sep 17 00:00:00 2001 From: Yi Zou Date: Fri, 27 Feb 2009 14:07:21 -0800 Subject: [SCSI] libfc: add support of large receive offload by ddp in fc_fcp When LLD supports direct data placement (ddp) for large receive of an scsi i/o coming into fc_fcp, we call into libfc_function_template's ddp_setup() to prepare for a ddp of large receive for this read I/O. When I/O is complete, we call the corresponding ddp_done() to get the length of data ddped as well as to let LLD do clean up. fc_fcp_ddp_setup()/fc_fcp_ddp_done() are added to setup and complete a ddped read I/O described by the given fc_fcp_pkt. They would call into corresponding ddp_setup/ddp_done implemented by the fcoe layer. Eventually, fcoe layer calls into LLD's ddp_setup/ddp_done provided through net_device Signed-off-by: Yi Zou Signed-off-by: James Bottomley --- include/scsi/fc_frame.h | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'include/scsi/fc_frame.h') diff --git a/include/scsi/fc_frame.h b/include/scsi/fc_frame.h index 04d34a71355f..59511057cee0 100644 --- a/include/scsi/fc_frame.h +++ b/include/scsi/fc_frame.h @@ -54,8 +54,7 @@ #define fr_eof(fp) (fr_cb(fp)->fr_eof) #define fr_flags(fp) (fr_cb(fp)->fr_flags) #define fr_max_payload(fp) (fr_cb(fp)->fr_max_payload) -#define fr_cmd(fp) (fr_cb(fp)->fr_cmd) -#define fr_dir(fp) (fr_cmd(fp)->sc_data_direction) +#define fr_fsp(fp) (fr_cb(fp)->fr_fsp) #define fr_crc(fp) (fr_cb(fp)->fr_crc) struct fc_frame { @@ -66,7 +65,7 @@ struct fcoe_rcv_info { struct packet_type *ptype; struct fc_lport *fr_dev; /* transport layer private pointer */ struct fc_seq *fr_seq; /* for use with exchange manager */ - struct scsi_cmnd *fr_cmd; /* for use of scsi command */ + struct fc_fcp_pkt *fr_fsp; /* for the corresponding fcp I/O */ u32 fr_crc; u16 fr_max_payload; /* max FC payload */ enum fc_sof fr_sof; /* start of frame delimiter */ @@ -218,20 +217,6 @@ static inline bool fc_frame_is_cmd(const struct fc_frame *fp) return fc_frame_rctl(fp) == FC_RCTL_DD_UNSOL_CMD; } -static inline bool fc_frame_is_read(const struct fc_frame *fp) -{ - if (fc_frame_is_cmd(fp) && fr_cmd(fp)) - return fr_dir(fp) == DMA_FROM_DEVICE; - return false; -} - -static inline bool fc_frame_is_write(const struct fc_frame *fp) -{ - if (fc_frame_is_cmd(fp) && fr_cmd(fp)) - return fr_dir(fp) == DMA_TO_DEVICE; - return false; -} - /* * Check for leaks. * Print the frame header of any currently allocated frame, assuming there -- cgit v1.2.3-59-g8ed1b