nfp: support TX VLAN ctag insert in NFDK
authorDiana Wang <na.wang@corigine.com>
Mon, 11 Jul 2022 09:30:48 +0000 (11:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jul 2022 01:09:57 +0000 (18:09 -0700)
commiteca250b16690d43dce3941311af110c8391150e9
treeff828a9f2b0831e6e58a382901d77526db9c3229
parentef2a95db89003e8304e429dc48556fecb8c7140b
nfp: support TX VLAN ctag insert in NFDK

Add support for TX VLAN ctag insert
which may be configured via ethtool.
e.g.
     # ethtool -K $DEV tx-vlan-offload on

The NIC supplies VLAN insert information as packet metadata.
The fields of this VLAN metadata including vlan_proto and vlan tag.

Configuration control bit NFP_NET_CFG_CTRL_TXVLAN_V2 is to
signal availability of ctag-insert features of the firmware.

NFDK is used to communicate via PCIE to NFP-3800 based NICs
while NFD3 is used for other NICs supported by the NFP driver.
This features is currently implemented only for NFD3 and
this patch adds support for it with NFDK.

Signed-off-by: Diana Wang <na.wang@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20220711093048.1911698-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/nfdk/dp.c
drivers/net/ethernet/netronome/nfp/nfdk/rings.c
drivers/net/ethernet/netronome/nfp/nfp_net_common.c