• Moshe Shemesh's avatar
    net/mlx4: Add VF vlan protocol 802.1ad support · b42959dc
    Moshe Shemesh authored
    Move the vf to VST 802.1ad mode (mlx4 VST QinQ mode) by setting vf vlan
    protocol to 802.1ad.
    VST 802.1ad mode in mlx4, is used for STAG strip/insertion by PF, while
    the CTAG is set by the VF.
    Read current vlan protocol as part of the vf configuration state.
    
    Upon setting vf vlan protocol to 802.1ad, we use a mechanism of handshake
    to verify that both the vf and the pf driver version support it.
    The handshake uses the command QUERY_FUNC_CAP:
    - The vf sets a pre-defined support bit in input modifier.
    - A pf that supports the feature sends the request to the vf through a
      pre-defined field in the output mailbox.
    - In case vf does not support the feature, the pf will fail the control
      command (in this case, IP link tool command to set the vf vlan
      protocol to 802.1ad).
    
    No change in VST 802.1Q mode.
    Signed-off-by: default avatarMoshe Shemesh <moshe@mellanox.com>
    Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b42959dc
mlx4.h 41.8 KB