octeontx2-af: Define all NIX_AF_RX_DEF_* registers
authorJerin Jacob <jerinjacobk@gmail.com>
Sun, 2 Dec 2018 12:47:43 +0000 (18:17 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Dec 2018 00:23:08 +0000 (16:23 -0800)
In order to support all NIX specific valid length errors and
checksum errors on Rx, Update all NIX_AF_RX_DEF_* registers.

Also sorted all registers in HRM definition order.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

index 741728c3d5971703f20d3edd89b1b95f918810c9..2a7229809247cebf8566ba0b6125d3a942b5d06c 100644 (file)
@@ -2593,18 +2593,33 @@ int rvu_nix_init(struct rvu *rvu)
                if (err)
                        return err;
 
-               /* Config Outer L2, IP, TCP and UDP's NPC layer info.
+               /* Config Outer/Inner L2, IP, TCP, UDP and SCTP NPC layer info.
                 * This helps HW protocol checker to identify headers
                 * and validate length and checksums.
                 */
                rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_OL2,
                            (NPC_LID_LA << 8) | (NPC_LT_LA_ETHER << 4) | 0x0F);
-               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_OUDP,
-                           (NPC_LID_LD << 8) | (NPC_LT_LD_UDP << 4) | 0x0F);
-               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_OTCP,
-                           (NPC_LID_LD << 8) | (NPC_LT_LD_TCP << 4) | 0x0F);
                rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_OIP4,
                            (NPC_LID_LC << 8) | (NPC_LT_LC_IP << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_IIP4,
+                           (NPC_LID_LF << 8) | (NPC_LT_LF_TU_IP << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_OIP6,
+                           (NPC_LID_LC << 8) | (NPC_LT_LC_IP6 << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_IIP6,
+                           (NPC_LID_LF << 8) | (NPC_LT_LF_TU_IP6 << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_OTCP,
+                           (NPC_LID_LD << 8) | (NPC_LT_LD_TCP << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_ITCP,
+                           (NPC_LID_LG << 8) | (NPC_LT_LG_TU_TCP << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_OUDP,
+                           (NPC_LID_LD << 8) | (NPC_LT_LD_UDP << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_IUDP,
+                           (NPC_LID_LG << 8) | (NPC_LT_LG_TU_UDP << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_OSCTP,
+                           (NPC_LID_LD << 8) | (NPC_LT_LD_SCTP << 4) | 0x0F);
+               rvu_write64(rvu, blkaddr, NIX_AF_RX_DEF_ISCTP,
+                           (NPC_LID_LG << 8) | (NPC_LT_LG_TU_SCTP << 4) |
+                           0x0F);
 
                err = nix_rx_flowkey_alg_cfg(rvu, blkaddr);
                if (err)