net: stmmac: Introducing support for Page Pool
authorJose Abreu <Jose.Abreu@synopsys.com>
Tue, 9 Jul 2019 08:03:00 +0000 (10:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2019 19:20:08 +0000 (12:20 -0700)
commit2af6106ae949651d529c8c3f0734c3a7babd0d4b
treeda32c00b9208e27b5f109d917e4c0a0ab9a9d8dd
parent06a80a7d09cc3fbecbd44e225e825a37fb806836
net: stmmac: Introducing support for Page Pool

Mapping and unmapping DMA region is an high bottleneck in stmmac driver,
specially in the RX path.

This commit introduces support for Page Pool API and uses it in all RX
queues. With this change, we get more stable troughput and some increase
of banwidth with iperf:
- MAC1000 - 950 Mbps
- XGMAC: 9.22 Gbps

Changes from v3:
- Use page_pool_destroy() (Ilias)
Changes from v2:
- Uncoditionally call page_pool_free() (Jesper)
Changes from v1:
- Use page_pool_get_dma_addr() (Jesper)
- Add a comment (Jesper)
- Add page_pool_free() call (Jesper)
- Reintroduce sync_single_for_device (Arnd / Ilias)

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/Kconfig
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c