History

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.

Aleksey Senin committed 15 years ago

Commit da995a81 parent 4979d184 files · +27 −21Browse files

Showing the changes to include/linux/mlx4 (2 of 4 files). Show all

Unified · Split

2 files
  1. include/linux/mlx4/device.h +8 −2
  2. include/linux/mlx4/driver.h +1 −5
include/linux/mlx4/device.h+8−2
@@ -144,6 +144,11 @@ enum { · 143 unmodified lines
144144 MLX4_STAT_RATE_OFFSET = 5
145145 };
146146
147+enum mlx4_protocol {
148+ MLX4_PROTOCOL_IB,
149+ MLX4_PROTOCOL_EN,
150+};
151+
147152 enum {
148153 MLX4_MTT_FLAG_PRESENT = 1
149154 };
@@ -500,8 +505,9 @@ int mlx4_INIT_PORT(struct mlx4_dev *dev, int port); · 350 unmodified lines
500505 int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port);
501506
502507 int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
503− int block_mcast_loopback);
504−int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]);
508+ int block_mcast_loopback, enum mlx4_protocol protocol);
509+int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
510+ enum mlx4_protocol protocol);
505511
506512 int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index);
507513 void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index);
include/linux/mlx4/driver.h+1−5
@@ -34,6 +34,7 @@ · 33 unmodified lines
3434 #define MLX4_DRIVER_H
3535
3636 #include <linux/device.h>
37+#include <linux/mlx4/device.h>
3738
3839 struct mlx4_dev;
3940
@@ -44,11 +45,6 @@ enum mlx4_dev_event { · 4 unmodified lines
4445 MLX4_DEV_EVENT_PORT_REINIT,
4546 };
4647
47−enum mlx4_protocol {
48− MLX4_PROTOCOL_IB,
49− MLX4_PROTOCOL_EN,
50−};
51−
5248 struct mlx4_interface {
5349 void * (*add) (struct mlx4_dev *dev);
5450 void (*remove)(struct mlx4_dev *dev, void *context);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t