From patchwork Thu Oct 18 18:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 149184 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2293094lji; Thu, 18 Oct 2018 11:00:24 -0700 (PDT) X-Google-Smtp-Source: ACcGV60TLPDe3c3urUYPQXfa2zz58FePZf+KA3Cbvmsoc/VSGM4ub3tj/fo/1v4GrMDLQ6kkKVPt X-Received: by 2002:a17:902:a585:: with SMTP id az5-v6mr30347893plb.197.1539885624608; Thu, 18 Oct 2018 11:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539885624; cv=none; d=google.com; s=arc-20160816; b=d+yCbLJA0x9HaPVZ5UPVmNMCL5OrZMX2fDFuvSlKbBn6dfT977B+xGmgn9u7ziQA+z fI1d1qMFqbKS1/ClRNGZmufrGEN9JOr3/4GF3CfmMC00trWlA8XuuvZGur77J3TYtCm3 nTWLe7trus3JxpZzvGkjuUiqSTWC9PN72OQAALlKP13HU6AS4htTx16E6xwDmDS6lkb5 d2kityNM9HAercFWjYyD8efNxKmm1dlrk+GxHQEOeyReHbddjyvUBzah7VYDby20McKy 21k9nT914zXO2pZvQu5wQpSTDYTE8BbO2rixTkt0Aqfc+AP9vMA7eAP1P8NAkomjImwC UHDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=JfQGwIrwrD1CvEnjr+HtowFFhShfNj5LOkGinrHbu/8=; b=XlEGq8Vl9YE/vXh0D4x7SDa4YCOqh69WKqwfj8Wb0/X7A2DQO+fCrRKb5qQMW0CIWZ 4+QDvhGnY+s0MxRdQ5JpxDrPezlLRD9VJvfM8U8fjjwL/71Hw9OUbmEUbMCoa8+xn7QT wa+pZbPAkFWWM5+j9lKGqmTlEPMMqxSXIo7qFasWXYJWaOdaDI9bqbi3N65ykr0bmFAQ 2UQ8GvykHECl71fPughrdQqtAbqiymdqUKWIzUGeOWcgDtStFiDn4xP9pt7tb/9tD3Dm K/HkUhpcx8qNZjM7WpKHFL4sR8M37BLjNLCXot+ogPnQsxEBisEwUCfx6qx2SNCrw/Xm uYUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VbY11R8s; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7-v6si5021482plp.420.2018.10.18.11.00.20; Thu, 18 Oct 2018 11:00:24 -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; dkim=pass header.i=@linaro.org header.s=google header.b=VbY11R8s; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728806AbeJSCCV (ORCPT + 32 others); Thu, 18 Oct 2018 22:02:21 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46125 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729342AbeJSCCU (ORCPT ); Thu, 18 Oct 2018 22:02:20 -0400 Received: by mail-lj1-f196.google.com with SMTP id x3-v6so28534379lji.13 for ; Thu, 18 Oct 2018 11:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=JfQGwIrwrD1CvEnjr+HtowFFhShfNj5LOkGinrHbu/8=; b=VbY11R8swKAm1KTZ8V+5/NheT9ftarHsnwgt6h6G3YrDEYzP2z5VtbH9BZCRX9L7RA 9LmyyDTs0ki0vNrnuhbZaA8n9A7izNXuHPQ7Y/XqZFBJwvSiWvEhJe6ptG/fWhSwfc+p I4K5oTEsa+ozkF/ljQBKvta6/n0tLmh7CoHDY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JfQGwIrwrD1CvEnjr+HtowFFhShfNj5LOkGinrHbu/8=; b=jgEhnVwTJYm8ipsexwF3/yAzEDyEUmwhXvXVx0LZiSO2rIHcRCDOZyzEhdJYsss+zi CyWXFNWsVLZ4Bk5tPPPEZHNROeD11/mUV3Hd8/1t/tgOtIHb8YLj+ZLorLYBszT/YDUb b1rim4oNO/VdlVSgYY/gSVUykHCCDXFc3a0iEGEu6jLe6AiMg+jN+nTE5x1P3wbU6ras VmyuiT7Vfp0E3lH4HU7ZpRZysrI8WVvSwRgTlVgdgqMX58xLQ0pKIrO2o7F0WphuZIie +uk9ncGOWfz5iMDzPeWRP4Z+/p29Gow5LbRISu7MbCbL6XmhvPeVWchD0IwlAgUQOXv3 Sbdw== X-Gm-Message-State: ABuFfoj3wW2rNat+vPrTtzUrwbL+Di8wnv5ThgBv0DcXq5rlDbH5/Q7V BFyDbhMw40Gub5u+TsfhYdefqA== X-Received: by 2002:a2e:5215:: with SMTP id g21-v6mr20429816ljb.144.1539885613356; Thu, 18 Oct 2018 11:00:13 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id o185-v6sm944988lfo.40.2018.10.18.11.00.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 11:00:12 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com, davem@davemloft.net Cc: linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH net-next] net: ethernet: ti: cpsw: don't flush mcast entries while switch promisc mode Date: Thu, 18 Oct 2018 21:00:06 +0300 Message-Id: <20181018180006.7065-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No need now to flush mcast entries in switch mode while toggling to promiscuous mode. It's not needed as vlan reg_mcast = ALL_PORTS and mcast/vlan ports = ALL_PORTS, the same happening for vlan unreg_mcast, it's set to ALL_PORT_MASK just after calling promisc mode routine by calling set allmulti. I suppose main reason to flush them is to use unreg_mcast to receive all to host port. Thus, now, all mcast packets are received anyway and no reason to flush mcast entries unsafely, as they were synced with __dev_mc_sync() previously and are not restored. Another way is to _dev_mc_unsync() them, but no need. Signed-off-by: Ivan Khoronzhuk --- Based on net-next/master Tasted on am572x EVM and BBB drivers/net/ethernet/ti/cpsw.c | 3 --- 1 file changed, 3 deletions(-) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 226be2a56c1f..0e475020a674 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -638,9 +638,6 @@ static void cpsw_set_promiscious(struct net_device *ndev, bool enable) } while (time_after(timeout, jiffies)); cpsw_ale_control_set(ale, 0, ALE_AGEOUT, 1); - /* Clear all mcast from ALE */ - cpsw_ale_flush_multicast(ale, ALE_ALL_PORTS, -1); - /* Flood All Unicast Packets to Host port */ cpsw_ale_control_set(ale, 0, ALE_P0_UNI_FLOOD, 1); dev_dbg(&ndev->dev, "promiscuity enabled\n");