]> asedeno.scripts.mit.edu Git - linux.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)
commitbd43d1ba12b71bda33bac82cff623bb8fa19b953
tree6e2c5757839f8fff09d16bf704a5aaf52b80cd5f
parent7b9c7d7dc539308e4b08974ebeba9cc1f685320b
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