OSDN Git Service

nfp: support TX VLAN ctag insert
authorDiana Wang <na.wang@corigine.com>
Sat, 2 Jul 2022 07:35:51 +0000 (09:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jul 2022 09:44:08 +0000 (10:44 +0100)
commitd80702ff12576682b8bce121600f687535716e7d
treebf51c914dd5c4efe7842c5600195e6cbbefb35e5
parent67d2656b48f108bcf8819f05374c68cfedda3133
nfp: support TX VLAN ctag insert

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 are gotten from sk_buff, 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.
The metadata format on tx side of NFD3 is different from NFDK.
This feature is not currently implemented for 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfd3/dp.c
drivers/net/ethernet/netronome/nfp/nfd3/rings.c
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c