• Jian Shen's avatar
    net: hns3: refine the handling for VF heartbeat · fec73521
    Jian Shen authored
    Currently, the PF check the VF alive by the KEEP_ALVE
    mailbox from VF. VF keep sending the mailbox per 2
    seconds. Once PF lost the mailbox for more than 8
    seconds, it will regards the VF is abnormal, and stop
    notifying the state change to VF, include link state,
    vf mac, reset, even though it receives the KEEP_ALIVE
    mailbox again. It's inreasonable.
    
    This patch fixes it. PF will record the state change which
    need to notify VF when lost the VF's KEEP_ALIVE mailbox.
    And notify VF when receive the mailbox again. Introduce a
    new flag HCLGE_VPORT_STATE_INITED, used to distinguish the
    case whether VF driver loaded or not. For VF will query
    these states when initializing, so it's unnecessary to
    notify it in this case.
    
    Fixes: aa5c4f17 ("net: hns3: add reset handling for VF when doing PF reset")
    Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
    Signed-off-by: default avatarHao Lan <lanhao@huawei.com>
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fec73521
hclge_main.h 30.8 KB