• Peng Li's avatar
    net: hns3: add match_id to check mailbox response from PF to VF · 4671042f
    Peng Li authored
    When VF need response from PF, VF will wait (1us - 1s) to receive
    the response, or it will wait timeout and the VF action fails.
    If VF do not receive response in 1st action because timeout,
    the 2nd action may receive response for the 1st action, and get
    incorrect response data.VF must reciveve the right response from
    PF,or it will cause unexpected error.
    
    This patch adds match_id to check mailbox response from PF to VF,
    to make sure VF get the right response:
    1. The message sent from VF was labelled with match_id which was a
    unique 16-bit non-zero value.
    2. The response sent from PF will label with match_id which got from
    the request.
    3. The VF uses the match_id to match request and response message.
    
    This scheme depends on PF driver supports match_id, if PF driver doesn't
    support then VF will uses the original scheme.
    Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
    Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    4671042f
hclge_mbx.h 5.77 KB