net/mlx4: Add utils for N-Port VFs
authorMatan Barak <matanb@mellanox.com>
Wed, 19 Mar 2014 16:11:51 +0000 (18:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Mar 2014 20:18:29 +0000 (16:18 -0400)
commitf74462acf8f390528c8b7937f227c6c90d017f3b
tree5214afc5585cf140693664224dc58ab276af0e0c
parent1ab95d37bcc3ff2d69e3871e4f056bab7aed0b85
net/mlx4: Add utils for N-Port VFs

This patch adds the following utils:
1. Convert slave_id -> VF
2. Get the active ports by slave_id
3. Convert slave's port to real port
4. Get the slave's port from real port
5. Get all slaves that uses the i'th real port
6. Get all slaves that uses the i'th real port exclusively

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/cmd.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h
include/linux/mlx4/device.h