From patchwork Wed Nov 28 23:45:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zou X-Patchwork-Id: 202629 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 403832C0082 for ; Thu, 29 Nov 2012 11:33:20 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946042Ab2K2AdR (ORCPT ); Wed, 28 Nov 2012 19:33:17 -0500 Received: from mga02.intel.com ([134.134.136.20]:13673 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1945979Ab2K2AdR (ORCPT ); Wed, 28 Nov 2012 19:33:17 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 28 Nov 2012 16:33:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,180,1355126400"; d="scan'208";a="226121966" Received: from zychengdu.jf.intel.com ([10.23.155.176]) by orsmga001.jf.intel.com with ESMTP; 28 Nov 2012 16:33:16 -0800 From: Yi Zou Subject: [net-next PATCH v1] 8021q: fix vlan device to inherit the unicast filtering capability flag To: netdev@vger.kernel.org Cc: devel@open-fcoe.org Date: Wed, 28 Nov 2012 15:45:24 -0800 Message-ID: <20121128234520.6615.41220.stg.yi.zou@intel.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This bug is observed on running FCoE over a VLAN device associated w/ a real device that has IFF_UNICAST_FLT set since FCoE would add unicast address such as FLOGI MAC to the VLAN interface that FCoE is on. Since currently, VLAN device is not inheriting the IFF_UNICAST_FLT flag from the parent real device even though the real device is capable of doing unicast filtering. This forces the VLAN device and its real device go to promiscuous mode unnecessarily even the added address is actually being added to the available unicast filter table in real device. Signed-off-by: Yi Zou Cc: devel@open-fcoe.org --- net/8021q/vlan.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index ee07072..ca03c17 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -242,6 +242,7 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id) * hope the underlying device can handle it. */ new_dev->mtu = real_dev->mtu; + new_dev->priv_flags |= (real_dev->priv_flags & IFF_UNICAST_FLT); vlan_dev_priv(new_dev)->vlan_id = vlan_id; vlan_dev_priv(new_dev)->real_dev = real_dev;