From patchwork Wed Jun 4 20:23:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlad Yasevich X-Patchwork-Id: 356087 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A7A80140092 for ; Thu, 5 Jun 2014 06:24:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751209AbaFDUXs (ORCPT ); Wed, 4 Jun 2014 16:23:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54895 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbaFDUXr (ORCPT ); Wed, 4 Jun 2014 16:23:47 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s54KNhMU001719 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Jun 2014 16:23:43 -0400 Received: from vyasevic.redhat.com (vpn-62-229.rdu2.redhat.com [10.10.62.229]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s54KNeSi005458; Wed, 4 Jun 2014 16:23:42 -0400 From: Vlad Yasevich To: netdev@vger.kernel.org Cc: j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net, kaber@trash.net, Vlad Yasevich Subject: [PATCH net-next 1/3] bonding: Turn on IFF_UNICAST_FLT on bond devices Date: Wed, 4 Jun 2014 16:23:36 -0400 Message-Id: <1401913418-31307-2-git-send-email-vyasevic@redhat.com> In-Reply-To: <1401913418-31307-1-git-send-email-vyasevic@redhat.com> References: <1401913418-31307-1-git-send-email-vyasevic@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Bonding devices manage the unicast filters of the underlying interfaces, but do not turn on IFF_UNICAST_FLT flag. Thus anytime a unicast address is added to the bond, the bond is places in promiscuous mode. Turn on IFF_UNICAST_FLT on the bond device so that the bond does not go into promiscuous mode needlesly. If an underlying device does not support unicast filtering, that device will automaticall enter promiscuous mode already. Signed-off-by: Vlad Yasevich --- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 59a12c61..a89bf18 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3945,7 +3945,7 @@ void bond_setup(struct net_device *bond_dev) /* Initialize the device options */ bond_dev->tx_queue_len = 0; bond_dev->flags |= IFF_MASTER|IFF_MULTICAST; - bond_dev->priv_flags |= IFF_BONDING; + bond_dev->priv_flags |= IFF_BONDING | IFF_UNICAST_FLT; bond_dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING); /* At first, we block adding VLANs. That's the only way to