]> git.karo-electronics.de Git - karo-tx-linux.git/commit
IB/core: Add interfaces to control VF attributes
authorEli Cohen <eli@mellanox.com>
Fri, 11 Mar 2016 20:58:38 +0000 (22:58 +0200)
committerDoug Ledford <dledford@redhat.com>
Mon, 21 Mar 2016 21:13:14 +0000 (17:13 -0400)
commit50174a7f2c24d13cdeec435ee1ba70b1e0b1318f
tree90bed42f7b911ae11755a7a717817e806caec3cd
parenta0c1b2a3508714281f604db818fa0cc83c2f9b6a
IB/core: Add interfaces to control VF attributes

Following the practice exercised for network devices which allow the PF
net device to configure attributes of its virtual functions, we
introduce the following functions to be used by IPoIB which is the
network driver implementation for IB devices.

ib_set_vf_link_state - set the policy for a VF link. More below.
ib_get_vf_config - read configuration information of a VF
ib_get_vf_stats - read VF statistics
ib_set_vf_guid - set the node or port GUID of a VF

Also add an indication in the device cap flags that indicates that this
IB devices is based on a virtual function.

A VF shares the physical port with the PF and other VFs. When setting
the link state we have three options:

1. Auto - in this mode, the virtual port follows the state of the
   physical port and becomes active only if the physical port's state is
   active. In all other cases it remains in a Down state.
2. Down - sets the state of the virtual port to Down
3. Up - causes the virtual port to transition into Initialize state if
   it was not already in this state. A virtualization aware subnet manager
   can then bring the state of the port into the Active state.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h