[Open-FCoE] [RFC PATCH 0/5] fix broken lport reset

Vasu Dev vasu.dev at intel.com
Fri Jan 14 20:13:23 UTC 2011


The lport reset doesn't works after recent exch block change to use
recently freed exchange, after this change FLOGI request is kicked
out by rport logo response as both had same xid in log pasted below.

21a799830cd698d4772cb5e0ec598eb3661e87f2 [SCSI] libfc: fix exchange being deleted when the abort itself i
86e26ae0b12ec1e6ab836819bca9497d9317b3f5 [SCSI] libfc: fix mem leak in fc_seq_assign()
6352cfffc3c2fe07049a8c33cfaea9094c2181d8 [SCSI] libfc: tune fc_exch_em_alloc() to be O(2)

Removing these recent exch block patches fixes the reset but
real use is improper logo handling since:-

1. Currently no fabric logo request send out during reset
2. The fabric logo request is sent out during destroy but its
response is not processed which could interfere with next login
as currently seen during reset with rport logo response.

This series fixes this by doing completing logo processing
during lport reset and destroy.

These changes works with master lport but modified code paths are
also used by NPIV and but NPIV is broken, so will retest them with
NPIV fix along with changes for any comment on these patches.

Detailed log of broken reset:

[78395.076454] host26: lport 53001e: Entered RESET state from Ready state
[78395.076459] host26: rport fffffc: Remove port
[78395.076462] host26: rport fffffc: Port sending LOGO from Ready state
[78395.076474] host26: xid  210: exchange allocated
[78395.076488] host26: rport fffffc: Delete port
[78395.076508] host26: rport e10aef: Remove port
[78395.076512] host26: rport fffffc: work event 3
[78395.076516] host26: rport fffffc: callback ev 3
[78395.076520] host26: lport 53001e: Received a 3 event for port (fffffc)
[78395.076524] host26: rport e10aef: Port sending LOGO from Ready state
[78395.076529] host26: xid  200: exchange allocated
[78395.076540] host26: rport e10aef: Delete port
[78395.076553] host26: lport 53001e: Exches reset for sid:0x:0 did:0x:0
[78395.076564] host26: xid  210: Exchange completed
[78395.076567] host26: rport fffffc: Received a LOGO response closed
[78395.076570] host26: xid  210: Exchange released
[78395.076574] host26: xid  200: Exchange completed
[78395.076577] host26: rport e10aef: Received a LOGO response closed
[78395.076579] host26: xid  200: Exchange released
[78395.076587] host26: lport 000000: Entered FLOGI state from reset state
[78395.076592] host26: xid  210: exchange allocated
[78395.076598] host26: xid  210: Exchange timer armed
[78395.076613] host26: lport 000000: Exches reset for sid:0x:0 did:0x:fffffc
[78395.076628] host26: lport 000000: Exches reset for sid:0x:fffffc did:0x:0
[78395.076634] host26: fip: sending FLOGI
[78395.076638] host26: fip: FLOGI/FDISC sent with FPMA
[78395.076645] host26: rport e10aef: work event 3
[78395.076651] host26: lport 000000: Exches reset for sid:0x:0 did:0x:e10aef
[78395.076662] host26: lport 000000: Exches reset for sid:0x:e10aef did:0x:0
[78395.076683] host26: rport e10aef: work delete
[78395.076874] fcoe: n0.170-fcoe: skb_info: len:50 data_len:0 head:ffff8803226ae000 data:ffff8803226ae04e tail:ffff8803226ae080 end:ffff8803226aec40 sum:0 dev:n0.170-fcoe
[78395.076894] fcoe: n0.170-fcoe: skb_info: len:50 data_len:0 head:ffff8803226ae000 data:ffff8803226ae04e tail:ffff8803226ae080 end:ffff8803226aec40 sum:0 dev:n0.170-fcoe
[78395.076900] host26: xid  210: Exchange completed
[78395.076906] host26: xid  210: Exchange released
[78395.078634] fcoe: n0.170-fcoe: skb_info: len:50 data_len:0 head:ffff8803226af000 data:ffff8803226af04e tail:ffff8803226af080 end:ffff8803226afc40 sum:0 dev:n0.170-fcoe
[78395.078647] fcoe: n0.170-fcoe: skb_info: len:50 data_len:0 head:ffff8803226af000 data:ffff8803226af04e tail:ffff8803226af080 end:ffff8803226afc40 sum:0 dev:n0.170-fcoe
---

Vasu Dev (5):
      libfc: stop sending KA if port is not logged in
      libfc: wait for logo to complete
      libfc: wait for logo response during fcoe interface destroy
      libfc: skip lport reset in case the lport port_id is zero
      libfc: fix logo resp handling to use logo req during lport reset also


 drivers/scsi/fcoe/fcoe.c      |    5 ++-
 drivers/scsi/fcoe/libfcoe.c   |    4 +--
 drivers/scsi/libfc/fc_lport.c |   65 ++++++++++++++++-------------------------
 include/scsi/libfc.h          |    2 +
 4 files changed, 32 insertions(+), 44 deletions(-)

-- 



More information about the devel mailing list