]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mvpp2: use classifier to assign default rx queue
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Thu, 12 Jul 2018 11:54:24 +0000 (13:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jul 2018 00:30:49 +0000 (17:30 -0700)
commitb1a962c62c80da77751a296e27c944c9bae6c6f0
tree019ac5d6ce599c4006719df37a23dd3981b5062b
parente6e21c024272302ea4f0e397f044e2323035342f
net: mvpp2: use classifier to assign default rx queue

The PPv2 Controller has a classifier, that can perform multiple lookup
operations for each packet, using different engines.

One of these engines is the C2 engine, which performs TCAM based lookups
on data extracted from the packet header. When a packet matches an
entry, the engine sets various attributes, used to perform
classification operations.

One of these attributes is the rx queue in which the packet should be sent.
The current code uses the lookup_id table (also called decoding table)
to assign the rx queue. However, this only works if we use one entry per
port in the decoding table, which won't be the case once we add RSS
lookups.

This patch uses the C2 engine to assign the rx queue to each packet.

The C2 engine is used through the flow table, which dictates what
classification operations are done for a given flow.

Right now, we have one flow per port, which contains every ingress
packet for this port.

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_cls.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h