linux/drivers/infiniband/hw
Matan Barak dd5f03beb4 IB/core: Ethernet L2 attributes in verbs/cm structures
This patch add the support for Ethernet L2 attributes in the
verbs/cm/cma structures.

When dealing with L2 Ethernet, we should use smac, dmac, vlan ID and priority
in a similar manner that the IB L2 (and the L4 PKEY) attributes are used.

Thus, those attributes were added to the following structures:

* ib_ah_attr - added dmac
* ib_qp_attr - added smac and vlan_id, (sl remains vlan priority)
* ib_wc - added smac, vlan_id
* ib_sa_path_rec - added smac, dmac, vlan_id
* cm_av - added smac and vlan_id

For the path record structure, extra care was taken to avoid the new
fields when packing it into wire format, so we don't break the IB CM
and SA wire protocol.

On the active side, the CM fills. its internal structures from the
path provided by the ULP.  We add there taking the ETH L2 attributes
and placing them into the CM Address Handle (struct cm_av).

On the passive side, the CM fills its internal structures from the WC
associated with the REQ message.  We add there taking the ETH L2
attributes from the WC.

When the HW driver provides the required ETH L2 attributes in the WC,
they set the IB_WC_WITH_SMAC and IB_WC_WITH_VLAN flags. The IB core
code checks for the presence of these flags, and in their absence does
address resolution from the ib_init_ah_from_wc() helper function.

ib_modify_qp_is_ok is also updated to consider the link layer. Some
parameters are mandatory for Ethernet link layer, while they are
irrelevant for IB.  Vendor drivers are modified to support the new
function signature.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2014-01-14 14:20:54 -08:00
..
amso1100 IB: Remove unnecessary semicolons 2013-10-14 10:10:00 -07:00
cxgb3 RDMA/cma: Add IPv6 support for iWARP 2013-08-12 12:32:31 -07:00
cxgb4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-12-30 09:33:30 -08:00
ehca IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
ipath IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
mlx4 IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
mlx5 IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
mthca IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
nes RDMA/nes: Remove self-assignment from nes_query_qp() 2013-11-09 02:34:27 -08:00
ocrdma IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
qib IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00