TODO
From Open-FCoE Wiki
Contents |
[edit] Open-FCoE TODO Lists
[edit] Re-architecture TODO
| Miscellaneous | |
|---|---|
| What do we do with fc_attrs.c? | Unassigned |
| the only file in libfc/ that should include fc_frame.h is libfc.h | Unassigned |
| reorder files to remove static prototypes at top of files | Unassigned |
| fc_lport locking - fix and document | Rob |
| irq spinlocks not bh ones if traditional HBAs will use the library | Unassigned |
| per-scsi_pkt locking investigation | Unassigned |
| statistical counting in libfc/fcoe - are we doing it correctly? | Unassigned |
| rm net_types.h and fc_types.h | Unassigned |
| use be/le not hton/ntoh | Unassigned |
| Fix can't delete/create EM cache defect | Vasu |
| Fix race found by Mike C in calling upper layer resp handler from EM while exch is freed by upper layer error handler. | Vasu |
| Fix exch locking for timer deletion to account for TMF case when decrementing timer exch ref count. | Vasu |
| fix p2p implementation in rearch initiator and make sure that it's correct with the fc-ls spec | Unassigned |
| Link up / down path | Chris |
| Reset path | Chris |
| Code Reviewing | |
| Code review of LP | Unassigned |
| Code review of FCP | Unassigned |
| Code review of RP | Unassigned |
| Code review of NS | Unassigned |
| Code review of EM | Unassigned |
| Code review of FCoE | Unassigned |
| name change of members to remove prefixes | |
| fc_lport.c | Unassigned |
| fc_fcp.c | Unassigned |
| fc_rport.c | Unassigned |
| fc_ns.c | Unassigned |
| fcoe files | Unassigned |
| clean up libfc_function_template interfaces | |
| lport_enter_flogi | Unassigned |
| investigate merger of scsi_abort_io and scsi_cleanup | Unassigned |
| disc_enter_dns_stop | Unassigned |
| rport_closed | Unassigned |
| rport_lookup_create | Unassigned |
| rport_reset | Unassigned |
| rport_reset_list | Unassigned |
| fc_remote_port member investigation | |
| max_seq | Unassigned |
| removal of fc_remote_port.fs_state and enum fc_rport_state | Unassigned |
| Improve logging/printing | |
| separate errors from debug messages | Unassigned |
| add control to the debug macro to turn it on and off (possibly using a writeable module parameter) | Unassigned |
| Incorporate changes as per code review feedback. | |
| Move exch and seq struct to libfc.h and remove seq_get_xids() and seq_set_rec_data() from template by implementing their inline or macros. | Unassigned |
| Implement list of EMs in the fc_lport and use this list in exch_mgr_reset() from the LP to rest all EM and their pending exchanges | Unassigned |
[edit] MNC's TODO List
| Miscellaneous | |
|---|---|
| Need to be able to make forward progress in IO paths. Use mempools, reserve structs/mem, etc, for objects used for IO execution code paths when we can. Need to handle memory allocation failures a little more gracefully than BUGging. | Unassigned |
| fc_eh_host_reset should wait for he result of the reset or for a timeout. It should not return right away, because scsi-ml's TURs will probably fail. | Unassigned |
| When fc_eh_host_reset returns it must cleanup references to scsi commands in the driver, because scsi-ml assumes it owns them after the host reset callback returns. | Unassigned |
| Not sure if we are deleting rports correctly. We want to call fc_remote_port_delete if we are going to have to recovery from some problem like a link down or for even a RSCN. fc_remote_port_delete does not immediately remove the rport if it is a target. It will block it, so IO is not queued to the driver during recovery (until fast io fail or dev loss tmo fires). | Unassigned |
| The driver seems to fail IO right away, when the port should be blocked and holding io. I am not sure where the bug is yet. | Unassigned |
| The host shutdown code needs to be fixed so scsi-ml can stop devices before we kill ports. Move the fc_remove_host(lp->host) to before the fc_lport_destroy call in fcoe_destroy_interface, and handle rport clean up issues. | Unassigned |
| Hook into the fc class function template dev loss and terminate rport IO callbacks. | Unassigned |
| The fc_fcp_lock (now called fc_fcp_lock_pkt with my shared tag map patch) can be called in process or timer context, so we need to disable bottom halves when called from process context. | Unassigned |
| del_timer_sync is pretty heavy to use in fc_fcp.c's main io path. It also makes locking more difficult because you cannot hold locks while calling it. We may want to use a single timer for all IO. The single timer function would check all packets progress. | Unassigned |
| The fc_eh_abort code does not seem to return success ever. FC_SRB_ABORTED is not used. | Unassigned |
| The lun reset code sets the cdb_status for the completion values. I think we actaully wanted the rsp code (is wire shark broken too), because the target should normally send something like the function complete or bad lun or function failed values. As far as I know (I am not a FCP expert though) it does not normally send something like a check conditions as the response to a TMF request. | Unassigned |
| Do we need locking around the lp->state and status checks in the queuecommand function? | Rob |
| Why do we fail the command with DID_NO_CONNECT if FC_PAUSE is not supported. It seems like we want to rely on the rport blocking code, retry in cases of races and then allow the class to fail or retry IO. | Unassigned |
| Same for the link_status DID_NO_CONNECT usage. | Unassigned |
| The sg_tablesize is way too small. Investigate why this was done, and how to increase it to a respectable value. | Unassigned |
| timer usage is broken. fc_fcp_timer_set and its callers should use mod_timer. fc_fcp_timer_set should not be called while holding a spin lock because it can sleep. The timer functions can rearm themselves and I do not think the del_timer_sync can handle this by itself. The timer functions need some synchonization/bits to handle this. | Unassigned |
| Use time_before/after helpers to handle jiffies wrap around. | Unassigned |
| The exchange resp handler and fc_fcp.c's fcp scsi packet cleanup code can race resulting in the fsp packet cleanup code freeing the fsp while the resp handler is trying to access the fsp. | Unassigned |
| Refcounting in fc_fcp can leak fc scsi packets. For example if we reset the host but there is a rec outstanding, the host reset path would try to force the cleanup of the fsp. The cleanup function only releases the refcount that was taken when it was allocated. And there is still a refcount from the rec, which may not have been released if we did not get a response for it before calling fc_io_compl on the fsp. | Unassigned |
| fc_fcp_timer_set is
broken. It calls del_timer_sync with spin locks held. It should use mod_timer instead of the how you modify the timer today. And I am not sure but I do not think it does not work right for timers that rearm it self. For example if fc_io_compl was calling del_timer_sync, fc_fcp_send_cmd could be running and rearming the timer. The del_timer_sync call would not catch the rearm. You need some check in fc_fcp_send_cmd to prevent this. | Unassigned |
| We must use the time_before/after helpers when
accessing checking for times based on jiffies. So this: else if (jiffies - fsp->last_pkt_time < FC_SCSI_ER_TIMEOUT / 2)
fc_fcp_timer_set(fsp, FC_SCSI_ER_TIMEOUT);
should use the helpers to handle wrap around errors. | Unassigned |
[edit] Userspace TODO
| HABAAPI Library | |
|---|---|
| capture HBAAPI min requirements and where to get them from sysfs | Steve |
| re-implement vendor library using sysfs | Steve |
| fcoeadmin application | |
| implement fcoeadmin using HBAAPI vendor library | Yi/Steve |
| implement reset from fcoeadmn | Yi |