]> git.ipfire.org Git - thirdparty/linux.git/commit
net: mvpp2: cls: Use RSS contexts to handle RSS tables
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 24 May 2019 10:05:52 +0000 (12:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 May 2019 23:38:15 +0000 (16:38 -0700)
commit895586d5dc32ef1017830ee6a4162e6f158b99f3
treed9f564617e41a01ccf1d543db405f26971c60e70
parente8486ca9a12ca71174ddcd2059be385ea7d33064
net: mvpp2: cls: Use RSS contexts to handle RSS tables

The PPv2 controller has 8 RSS tables that are shared across all ports on
a given PPv2 instance. The previous implementation allocated one table
per port, leaving others unused.

By using RSS contexts, we can make use of multiple RSS tables per
port, one being the default table (always id 0), the other ones being
used as destinations for flow steering, in the same way as rx rings.

This commit introduces RSS contexts management in the PPv2 driver. We
always reserve one table per port, allocated when the port is probed.

The global table list is stored in the struct mvpp2, as it's a global
resource. Each port then maintains a list of indices in that global
table, that way each port can have it's own numbering scheme starting
from 0.

One limitation that seems unavoidable is that the hashing parameters are
shared across all RSS contexts for a given port. Hashing parameters for
ctx 0 will be applied to all contexts.

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