summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/octeontx2/af/common.h
diff options
context:
space:
mode:
authorSubbaraya Sundeep <sbhatta@marvell.com>2020-10-29 08:15:45 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-01 00:16:47 +0300
commit1c1935c9945d0a921f8565885b3581737564a5d9 (patch)
tree2b1bbbe7b11713cc0bd2774b4c5007a8566011ca /drivers/net/ethernet/marvell/octeontx2/af/common.h
parent55efcc57140b637b97f1daa6309343650f7b45ba (diff)
downloadlinux-1c1935c9945d0a921f8565885b3581737564a5d9.tar.xz
octeontx2-af: Add NIX1 interfaces to NPC
On 98xx silicon, NPC block has additional mcam entries, counters and NIX1 interfaces. Extended set of registers are present for the new mcam entries and counters. This patch does the following: - updates the register accessing macros to use extended set if present. - configures the MKEX profile for NIX1 interfaces also. - updates mcam entry write functions to use assigned NIX0/1 interfaces for the PF/VF. Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Rakesh Babu <rsaladi2@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/common.h')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/common.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/common.h b/drivers/net/ethernet/marvell/octeontx2/af/common.h
index f48eb66ed021..3b7cad5b116b 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/common.h
@@ -174,8 +174,12 @@ enum nix_scheduler {
#define NPC_MCAM_KEY_X2 1
#define NPC_MCAM_KEY_X4 2
-#define NIX_INTF_RX 0
-#define NIX_INTF_TX 1
+#define NIX_INTFX_RX(a) (0x0ull | (a) << 1)
+#define NIX_INTFX_TX(a) (0x1ull | (a) << 1)
+
+/* Default interfaces are NIX0_RX and NIX0_TX */
+#define NIX_INTF_RX NIX_INTFX_RX(0)
+#define NIX_INTF_TX NIX_INTFX_TX(0)
#define NIX_INTF_TYPE_CGX 0
#define NIX_INTF_TYPE_LBK 1