From: Amir Vadai Date: Fri, 3 Aug 2012 00:38:36 +0000 (+0000) Subject: net/mlx4_en: loopbacked packets are dropped when SMAC=DMAC X-Git-Tag: upstream/snapshot3+hdmi~6853^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8c40b7f32abe0878ee693480fb2f7453d80add5;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git net/mlx4_en: loopbacked packets are dropped when SMAC=DMAC Should NOT check SMAC=DMAC when: 1. loopback is turned on 2. validate_loopback is true. Fixed it accordingly. Signed-off-by: Amir Vadai Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c index f32e703..5aba5ec 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c @@ -614,8 +614,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud /* If source MAC is equal to our own MAC and not performing * the selftest or flb disabled - drop the packet */ if (s_mac == priv->mac && - (!(dev->features & NETIF_F_LOOPBACK) || - !priv->validate_loopback)) + !((dev->features & NETIF_F_LOOPBACK) || + priv->validate_loopback)) goto next; /*