]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: prs: Drop unions representing TCAM and SRAM entries
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 28 Jun 2018 12:42:05 +0000 (14:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Jun 2018 09:54:09 +0000 (18:54 +0900)
commit35b439355330f9bb9372bbad64d5d978d3bcf2af
tree6e2c5757839f8fff09d16bf704a5aaf52b80cd5f
parent4a580112db144bfc33374c69f4323527c07e4ca4
net: mvpp2: prs: Drop unions representing TCAM and SRAM entries

PPv2's Header Parser use some large TCAM and SRAM entries, that are
duplicated in software so that we can write them to hardware only when
we are done modifying them.

Currently, PPv2 uses a union containing arrays of u32 and u8 to represent
these entries, to facilitate byte per byte access. This representation is
broken when we want to support big endian, and this makes the code
confusing to read.

This patch drops the union, and simply stores the TCAM and SRAM entries
as u32 arrays, each entry corresponding to a 32-bit register.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2.h
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.h