diff options
| author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2014-03-12 06:00:41 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-03-12 15:57:16 -0400 |
| commit | 5ea8bbfc49291b7e23161fe4de0bf3e4a4e34b18 (patch) | |
| tree | 1bf5496c736a0d70d137a05cee9e0adc32cfcb12 /include/linux/mlx4/device.h | |
| parent | 2f5bb473681b88819a9de28ac3a47e7737815a92 (diff) | |
mlx4: Implement IP based gids support for RoCE/SRIOV
Since there is no connection between the MAC/VLAN and the GID
when using IP-based addressing, the proxy QP1 (running on the
slave) must pass the source-mac, destination-mac, and vlan_id
information separately from the GID. Additionally, the Host
must pass the remote source-mac and vlan_id back to the slave,
This is achieved as follows:
Outgoing MADs:
1. Source MAC: obtained from the CQ completion structure
(struct ib_wc, smac field).
2. Destination MAC: obtained from the tunnel header
3. vlan_id: obtained from the tunnel header.
Incoming MADs
1. The source (i.e., remote) MAC and vlan_id are passed in
the tunnel header to the proxy QP1.
VST mode support:
For outgoing MADs, the vlan_id obtained from the header is
discarded, and the vlan_id specified by the Hypervisor is used
instead.
For incoming MADs, the incoming vlan_id (in the wc) is discarded, and the
"invalid" vlan (0xffff) is substituted when forwarding to the slave.
Signed-off-by: Moni Shoua <monis@mellanox.co.il>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4/device.h')
| -rw-r--r-- | include/linux/mlx4/device.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 86e02e5c2c77..f211b51dc726 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -632,7 +632,8 @@ struct mlx4_eth_av { | |||
| 632 | u8 hop_limit; | 632 | u8 hop_limit; |
| 633 | __be32 sl_tclass_flowlabel; | 633 | __be32 sl_tclass_flowlabel; |
| 634 | u8 dgid[16]; | 634 | u8 dgid[16]; |
| 635 | u32 reserved4[2]; | 635 | u8 s_mac[6]; |
| 636 | u8 reserved4[2]; | ||
| 636 | __be16 vlan; | 637 | __be16 vlan; |
| 637 | u8 mac[ETH_ALEN]; | 638 | u8 mac[ETH_ALEN]; |
| 638 | }; | 639 | }; |
