Skip to content

FCoE VN2VN fixes

Hannes Reinecke linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 32 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/22libfc: Revisit kref handlingdrivers/scsi/libfc/fc_rport.c+103 -312 replies
2/22libfc: additional debugging messagesdrivers/scsi/libfc/fc_exch.c drivers/scsi/libfc/fc_fcp.c drivers/scsi/libfc/fc_rport.c+56 -123 replies
3/22fcoe: FIP debuggingdrivers/scsi/fcoe/fcoe_ctlr.c+46 -53 replies
4/22libfc: spurious I/O error under high loaddrivers/scsi/libfc/fc_fcp.c+17 -101 reply
5/22libfc: Do not attempt to login if the port is already starteddrivers/scsi/libfc/fc_rport.c+6 -01 reply
6/22libfc: Debug PRLI failuresdrivers/scsi/libfc/fc_rport.c+13 -81 reply
7/22fcoe: filter out frames from invalid vlansdrivers/scsi/fcoe/fcoe_ctlr.c+11 -11 reply
8/22fcoe: make R_A_TOV and E_D_TOV configurabledrivers/scsi/fcoe/fcoe.c drivers/scsi/fcoe/fcoe_sysfs.c+81 -21 reply
9/22libfc: use configured lport R_A_TOV when sending exchangedrivers/scsi/libfc/fc_exch.c+1 -11 reply
10/22libfc: use configured e_d_tov for remote port state retriesdrivers/scsi/libfc/fc_rport.c+1 -11 reply
11/22fcoe: inhibit writing invalid values into the 'enabled' attributedrivers/scsi/fcoe/fcoe_sysfs.c+10 -22 replies
12/22libfc: don't fail sequence abort for completed exchangesdrivers/scsi/libfc/fc_fcp.c+30 -101 reply
13/22libfc: do not overwrite DID_TIME_OUT statusdrivers/scsi/libfc/fc_fcp.c+9 -31 reply
14/22libfc: use error code for fc_rport_error()drivers/scsi/libfc/fc_rport.c include/scsi/libfc.h+62 -401 reply
15/22libfc: frame alloc failure messagesdrivers/scsi/libfc/fc_exch.c+33 -81 reply
16/22fc: add missing ELS explanation valuesinclude/uapi/scsi/fc/fc_els.h+16 -11 reply
17/22libfc: Send LS_RJT responses on frame allocation failuredrivers/scsi/libfc/fc_rport.c+19 -81 reply
18/22libfc: don't advance state machine for incoming FLOGIdrivers/scsi/libfc/fc_rport.c+12 -61 reply
19/22libfc: Implement RTV responderdrivers/scsi/libfc/fc_rport.c+37 -01 reply
20/22libfc: Do not drop out-of-order framesdrivers/scsi/libfc/fc_exch.c+0 -31 reply
21/22libfc: reset timeout on queue fulldrivers/scsi/libfc/fc_fcp.c include/scsi/libfc.h+20 -41 reply
22/22fcoe: set default TC prioritydrivers/scsi/fcoe/fcoe.c+7 -20 replies

Reviews trailers per patch

18 of 22 patches have a Reviewed-by or Acked-by.

PatchJohannes ThumshirnChad Dupuis
1/22A-b T-b
2/22A-b
3/22A-b
4/22A-b
5/22A-b
6/22A-b
7/22
8/22A-b
9/22A-b
10/22A-b
11/22
12/22A-b
13/22A-b
14/22A-b
15/22
16/22A-b
17/22A-b
18/22A-b
19/22A-b
20/22A-b
21/22A-b
22/22

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/22] FCoE VN2VN fixes

Hi all,

after long and painful debugging session I finally managed to get FCoE VN2VN running on a point-to-point connection.
There wasn't so much a single issue, but rather an entire slew of rather annoying problems:
- rport kref handling is bonkers. Taking a kref once and releasing it when attempting to free the structure is just not what krefs are designed for.
- The FCoE stack reacts allergic to out-of-order frames. While in theory this shouldn't happen, it's hard to avoid with modern HW. Plus I even had been seeing this when using virtio. And to make matters worse, it would occasionally just drop any out of order frames, while handling them correctly in other cases.
- Failed FC REC/ABTS will cause an I/O error. There are perfectly legit cases where a REC might fail (eg if the exchange was already sent and it just got stuck in the RX queue), so it should not considered an error. A simple retry will be sufficient.
- FLOGI are handled ... interestingly. If both ends attempt an FLOGI the state machine is advanved on the incoming FLOGI request, so the stack gets confused when the (original) FLOGI ACC is being returned.

Additionally I've added lots of debugging statements and some general cleanup.

As usual, comments and reviews are welcome.

The entire patchset can be found at
git://git.kernel.org/hare/scsi-devel/h/vn2vn

Hannes Reinecke (22):
libfc: Revisit kref handling
libfc: additional debugging messages
fcoe: FIP debugging
libfc: spurious I/O error under high load
libfc: Do not attempt to login if the port is already started
libfc: Debug PRLI failures
fcoe: filter out frames from invalid vlans
fcoe: make R_A_TOV and E_D_TOV configurable
libfc: use configured lport R_A_TOV when sending exchange
libfc: use configured e_d_tov for remote port state retries
fcoe: inhibit writing invalid values into the 'enabled' attribute
libfc: don't fail sequence abort for completed exchanges
libfc: do not overwrite DID_TIME_OUT status
libfc: use error code for fc_rport_error()
libfc: frame alloc failure messages
fc: add missing ELS explanation values
libfc: Send LS_RJT responses on frame allocation failure
libfc: don't advance state machine for incoming FLOGI
libfc: Implement RTV responder
libfc: Do not drop out-of-order frames
libfc: reset timeout on queue full
fcoe: set default TC priority

 drivers/scsi/fcoe/fcoe.c       |  21 ++-
 drivers/scsi/fcoe/fcoe_ctlr.c  |  63 +++++++-
 drivers/scsi/fcoe/fcoe_sysfs.c |  83 +++++++++-
 drivers/scsi/libfc/fc_exch.c   |  64 ++++++--
 drivers/scsi/libfc/fc_fcp.c    | 131 ++++++++++++----
 drivers/scsi/libfc/fc_rport.c  | 349 ++++++++++++++++++++++++++++++-----------
 include/scsi/libfc.h           |   8 +-
 include/uapi/scsi/fc/fc_els.h  |  17 +-
 8 files changed, 584 insertions(+), 152 deletions(-)
Signature · 1 line
1.8.5.6