Skip to content

Commit

Permalink
Merge branch 'mvpp2-per-cpu-buffers'
Browse files Browse the repository at this point in the history
Matteo Croce says:

====================
mvpp2: per-cpu buffers

This patchset workarounds an PP2 HW limitation which prevents to use
per-cpu rx buffers.
The first patch is just a refactor to prepare for the second one.
The second one allocates percpu buffers if the following conditions are met:
- CPU number is less or equal 4
- no port is using jumbo frames

If the following conditions are not met at load time, of jumbo frame is enabled
later on, the shared allocation is reverted.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 2, 2019
2 parents 4ba0ebb + 7d04b0b commit 67538eb
Show file tree
Hide file tree
Showing 2 changed files with 237 additions and 41 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/marvell/mvpp2/mvpp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ enum mvpp2_prs_l3_cast {
#define MVPP2_BM_SHORT_BUF_NUM 2048
#define MVPP2_BM_POOL_SIZE_MAX (16*1024 - MVPP2_BM_POOL_PTR_ALIGN/4)
#define MVPP2_BM_POOL_PTR_ALIGN 128
#define MVPP2_BM_MAX_POOLS 8

/* BM cookie (32 bits) definition */
#define MVPP2_BM_COOKIE_POOL_OFFS 8
Expand Down Expand Up @@ -787,6 +788,9 @@ struct mvpp2 {
/* Aggregated TXQs */
struct mvpp2_tx_queue *aggr_txqs;

/* Are we using page_pool with per-cpu pools? */
int percpu_pools;

/* BM pools */
struct mvpp2_bm_pool *bm_pools;

Expand Down
Loading

0 comments on commit 67538eb

Please sign in to comment.