• Jack Morgenstein's avatar
    net/mlx4_core: Add reserved lkey for VFs to QUERY_FUNC_CAP · f0ce0615
    Jack Morgenstein authored
    The reserved lKey is different for each VF.
    A base lkey value is returned in QUERY_DEV_CAP at offset 0x98.
    
    The reserved L_key value for a VF is:
        VF_lkey = base_lkey + (VF_number << 8).
    
    This VF L_key value should be returned in QUERY_FUNC_CAP
    (opcode-modifier = 0) at offset 0x48.
    
    To indicate that the lkey value at offset 0x48 is valid, the Hypervisor
    sets a flag bit in dword 0x0, offset 27 in the QUERY_FUNC_CAP wrapper
    function.
    
    When the VF calls QUERY_FUNC_CAP, it should check if this flag bit is set.
    If it is set, the VF should take the reserved lkey value at offset 0x48.
    If the bit is not set, the VF should not use a reserved lkey
    (i.e., should set its reserved lkey value to 0).
    Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
    Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f0ce0615
fw.h 6.47 KB