From patchwork Thu Jun 5 12:01:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 31416 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B073A203AC for ; Thu, 5 Jun 2014 12:02:43 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id m1sf4405746oag.2 for ; Thu, 05 Jun 2014 05:02:43 -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=S4DQPbOreaFW/132kysfLXACeAd3Sb0beE84Sk0+bte33Xfkva/WJ6rO/MtFh+xmoT yiRTGsO+1fIdwkx5KYPbJPqEa1sCc4d4lIN/IctnPGHnLHYzs8On58nTbB5s62+6T74F k5j9FBl3kv3fh8kaleav/wocIW6sZosKQulcP9OrF6WOM3Zc8HaYOcRuhHcNbXuDCH36 Jlhf6Jd9fgXgYZhsn07173AuVunv29zStZYECJbN0L2+JCO3kj/FMORhuiNwmULCyAlS Un9mQrfMpLSxjqOC1z/71jyCRnJOVx7MgFgKbOxj6yWDlKyyBUmfeCS2MbIGJA9vEWz0 1fyw== X-Gm-Message-State: ALoCoQk+vF8NG8wtYDy45YTaM7iXcKfcCMuVxGsemp53YjLc8ujZ/kWCJ6mFUlPeoZ0ffifc9tUq X-Received: by 10.182.133.73 with SMTP id pa9mr25090517obb.6.1401969763171; Thu, 05 Jun 2014 05:02:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.50 with SMTP id i47ls110137qgd.38.gmail; Thu, 05 Jun 2014 05:02:43 -0700 (PDT) X-Received: by 10.52.121.19 with SMTP id lg19mr6871224vdb.54.1401969763069; Thu, 05 Jun 2014 05:02:43 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id ol2si2286243vcb.88.2014.06.05.05.02.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Jun 2014 05:02:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.180 as permitted sender) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so1010699veb.25 for ; Thu, 05 Jun 2014 05:02:43 -0700 (PDT) X-Received: by 10.52.25.130 with SMTP id c2mr37162104vdg.27.1401969762965; Thu, 05 Jun 2014 05:02:42 -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 vs6csp10935vcb; Thu, 5 Jun 2014 05:02:42 -0700 (PDT) X-Received: by 10.182.33.66 with SMTP id p2mr31452737obi.72.1401969762447; Thu, 05 Jun 2014 05:02:42 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tx3si9795409obc.107.2014.06.05.05.02.41; Thu, 05 Jun 2014 05:02:42 -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 S1751662AbaFEMCi (ORCPT + 3 others); Thu, 5 Jun 2014 08:02:38 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:31311 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650AbaFEMCh (ORCPT ); Thu, 5 Jun 2014 08:02:37 -0400 Received: from 172.24.2.119 (EHLO szxeml208-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BUS79037; Thu, 05 Jun 2014 20:02:15 +0800 (CST) Received: from SZXEML417-HUB.china.huawei.com (10.82.67.156) by szxeml208-edg.china.huawei.com (172.24.2.57) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 5 Jun 2014 20:01:07 +0800 Received: from localhost (10.177.22.246) by szxeml417-hub.china.huawei.com (10.82.67.156) with Microsoft SMTP Server id 14.3.158.1; Thu, 5 Jun 2014 20:01:05 +0800 From: Ding Tianhong To: , , , , CC: Subject: [PATCH net-next v2 1/3] macvlan: don't update the uc and vlan list for L2 forwarding offload Date: Thu, 5 Jun 2014 20:01:01 +0800 Message-ID: <1401969663-4464-2-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1401969663-4464-1-git-send-email-dingtianhong@huawei.com> References: <1401969663-4464-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.128.180 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 {