Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290791
b: refs/heads/master
c: 2ab573c
h: refs/heads/master
i:
  290789: 2bd6ceb
  290787: ea9e758
  290783: 2629bd6
v: v3
  • Loading branch information
Yevgeny Petrilin authored and David S. Miller committed Mar 6, 2012
1 parent e6c66cf commit b7ca7ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39b2c4ebb433acf751c28a59dde110767af24d23
refs/heads/master: 2ab573c586446ebab9d7a3e340bd4ff8fc2c70d4
10 changes: 6 additions & 4 deletions trunk/drivers/net/ethernet/mellanox/mlx4/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,14 @@ static int mlx4_uc_steer_add(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn)
{
struct mlx4_qp qp;
u8 gid[16] = {0};
__be64 be_mac;
int err;

qp.qpn = *qpn;

mac &= 0xffffffffffffULL;
mac = cpu_to_be64(mac << 16);
memcpy(&gid[10], &mac, ETH_ALEN);
be_mac = cpu_to_be64(mac << 16);
memcpy(&gid[10], &be_mac, ETH_ALEN);
gid[5] = port;

err = mlx4_unicast_attach(dev, &qp, gid, 0, MLX4_PROT_ETH);
Expand All @@ -100,11 +101,12 @@ static void mlx4_uc_steer_release(struct mlx4_dev *dev, u8 port,
{
struct mlx4_qp qp;
u8 gid[16] = {0};
__be64 be_mac;

qp.qpn = qpn;
mac &= 0xffffffffffffULL;
mac = cpu_to_be64(mac << 16);
memcpy(&gid[10], &mac, ETH_ALEN);
be_mac = cpu_to_be64(mac << 16);
memcpy(&gid[10], &be_mac, ETH_ALEN);
gid[5] = port;

mlx4_unicast_detach(dev, &qp, gid, MLX4_PROT_ETH);
Expand Down

0 comments on commit b7ca7ec

Please sign in to comment.