• Jeff Kirsher's avatar
    fm10k: don't handle mailbox events in iov_event path and always process mailbox · 9de15bda
    Jeff Kirsher authored
    Since we already schedule the service task, we can just wait for this
    task to handle the mailbox events from the VF. This reduces some complex
    code flow, and makes it so we have a single path for handling the VF
    messages. There is a possibility that we have a slight delay in handling
    VF messages, but it should be minimal.
    
    The result of tx_complete and !rx_ready is insufficient to determine
    whether we need to process the mailbox. There is a possible race
    condition whereby the VF fills up the mbmem for us, but we have already
    recently processed the mailboxes in the interrupt. During this time,
    the interrupt is disabled. Thus, our Rx FIFO is empty, but the mbmem now
    has data in it. Since we continually check whether Rx FIFO is empty, we
    then never call process. This results in the possibility to prevent PF
    from handling the VF mailbox messages.
    
    Instead, just call process every time, despite the fact that we may or
    may not have anything to process for the VF. There should be minimal
    overhead for doing this, and it resolves an issue where the VF never
    comes up due to never getting response for its SET_LPORT_STATE message.
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Acked-by: default avatarMatthew Vick <matthew.vick@intel.com>
    Tested-by: default avatarKrishneil Singh <krishneil.k.singh@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    9de15bda
fm10k_iov.c 13.1 KB