Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9125671pxu; Mon, 28 Dec 2020 07:15:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJydY5yawIlxLinN4ig5U2B5B3JspeeH46F2bEuwbML8jitU9arJfA/ZDwLe14eBdR6Lz81/ X-Received: by 2002:a05:6402:1a2f:: with SMTP id be15mr42829947edb.209.1609168501986; Mon, 28 Dec 2020 07:15:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168501; cv=none; d=google.com; s=arc-20160816; b=kxeDQDRm6FDScMz3cmibmJdSj4NwubD8G+iFRu1P7exLgYscfnSlTx63g9nWXiFwwm LHe5P4ajTngWCgy+qc8t1JmFZcfBDxH+Ebg7f2POCdXnxxhD4BgLvBNct5JFWQOmSFr7 7Jm6lpQAUVmMkWIqicC8+i6PxzXf68wqze/EMtweMz+Oaqr6r1xoJ4qk6k1UJrmE4XdT pKSjBsZpu7AND8CNNrg8MgPPTx6DqsRjXeIOH9YXTLZTKYbkFQO9lICYXCiKal6aikRe YSevNgzWPc0uCn359T+uUPb1aZ3FNspQKg4y/GcIK8kYFXCXAoMKWvJK+dKVjpk1y6oy Q9hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+0YATTrwXIgTgDMf45Pj5QwTgSy93p/jCc6dS7euZ64=; b=F1N2v7PP5zSTW6FkB5seOmCUdqjEpSSveN1r3u2g/mbgIXDkB7IiWlANdLLmdugzCO vcqChkwWZ0QFotUkD4oU0IIcZvpuz3Ut9ylNGAt/fHXA3WSeGnN/O4CvQjL82d2pY8ob /F2o9CKLZ2xp3iqEEQ7r26EGkA1Hj9PqWHIVNkSHLEYv4U4G7goG9SMFPRmq97lsdhZN bB2LAAxnoPzLv+/EPAmxjlluoqDf6yuF0b+3ELc2/g5rDaMQp5+afY5zz2UKPgWZfyoe neULH+I6hUJN9ma0e9zJ2yxGSkZjAQf+1qjX1+x5Vb4144h/U75Ns17aI80UaKZSKkJR s0yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fiFdlx8v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si23226359edq.154.2020.12.28.07.14.38; Mon, 28 Dec 2020 07:15:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fiFdlx8v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438424AbgL1OHT (ORCPT + 99 others); Mon, 28 Dec 2020 09:07:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:40940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438004AbgL1OGW (ORCPT ); Mon, 28 Dec 2020 09:06:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B4F6A206D4; Mon, 28 Dec 2020 14:05:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164342; bh=Q1udS4u73Fkk3mqa+I7gbDChOJIpcdjSf9iZ4Cb/ae4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fiFdlx8vNX4R1dznE6YA30WTChUNflqeNuLbzJrwYkEy6r59DCsmT4kkiQ7uP1TH0 7EMNt60RVH0MLUrfIXwS0rWdo228RCjdg7zaNaYxpPJ8H56cV8NYF5L2klrBp/Nmd/ Y4J0k+PYGUOvokuf55Yn+QMDyuCLKtEys6SydGgI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shannon Nelson , Saeed Mahameed , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 115/717] ionic: use mc sync for multicast filters Date: Mon, 28 Dec 2020 13:41:53 +0100 Message-Id: <20201228125026.472180288@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shannon Nelson [ Upstream commit e0243e1966592859da4c6ffe6d43e1576ec3c457 ] We should be using the multicast sync routines for the multicast filters. Also, let's just flatten the logic a bit and pull the small unicast routine back into ionic_set_rx_mode(). Fixes: 1800eee16676 ("net: ionic: Replace in_interrupt() usage.") Signed-off-by: Shannon Nelson Reviewed-by: Saeed Mahameed Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- .../net/ethernet/pensando/ionic/ionic_lif.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index a12df3946a07c..724df18400165 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -1149,15 +1149,6 @@ static void _ionic_lif_rx_mode(struct ionic_lif *lif, unsigned int rx_mode, } } -static void ionic_dev_uc_sync(struct net_device *netdev, bool from_ndo) -{ - if (from_ndo) - __dev_uc_sync(netdev, ionic_ndo_addr_add, ionic_ndo_addr_del); - else - __dev_uc_sync(netdev, ionic_addr_add, ionic_addr_del); - -} - static void ionic_set_rx_mode(struct net_device *netdev, bool from_ndo) { struct ionic_lif *lif = netdev_priv(netdev); @@ -1177,7 +1168,10 @@ static void ionic_set_rx_mode(struct net_device *netdev, bool from_ndo) * we remove our overflow flag and check the netdev flags * to see if we can disable NIC PROMISC */ - ionic_dev_uc_sync(netdev, from_ndo); + if (from_ndo) + __dev_uc_sync(netdev, ionic_ndo_addr_add, ionic_ndo_addr_del); + else + __dev_uc_sync(netdev, ionic_addr_add, ionic_addr_del); nfilters = le32_to_cpu(lif->identity->eth.max_ucast_filters); if (netdev_uc_count(netdev) + 1 > nfilters) { rx_mode |= IONIC_RX_MODE_F_PROMISC; @@ -1189,7 +1183,10 @@ static void ionic_set_rx_mode(struct net_device *netdev, bool from_ndo) } /* same for multicast */ - ionic_dev_uc_sync(netdev, from_ndo); + if (from_ndo) + __dev_mc_sync(netdev, ionic_ndo_addr_add, ionic_ndo_addr_del); + else + __dev_mc_sync(netdev, ionic_addr_add, ionic_addr_del); nfilters = le32_to_cpu(lif->identity->eth.max_mcast_filters); if (netdev_mc_count(netdev) > nfilters) { rx_mode |= IONIC_RX_MODE_F_ALLMULTI; -- 2.27.0