Skip to content

Commit fec6079

Browse files
stefanchulskikuba-moo
authored andcommitted
net: mvpp2: prs: fix PPPoE with ipv6 packet parse
Current PPPoE+IPv6 entry is jumping to 'next-hdr' field and not to 'DIP' field as done for IPv4. Fixes: 3f51850 ("ethernet: Add new driver for Marvell Armada 375 network unit") Reported-by: Liron Himi <lironh@marvell.com> Signed-off-by: Stefan Chulski <stefanc@marvell.com> Link: https://lore.kernel.org/r/1608230266-22111-1-git-send-email-stefanc@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 3f48fab commit fec6079

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,8 +1680,9 @@ static int mvpp2_prs_pppoe_init(struct mvpp2 *priv)
16801680
mvpp2_prs_sram_next_lu_set(&pe, MVPP2_PRS_LU_IP6);
16811681
mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_IP6,
16821682
MVPP2_PRS_RI_L3_PROTO_MASK);
1683-
/* Skip eth_type + 4 bytes of IPv6 header */
1684-
mvpp2_prs_sram_shift_set(&pe, MVPP2_ETH_TYPE_LEN + 4,
1683+
/* Jump to DIP of IPV6 header */
1684+
mvpp2_prs_sram_shift_set(&pe, MVPP2_ETH_TYPE_LEN + 8 +
1685+
MVPP2_MAX_L3_ADDR_SIZE,
16851686
MVPP2_PRS_SRAM_OP_SEL_SHIFT_ADD);
16861687
/* Set L3 offset */
16871688
mvpp2_prs_sram_offset_set(&pe, MVPP2_PRS_SRAM_UDF_TYPE_L3,

0 commit comments

Comments
 (0)