• Diana Wang's avatar
    nfp: support RX VLAN ctag/stag strip · 67d2656b
    Diana Wang authored
    Add support for RX VLAN ctag/stag strip
    which may be configured via ethtool.
    
    e.g.
         # ethtool -K $DEV rx-vlan-offload on
         # ethtool -K $DEV rx-vlan-stag-hw-parse on
    
    Ctag-stripped and stag-stripped cannot be enabled at the same time
    because currently the kernel supports only one layer of VLAN stripping.
    
    The NIC supplies VLAN strip information as packet metadata.
    The fields of this VLAN metadata are:
    
    * strip flag: 1 for stripped; 0 for unstripped
    * tci: VLAN TCI ID
    * tpid: 1 for ETH_P_8021AD; 0 for ETH_P_8021Q
    
    Configuration control bits NFP_NET_CFG_CTRL_RXVLAN_V2 and
    NFP_NET_CFG_CTRL_RXQINQ are to signal availability of
    ctag-strip and stag-strip features of the firmware.
    Signed-off-by: default avatarDiana Wang <na.wang@corigine.com>
    Reviewed-by: default avatarLouis Peens <louis.peens@corigine.com>
    Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    67d2656b
rings.c 5.17 KB