]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: avoid two atomic ops per page on x86
authorEric Dumazet <edumazet@google.com>
Fri, 20 Jan 2017 16:25:34 +0000 (08:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Jan 2017 16:16:27 +0000 (11:16 -0500)
commit7e83115b7e990ea7a51e693b91ced0c2bd3cb667
tree8f4858e51e80ccc51e5f0f586f620b9af344c08a
parentfad9e469d6efd2399af7c14f7e7e42982add9c1e
bnx2x: avoid two atomic ops per page on x86

Commit 98620722530a ("bnx2x: Alloc 4k fragment for each rx ring buffer
element") added extra put_page() and get_page() calls on arches where
PAGE_SIZE=4K like x86

Reorder things to avoid this overhead.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Cc: Yuval Mintz <Yuval.Mintz@cavium.com>
Cc: Ariel Elior <ariel.elior@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c