diff options
author | Moni Shoua <monis@mellanox.com> | 2013-12-12 18:03:14 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-01-18 14:12:53 -0800 |
commit | 297e0dad720664dad44baa2cdd13f871979fb58c (patch) | |
tree | 2c14a33b5fcabd51e41335884896b5209db29de2 /include/linux/mlx4 | |
parent | d487ee77740ccf79d7dc1935d4daa77887283028 (diff) | |
download | linux-stable-297e0dad720664dad44baa2cdd13f871979fb58c.tar.gz linux-stable-297e0dad720664dad44baa2cdd13f871979fb58c.tar.bz2 linux-stable-297e0dad720664dad44baa2cdd13f871979fb58c.zip |
IB/mlx4: Handle Ethernet L2 parameters for IP based GID addressing
IP based RoCE gids don't store Ethernet L2 parameters, MAC and VLAN.
Therefore, we need to extract them from the CQE and place them in
struct ib_wc (to be used for cases were they were taken from the gid).
Also, when modifying a QP or building address handle, instead of
parsing the dgid to get the MAC and VLAN, take them from the address
handle attributes.
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r-- | include/linux/mlx4/cq.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/linux/mlx4/cq.h b/include/linux/mlx4/cq.h index 98fa492cf406..e1862997f933 100644 --- a/include/linux/mlx4/cq.h +++ b/include/linux/mlx4/cq.h @@ -34,6 +34,7 @@ #define MLX4_CQ_H #include <linux/types.h> +#include <uapi/linux/if_ether.h> #include <linux/mlx4/device.h> #include <linux/mlx4/doorbell.h> @@ -43,10 +44,15 @@ struct mlx4_cqe { __be32 immed_rss_invalid; __be32 g_mlpath_rqpn; __be16 sl_vid; - __be16 rlid; - __be16 status; - u8 ipv6_ext_mask; - u8 badfcs_enc; + union { + struct { + __be16 rlid; + __be16 status; + u8 ipv6_ext_mask; + u8 badfcs_enc; + }; + u8 smac[ETH_ALEN]; + }; __be32 byte_cnt; __be16 wqe_index; __be16 checksum; @@ -83,6 +89,7 @@ struct mlx4_ts_cqe { enum { MLX4_CQE_VLAN_PRESENT_MASK = 1 << 29, MLX4_CQE_QPN_MASK = 0xffffff, + MLX4_CQE_VID_MASK = 0xfff, }; enum { |