• Ivan Vecera's avatar
    i40e: Remove queue tracking fields from i40e_adminq_ring · 4a95ce24
    Ivan Vecera authored
    Fields 'head', 'tail', 'len', 'bah' and 'bal' in i40e_adminq_ring
    are used to store register offsets. These offsets are initialized
    and remains constant so there is no need to store them in the
    i40e_adminq_ring structure.
    
    Remove these fields from i40e_adminq_ring and use register offset
    constants instead. Remove i40e_adminq_init_regs() that originally
    stores these constants into these fields.
    
    Finally improve i40e_check_asq_alive() that assumes that
    non-zero value of hw->aq.asq.len indicates fully initialized
    AdminQ send queue. Replace it by check for non-zero value
    of field hw->aq.asq.count that is non-zero when the sending
    queue is initialized and is zeroed during shutdown of
    the queue.
    Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
    Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
    Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
    Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    4a95ce24
i40e_common.c 173 KB