]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: Fix page pool size
authorThierry Reding <treding@nvidia.com>
Mon, 23 Sep 2019 09:59:15 +0000 (11:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Sep 2019 07:27:47 +0000 (09:27 +0200)
commiteb69ac6a8a51268be5eca01323f590da93353393
tree38eab617c77018b8b517359ad20c2984f05e4b88
parentcd73b1a514c3dfe2092c8bfbadd5f39ae78424e8
net: stmmac: Fix page pool size

The size of individual pages in the page pool in given by an order. The
order is the binary logarithm of the number of pages that make up one of
the pages in the pool. However, the driver currently passes the number
of pages rather than the order, so it ends up wasting quite a bit of
memory.

Fix this by taking the binary logarithm and passing that in the order
field.

Fixes: 71911be94d09 ("net: stmmac: Introducing support for Page Pool")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c