[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>
This commit is contained in:
committed by
James Bottomley
parent
a7b12a279f
commit
f60e12e9c7
@@ -412,6 +412,7 @@ struct fc_seq {
|
||||
* @esb_stat: ESB exchange status
|
||||
* @r_a_tov: Resouce allocation time out value (in msecs)
|
||||
* @seq_id: The next sequence ID to use
|
||||
* @encaps: encapsulation information for lower-level driver
|
||||
* @f_ctl: F_CTL flags for the sequence
|
||||
* @fh_type: The frame type
|
||||
* @class: The class of service
|
||||
@@ -443,6 +444,7 @@ struct fc_exch {
|
||||
u32 esb_stat;
|
||||
u32 r_a_tov;
|
||||
u8 seq_id;
|
||||
u8 encaps;
|
||||
u32 f_ctl;
|
||||
u8 fh_type;
|
||||
enum fc_class class;
|
||||
|
Reference in New Issue
Block a user