net/mlx4_en: Saving mem access on data path
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Tue, 6 Mar 2012 04:03:34 +0000 (04:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Mar 2012 20:19:17 +0000 (15:19 -0500)
commitebf8c9aa032f03343b91c91951b0705021b02eb0
tree821ec45a0319a6592603a66048700bac3b0f15bc
parent6975f4ce5a44e337514283e84761adaf2849aa26
net/mlx4_en: Saving mem access on data path

Localized the pdev->dev, and using dma_map instead of pci_map
There are multiple map/unmap operations on data path,
optimizing those by saving redundant pointer access.
Those places were identified as hot-spots when running kernel profiling
during some benchmarks.
The fixes had most impact when testing packet rate with small packets,
reducing several % from CPU load, and in some case being the difference
between reaching wire speed or being CPU bound.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/en_tx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h