]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: improve rx buffer allocation
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 20 Jan 2019 10:12:01 +0000 (11:12 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jan 2019 22:51:50 +0000 (14:51 -0800)
commit8cbe9940ae43e147bd9b55694cac73e0a7f0f946
tree35b122d3c4a7ec8e36d5ddfd9b898e15e478674e
parent8880584c383023f1505fc5a8d22f2d06f106045b
r8169: improve rx buffer allocation

8 years ago, as part of 46343859f268 ("r8169: use 50% less ram for RX
ring"), the alignment requirement for rx buffers was silently changed
from 8 bytes to 16 bytes. I found nothing explaining this, also the
chip specs I have only mention an 8 byte requirement.
AFAICS kmalloc_node() guarantees allocated memory to be at least
"long long" aligned, what is 8 bytes on a 32 bit machine.
So we can take this memory as-is and avoid some overhead by changing
the alignment requirement back to 8 bytes.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c