Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4619356ybi; Mon, 27 May 2019 23:03:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyREd8vrzkaxqufI1p1B47QHB1ZW+NvfBfWvi2mHVPQu91FT85Og6RP/YYDI02Gx2dx8wXM X-Received: by 2002:a63:2224:: with SMTP id i36mr11389461pgi.70.1559023396684; Mon, 27 May 2019 23:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559023396; cv=none; d=google.com; s=arc-20160816; b=JTePZiVRFvPTggKkTO/Cpc9Z8BykJ16da2HzuIWFV5jVULTUb754tywlLiF/qx1Ulz Mv6QExHwsmTTllgN94pKs75xiIOX3sMOlxjDoYwSaRiTPM9eQN+24h0722T6nxcmGLoR /qGH8CMi7vSGaBhaL14Nh7V36NeF8T1jvGDHUANGtYO8Ty2Ha47IX5AFJRBkdjCSNDMF 5iQaKJREWwUPPPIgLQCPUAumh5FefaVyTCelHaWTyGBbsEKwJci9ebmuR2/prbJcAj1a Thgb/usF6UoFiWimZNDx+9+NzL8lxLjjeBlGlZiAQQWciFYVvS10XUD3ugzMItImCt0N nbkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=jAdiDhP9ieZKRLDaCv3moTTAnURFsx2Dxx9o2Q3NfI0=; b=Itux4sUU4Bicyo8ICrgew53cFO79qhaZxNHuAWdkCd1nvoq4+yfc9cAR6nOr8cl7Pk lGin7sXDVH4Fl6i4uu/tDPsSL5K2xF47m1DnziotmKmz2BMb5eC76yeqLzhU4o2S/H39 Fp7i3vgPDWJtUotyKBZj+5M9WLmlg3OW4fVhRyrI+zkj20NzKt2Z9Se4Z1uLmuuWWqm/ qFAu0D7Am505JYWYemv/rghAjsqIQu33CIY5ETzAdEz1M5SqQvXQV+DAbogBW24BRgjy djLjV/pfo0A00193vZh5UABkplOeosXl2UZpnX2749tcLBQ9nWpGDSJ7NG7iX1OWnLpt OhJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si21356618pfi.234.2019.05.27.23.03.00; Mon, 27 May 2019 23:03:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727458AbfE1GAy (ORCPT + 99 others); Tue, 28 May 2019 02:00:54 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:34240 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725904AbfE1GAy (ORCPT ); Tue, 28 May 2019 02:00:54 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9EE7D8791914B541E114; Tue, 28 May 2019 14:00:48 +0800 (CST) Received: from localhost.localdomain (10.175.34.53) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Tue, 28 May 2019 14:00:39 +0800 From: Xue Chaojing To: CC: , , , , Subject: [PATCH net-next] hinic: fix a bug in set rx mode Date: Mon, 27 May 2019 22:10:05 +0000 Message-ID: <20190527221005.10073-1-xuechaojing@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.34.53] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org in set_rx_mode, __dev_mc_sync and netdev_for_each_mc_addr will repeatedly set the multicast mac address. so we delete this loop. Signed-off-by: Xue Chaojing --- drivers/net/ethernet/huawei/hinic/hinic_main.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c index e64bc664f687..cfd3f4232cac 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c @@ -724,7 +724,6 @@ static void set_rx_mode(struct work_struct *work) { struct hinic_rx_mode_work *rx_mode_work = work_to_rx_mode_work(work); struct hinic_dev *nic_dev = rx_mode_work_to_nic_dev(rx_mode_work); - struct netdev_hw_addr *ha; netif_info(nic_dev, drv, nic_dev->netdev, "set rx mode work\n"); @@ -732,9 +731,6 @@ static void set_rx_mode(struct work_struct *work) __dev_uc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr); __dev_mc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr); - - netdev_for_each_mc_addr(ha, nic_dev->netdev) - add_mac_addr(nic_dev->netdev, ha->addr); } static void hinic_set_rx_mode(struct net_device *netdev) -- 2.17.1