]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: cls: right-justify the C2 TCAM keys
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Tue, 18 Jun 2019 14:55:18 +0000 (16:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jun 2019 02:26:05 +0000 (22:26 -0400)
commit61a412de9f988a2d1112fcc17838453c83b5e801
tree82c39ab85088ea6b67bb0c304191136ed7b377e6
parent7a4be7ec6cfeea8e3fef233138edd9a296603ba7
net: mvpp2: cls: right-justify the C2 TCAM keys

The C2 TCAM used for classification uses a key (Header Extracted Key)
built by concatenating several fields extracted from the packet header.

After a lot of trial-and-error and some guess work, it seems the HEK is
right justified, with the first fields being stored in the MSB, then
concatenated up until the LSB.

Until now, this doesn't cause any issue since all HEK fields we use are
full bytes. However this is an issue for the upcoming VLAN id and pri
extraction, which aren't full bytes.

Rework the way we built that TCAM key, by changing the order in which we
append the fields.

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