Skip to content
  • James Smart's avatar
    nvme_fc: rework sqsize handling · d157e534
    James Smart authored
    
    
    Corrected four outstanding issues in the transport around sqsize.
    
    1: Create Connection LS is sending the 1's-based sqsize, should be
    sending the 0's-based value.
    
    2: allocation of hw queue is using the 0's-base size. It should be
    using the 1's-based value.
    
    3: normalization of ctrl.sqsize by MQES is using MQES+1 (1's-based
    value). It should be MQES (0's-based value).
    
    4: Missing clause to ensure queue_count not larger than ctrl->sqsize.
    
    Corrected by:
    Clean up routines that pass queue size around. The queue size value is
    the actual count (1's-based) value and determined from ctrl->sqsize + 1.
    
    Routines that send 0's-based value adapt from queue size.
    
    Sset ctrl->sqsize properly for MQES.
    
    Added clause to nsure queue_count not larger than ctrl->sqsize + 1.
    
    Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
    Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
    d157e534