aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-07-20 18:20:14 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:05:54 -0400
commitf60e12e9c778c8256a646f80603d1b88ba5ce891 (patch)
tree732e918fc85cc441cd539be5e389e0dfd29a2199 /include/scsi/libfc.h
parenta7b12a279faaad26837276065104a1f9cf60e962 (diff)
[SCSI] libfc: track FIP exchanges
When an exchange is received with a FIP encapsulation, we need to know that the response must be sent via FIP and what the original ELS opcode was. This becomes important for VN2VN mode, where we may receive FLOGI or LOGO from several peer VN_ports, and the LS_ACC or LS_RJT must be sent FIP-encapsulated with the correct sub-type. Add a field to the struct fc_frame, fr_encaps, to indicate the encapsulation values. That term is chosen to be neutral and LLD-agnostic in case non-FCoE/FIP LLDs might find it useful. The frame fr_encaps is transferred from the ingress frame to the exchange by fc_exch_recv_req(), and back to the outgoing frame by fc_seq_send(). This is taking the last byte in the skb->cb array. If needed, we could combine the info in sof, eof, flags, and encaps together into one field, but it'd be better to do that if and when its needed. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r--include/scsi/libfc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 24b91c922055..8d297f9a0a47 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -412,6 +412,7 @@ struct fc_seq {
412 * @esb_stat: ESB exchange status 412 * @esb_stat: ESB exchange status
413 * @r_a_tov: Resouce allocation time out value (in msecs) 413 * @r_a_tov: Resouce allocation time out value (in msecs)
414 * @seq_id: The next sequence ID to use 414 * @seq_id: The next sequence ID to use
415 * @encaps: encapsulation information for lower-level driver
415 * @f_ctl: F_CTL flags for the sequence 416 * @f_ctl: F_CTL flags for the sequence
416 * @fh_type: The frame type 417 * @fh_type: The frame type
417 * @class: The class of service 418 * @class: The class of service
@@ -443,6 +444,7 @@ struct fc_exch {
443 u32 esb_stat; 444 u32 esb_stat;
444 u32 r_a_tov; 445 u32 r_a_tov;
445 u8 seq_id; 446 u8 seq_id;
447 u8 encaps;
446 u32 f_ctl; 448 u32 f_ctl;
447 u8 fh_type; 449 u8 fh_type;
448 enum fc_class class; 450 enum fc_class class;