diff options
author | Aleksey Senin <alex@senin.name> | 2010-12-02 06:44:49 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2011-01-12 17:49:17 -0500 |
commit | da995a8aee044bc5d0847e19e351cd48a2cb8bcc (patch) | |
tree | 000cb11c5e49e1bc91a2212ed5a2299f279c990b /include | |
parent | 4979d18fe105297f8f065743f31f8f735da8df2d (diff) |
IB/mlx4: Handle protocol field in multicast table
The newest device firmware stores IB vs. Ethernet protocol in two bits
in members_count field of multicast group table (0: Infiniband, 1:
Ethernet). When changing the QP members count for a multicast group,
it important not to reset this information. When calling multicast
attach first time, the protocol type should be specified. In this
patch we always set it IB, but in the future we will handle Ethernet
too. When looking for a QP, the protocol type shoud be checked too.
Signed-off-by: Aleksey Senin <alekseys@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx4/device.h | 10 | ||||
-rw-r--r-- | include/linux/mlx4/driver.h | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index a7b15bc7648e..049214642036 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -144,6 +144,11 @@ enum { | |||
144 | MLX4_STAT_RATE_OFFSET = 5 | 144 | MLX4_STAT_RATE_OFFSET = 5 |
145 | }; | 145 | }; |
146 | 146 | ||
147 | enum mlx4_protocol { | ||
148 | MLX4_PROTOCOL_IB, | ||
149 | MLX4_PROTOCOL_EN, | ||
150 | }; | ||
151 | |||
147 | enum { | 152 | enum { |
148 | MLX4_MTT_FLAG_PRESENT = 1 | 153 | MLX4_MTT_FLAG_PRESENT = 1 |
149 | }; | 154 | }; |
@@ -500,8 +505,9 @@ int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); | |||
500 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); | 505 | int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port); |
501 | 506 | ||
502 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 507 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
503 | int block_mcast_loopback); | 508 | int block_mcast_loopback, enum mlx4_protocol protocol); |
504 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | 509 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
510 | enum mlx4_protocol protocol); | ||
505 | 511 | ||
506 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); | 512 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); |
507 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); | 513 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); |
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index f407cd4bfb34..e1eebf78caba 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define MLX4_DRIVER_H | 34 | #define MLX4_DRIVER_H |
35 | 35 | ||
36 | #include <linux/device.h> | 36 | #include <linux/device.h> |
37 | #include <linux/mlx4/device.h> | ||
37 | 38 | ||
38 | struct mlx4_dev; | 39 | struct mlx4_dev; |
39 | 40 | ||
@@ -44,11 +45,6 @@ enum mlx4_dev_event { | |||
44 | MLX4_DEV_EVENT_PORT_REINIT, | 45 | MLX4_DEV_EVENT_PORT_REINIT, |
45 | }; | 46 | }; |
46 | 47 | ||
47 | enum mlx4_protocol { | ||
48 | MLX4_PROTOCOL_IB, | ||
49 | MLX4_PROTOCOL_EN, | ||
50 | }; | ||
51 | |||
52 | struct mlx4_interface { | 48 | struct mlx4_interface { |
53 | void * (*add) (struct mlx4_dev *dev); | 49 | void * (*add) (struct mlx4_dev *dev); |
54 | void (*remove)(struct mlx4_dev *dev, void *context); | 50 | void (*remove)(struct mlx4_dev *dev, void *context); |