Skip to content

Commit

Permalink
Merge branch 'net-mvpp2-Classifier-updates-RSS'
Browse files Browse the repository at this point in the history
Maxime Chevallier says:

====================
net: mvpp2: Classifier updates, RSS

Here is a set of updates for the PPv2 classifier, the main feature being
the support for steering to RSS contexts, to leverage all the available
RSS tables in the controller.

The first two patches are non-critical fixes for the classifier, the
first one prevents us from allocating too much room to store the
classification rules, the second one configuring the C2 engine as
suggested by the PPv2 functionnal specs.

Patches 3 to 5 introduce support for RSS contexts in mvpp2, allowing us
to steer traffic to dedicated RSS tables.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 25, 2019
2 parents 6dca936 + 1413477 commit cecd758
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 48 deletions.
20 changes: 16 additions & 4 deletions drivers/net/ethernet/marvell/mvpp2/mvpp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@
#define MVPP22_CLS_C2_ATTR2 0x1b6c
#define MVPP22_CLS_C2_ATTR2_RSS_EN BIT(30)
#define MVPP22_CLS_C2_ATTR3 0x1b70
#define MVPP22_CLS_C2_TCAM_CTRL 0x1b90
#define MVPP22_CLS_C2_TCAM_BYPASS_FIFO BIT(0)

/* Descriptor Manager Top Registers */
#define MVPP2_RXQ_NUM_REG 0x2040
Expand Down Expand Up @@ -624,6 +626,7 @@
#define MVPP2_N_RFS_RULES (MVPP2_N_RFS_ENTRIES_PER_FLOW * 7)

/* RSS constants */
#define MVPP22_N_RSS_TABLES 8
#define MVPP22_RSS_TABLE_ENTRIES 32

/* IPv6 max L3 address size */
Expand Down Expand Up @@ -725,6 +728,10 @@ enum mvpp2_prs_l3_cast {
/* Definitions */
struct mvpp2_dbgfs_entries;

struct mvpp2_rss_table {
u32 indir[MVPP22_RSS_TABLE_ENTRIES];
};

/* Shared Packet Processor resources */
struct mvpp2 {
/* Shared registers' base addresses */
Expand Down Expand Up @@ -788,6 +795,9 @@ struct mvpp2 {

/* Debugfs entries private data */
struct mvpp2_dbgfs_entries *dbgfs_entries;

/* RSS Indirection tables */
struct mvpp2_rss_table *rss_tables[MVPP22_N_RSS_TABLES];
};

struct mvpp2_pcpu_stats {
Expand Down Expand Up @@ -919,12 +929,14 @@ struct mvpp2_port {

u32 tx_time_coal;

/* RSS indirection table */
u32 indir[MVPP22_RSS_TABLE_ENTRIES];

/* List of steering rules active on that port */
struct mvpp2_ethtool_fs *rfs_rules[MVPP2_N_RFS_RULES];
struct mvpp2_ethtool_fs *rfs_rules[MVPP2_N_RFS_ENTRIES_PER_FLOW];
int n_rfs_rules;

/* Each port has its own view of the rss contexts, so that it can number
* them from 0
*/
int rss_ctx[MVPP22_N_RSS_TABLES];
};

/* The mvpp2_tx_desc and mvpp2_rx_desc structures describe the
Expand Down
Loading

0 comments on commit cecd758

Please sign in to comment.