diff options
author | Vamsi Attunuru <vamsi.attunuru@marvell.com> | 2018-10-22 23:25:56 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-22 20:15:38 -0700 |
commit | d02913d91657941a86208691258837a0fe9a4cd7 (patch) | |
tree | 889db16daf08da007d408651cec03419a8210fd4 /drivers/net/ethernet/marvell/octeontx2/af/mbox.h | |
parent | 4b05528ebf0c3ffd61543cfcca78844f05d8eb9d (diff) | |
download | lwn-d02913d91657941a86208691258837a0fe9a4cd7.tar.gz lwn-d02913d91657941a86208691258837a0fe9a4cd7.zip |
octeontx2-af: Support for VTAG strip and capture
Added support for PF/VF drivers to configure NIX to
capture and/or strip VLAN tag from ingress packets.
Signed-off-by: Vamsi Attunuru <vamsi.attunuru@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/mbox.h')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h index f8efeaa66dda..b60ac9de2235 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/mbox.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/mbox.h @@ -156,7 +156,8 @@ M(NIX_HWCTX_DISABLE, 0x8003, hwctx_disable_req, msg_rsp) \ M(NIX_TXSCH_ALLOC, 0x8004, nix_txsch_alloc_req, nix_txsch_alloc_rsp) \ M(NIX_TXSCH_FREE, 0x8005, nix_txsch_free_req, msg_rsp) \ M(NIX_TXSCHQ_CFG, 0x8006, nix_txschq_config, msg_rsp) \ -M(NIX_STATS_RST, 0x8007, msg_req, msg_rsp) +M(NIX_STATS_RST, 0x8007, msg_req, msg_rsp) \ +M(NIX_VTAG_CFG, 0x8008, nix_vtag_config, msg_rsp) /* Messages initiated by AF (range 0xC00 - 0xDFF) */ #define MBOX_UP_CGX_MESSAGES \ @@ -462,4 +463,36 @@ struct nix_txschq_config { u64 regval[MAX_REGS_PER_MBOX_MSG]; }; +struct nix_vtag_config { + struct mbox_msghdr hdr; + u8 vtag_size; + /* cfg_type is '0' for tx vlan cfg + * cfg_type is '1' for rx vlan cfg + */ + u8 cfg_type; + union { + /* valid when cfg_type is '0' */ + struct { + /* tx vlan0 tag(C-VLAN) */ + u64 vlan0; + /* tx vlan1 tag(S-VLAN) */ + u64 vlan1; + /* insert tx vlan tag */ + u8 insert_vlan :1; + /* insert tx double vlan tag */ + u8 double_vlan :1; + } tx; + + /* valid when cfg_type is '1' */ + struct { + /* rx vtag type index */ + u8 vtag_type; + /* rx vtag strip */ + u8 strip_vtag :1; + /* rx vtag capture */ + u8 capture_vtag :1; + } rx; + }; +}; + #endif /* MBOX_H */ |