forked from Minki/linux
net: mvpp2: cls: Start cls flow entries from beginning of table
The Classifier flow table has 512 entries, that contains lookups commands executed consecutively for every flow. Since we have 21 different flows, we have to carefully manage the flow table use. As of today, the start index of a lookup sequence is computed directly based in the flow->id. There are 8 reserved flow ids, from 0-7, which don't have any corresponding sequence in the flow table. We can therefore ignore them when computing the index, and make so that the first non-reserved flow point to the very beginning of the flow table. Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Suggested-by: Alan Winkowski <walan@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1f29a8c4c6
commit
dc61b37fd9
@ -179,9 +179,11 @@ struct mvpp2_cls_flow {
|
||||
#define MVPP2_N_FLOWS 52
|
||||
|
||||
#define MVPP2_ENTRIES_PER_FLOW (MVPP2_MAX_PORTS + 1)
|
||||
#define MVPP2_FLOW_C2_ENTRY(id) ((id) * MVPP2_ENTRIES_PER_FLOW)
|
||||
#define MVPP2_PORT_FLOW_HASH_ENTRY(port, id) ((id) * MVPP2_ENTRIES_PER_FLOW + \
|
||||
(port) + 1)
|
||||
#define MVPP2_FLOW_C2_ENTRY(id) ((((id) - MVPP2_FL_START) * \
|
||||
MVPP2_ENTRIES_PER_FLOW) + 1)
|
||||
#define MVPP2_PORT_FLOW_HASH_ENTRY(port, id) (MVPP2_FLOW_C2_ENTRY(id) + \
|
||||
1 + (port))
|
||||
|
||||
struct mvpp2_cls_flow_entry {
|
||||
u32 index;
|
||||
u32 data[MVPP2_CLS_FLOWS_TBL_DATA_WORDS];
|
||||
|
Loading…
Reference in New Issue
Block a user