Patchwork [net-next,02/11] net/mlx4_core: Set correctly allow_loopback flag

login
register
mail settings
Submitter Amir Vadai
Date Jan. 30, 2013, 10:34 a.m.
Message ID <1359542067-10760-3-git-send-email-amirv@mellanox.com>
Download mbox | patch
Permalink /patch/216811/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Amir Vadai - Jan. 30, 2013, 10:34 a.m.
From: Hadar Hen Zion <hadarh@mellanox.com>

The allow_loopback flag was wrongly set using arithmetic bit operation, change
the code to use logical bit operation.

Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx4/mcg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index d7c0704..5268552 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -1157,7 +1157,7 @@  int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
 			.priority = MLX4_DOMAIN_NIC,
 		};
 
-		rule.allow_loopback = ~block_mcast_loopback;
+		rule.allow_loopback = !block_mcast_loopback;
 		rule.port = port;
 		rule.qpn = qp->qpn;
 		INIT_LIST_HEAD(&rule.list);