]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Static mapping of netdev priv resources to/from netdev TX queues
authorSaeed Mahameed <saeedm@mellanox.com>
Tue, 23 Jun 2015 14:14:14 +0000 (17:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2015 07:42:34 +0000 (00:42 -0700)
commitc5a92ea56a2a2cbee862af2d975fed43f60d9f7f
tree564425dd5b615f6681e8b290c86dd474c37ccf7e
parent234e919a9b2f83e5a051cdb04f0b35466061c45c
net/mlx5e: Static mapping of netdev priv resources to/from netdev TX queues

To save per-packet calculations, we use the following static mappings:
1) priv {channel, tc} to netdev txq (used @mlx5e_selec_queue())
2) netdev txq to priv sq (used @mlx5e_xmit())

Thanks to these static mappings, no more need for a separate implementation
of ndo_start_xmit when multiple TCs are configured.
We believe the performance improvement of such separation would be negligible, if any.
The previous way of dynamically calculating the above mappings required
allocating more TX queues than actually used (@alloc_etherdev_mqs()),
which is now no longer needed.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c