From patchwork Thu Jun 5 06:50:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 31398 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D1C5820BF9 for ; Thu, 5 Jun 2014 06:51:35 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id oz11sf3415212veb.2 for ; Wed, 04 Jun 2014 23:51:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=u0Oia7iaqHuuRTcEvTVHm05yVP/3VLZthEvkb78/e58=; b=mLXQv2rKFYGT3BWjRGS/rC6SOnlU6d5gH0m4x/SvCxNZYKIGbBHMwZtO6hiti5YlKD g/pXKg9KLFIJGvb5xufDOcwueJ/eyCxDSo0gAK4cRZtk+5wEmBhqOm1nKHXg3bQT9DGY dUWLeagddtOfdIX7zk+J0NliTTi1G2g3xvKbslEyCEKE2ZxM1807xUatV5y3E0cnQV61 wa7Qm+u0/LJyTrdr4ajiEtReKWRDxxQEQGKoR/aJZzKVmzH/tTxFbNdWi18Uc78q/mDl u1SF5jsTHguj/w6cOGbDPk42P9S2q1J52+e4E1wL8qE1jD4UWg29GKf9vWzb1awDvdzl 2m2w== X-Gm-Message-State: ALoCoQkSqVLOoAAyffCfwwxgqhay4ZUeU5+0Z3sIdYV2mCOFKzLMMiMj0HHrOQKkyRNw/aGi0ZLJ X-Received: by 10.236.209.97 with SMTP id r61mr21270043yho.33.1401951095630; Wed, 04 Jun 2014 23:51:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.141 with SMTP id r13ls7248qgd.98.gmail; Wed, 04 Jun 2014 23:51:35 -0700 (PDT) X-Received: by 10.52.35.234 with SMTP id l10mr6164203vdj.61.1401951095542; Wed, 04 Jun 2014 23:51:35 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id rv2si3261007vdb.88.2014.06.04.23.51.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Jun 2014 23:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id ij19so658619vcb.30 for ; Wed, 04 Jun 2014 23:51:35 -0700 (PDT) X-Received: by 10.221.7.71 with SMTP id on7mr48817002vcb.18.1401951095431; Wed, 04 Jun 2014 23:51:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp102968vcb; Wed, 4 Jun 2014 23:51:35 -0700 (PDT) X-Received: by 10.68.250.3 with SMTP id yy3mr74094552pbc.56.1401951094997; Wed, 04 Jun 2014 23:51:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dl2si10984922pbc.108.2014.06.04.23.51.34; Wed, 04 Jun 2014 23:51:34 -0700 (PDT) Received-SPF: none (google.com: netdev-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751320AbaFEGvb (ORCPT + 3 others); Thu, 5 Jun 2014 02:51:31 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:26004 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbaFEGv0 (ORCPT ); Thu, 5 Jun 2014 02:51:26 -0400 Received: from 172.24.2.119 (EHLO szxeml214-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BUS39426; Thu, 05 Jun 2014 14:50:44 +0800 (CST) Received: from SZXEML418-HUB.china.huawei.com (10.82.67.157) by szxeml214-edg.china.huawei.com (172.24.2.29) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 5 Jun 2014 14:50:39 +0800 Received: from localhost (10.177.22.246) by szxeml418-hub.china.huawei.com (10.82.67.157) with Microsoft SMTP Server id 14.3.158.1; Thu, 5 Jun 2014 14:50:31 +0800 From: Ding Tianhong To: , , , CC: Subject: [PATCH net-next 1/4] macvlan: don't update the uc and vlan list for L2 forwarding offload Date: Thu, 5 Jun 2014 14:50:25 +0800 Message-ID: <1401951028-9800-2-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1401951028-9800-1-git-send-email-dingtianhong@huawei.com> References: <1401951028-9800-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.22.246] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: netdev@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: dingtianhong@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If lowerdev supports L2 forwarding offload, no need to set mac address to uc list and vlan list, so also don't do that when the macvlan mac address changes. Signed-off-by: Ding Tianhong --- drivers/net/macvlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 453d55a..c3a54a6 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -515,7 +515,7 @@ static int macvlan_sync_address(struct net_device *dev, unsigned char *addr) struct net_device *lowerdev = vlan->lowerdev; int err; - if (!(dev->flags & IFF_UP)) { + if (!(dev->flags & IFF_UP) || vlan->fwd_priv) { /* Just copy in the new address */ ether_addr_copy(dev->dev_addr, addr); } else {