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)
commit03289b88e3bcbdf2c8e0f1c92ce4e5a4cfbabf77
tree564425dd5b615f6681e8b290c86dd474c37ccf7e
parentf1a3badb0b429cae75b4785c97af35cb89bf1457
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