aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorMoni Shoua <monis@mellanox.com>2016-01-14 10:50:32 -0500
committerDoug Ledford <dledford@redhat.com>2016-01-19 15:35:00 -0500
commitd8ae914196d35bbc0c459aec6de588ba585a1c3e (patch)
tree4db480b44387d998c928f32bc3a8f81822336b2a /include/linux/mlx4
parent5fe1043da84887369d32459514f2c7d98ff37936 (diff)
net/mlx4: Query RoCE support
Query the RoCE support from firmware using the appropriate firmware commands. Downstream patches will read these capabilities and act accordingly. Signed-off-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 971037188907..28cbee0df7d7 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -216,6 +216,7 @@ enum {
216 MLX4_DEV_CAP_FLAG2_SKIP_OUTER_VLAN = 1LL << 30, 216 MLX4_DEV_CAP_FLAG2_SKIP_OUTER_VLAN = 1LL << 30,
217 MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1ULL << 31, 217 MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1ULL << 31,
218 MLX4_DEV_CAP_FLAG2_LB_SRC_CHK = 1ULL << 32, 218 MLX4_DEV_CAP_FLAG2_LB_SRC_CHK = 1ULL << 32,
219 MLX4_DEV_CAP_FLAG2_ROCE_V1_V2 = 1ULL << 33,
219}; 220};
220 221
221enum { 222enum {
@@ -267,12 +268,14 @@ enum {
267 MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, 268 MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9,
268 MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, 269 MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10,
269 MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, 270 MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11,
271 MLX4_BMME_FLAG_ROCE_V1_V2 = 1 << 19,
270 MLX4_BMME_FLAG_PORT_REMAP = 1 << 24, 272 MLX4_BMME_FLAG_PORT_REMAP = 1 << 24,
271 MLX4_BMME_FLAG_VSD_INIT2RTR = 1 << 28, 273 MLX4_BMME_FLAG_VSD_INIT2RTR = 1 << 28,
272}; 274};
273 275
274enum { 276enum {
275 MLX4_FLAG_PORT_REMAP = MLX4_BMME_FLAG_PORT_REMAP 277 MLX4_FLAG_PORT_REMAP = MLX4_BMME_FLAG_PORT_REMAP,
278 MLX4_FLAG_ROCE_V1_V2 = MLX4_BMME_FLAG_ROCE_V1_V2
276}; 279};
277 280
278enum mlx4_event { 281enum mlx4_event {
@@ -980,9 +983,10 @@ struct mlx4_mad_ifc {
980 if ((type) == (dev)->caps.port_mask[(port)]) 983 if ((type) == (dev)->caps.port_mask[(port)])
981 984
982#define mlx4_foreach_ib_transport_port(port, dev) \ 985#define mlx4_foreach_ib_transport_port(port, dev) \
983 for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ 986 for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \
984 if (((dev)->caps.port_mask[port] == MLX4_PORT_TYPE_IB) || \ 987 if (((dev)->caps.port_mask[port] == MLX4_PORT_TYPE_IB) || \
985 ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) 988 ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE) || \
989 ((dev)->caps.flags2 & MLX4_DEV_CAP_FLAG2_ROCE_V1_V2))
986 990
987#define MLX4_INVALID_SLAVE_ID 0xFF 991#define MLX4_INVALID_SLAVE_ID 0xFF
988#define MLX4_SINK_COUNTER_INDEX(dev) (dev->caps.max_counters - 1) 992#define MLX4_SINK_COUNTER_INDEX(dev) (dev->caps.max_counters - 1)