Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2240392imm; Thu, 18 Oct 2018 11:13:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV60enjoTZuuYkRNtBR3ML7bFN5gUGLFDIwWHhNN9BBsU+wfZqb4Kj+5uNTz/Yyc2oE6Xw5it X-Received: by 2002:a17:902:9b84:: with SMTP id y4-v6mr31393453plp.332.1539886428234; Thu, 18 Oct 2018 11:13:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539886428; cv=none; d=google.com; s=arc-20160816; b=W361G3l2bxLBXCrUVQVyznboW+GZbVeXdzXuJ8HEeVfuXcUBmQXPrNOSmvDBN2wXBL 3r8NI75IW5vkoGCftYLab8eMFW66vv6ErCkSk42CGUQGZZKgQOzAHIDjjvIMutJ1107u Yt4QPi3mtgq5uGvE/yUsfl1SrWT4MA/G2sHwgpj3HjU/CGra4fCTK1pGNQnF7s+g87CG V7C7vXOog50Td9o9/efIkrUIW8xp2W/kfCV7QLTf5XfKvLSkDR2R59bO/1pM6nVSi6Ae mgVe3m1PKYDPh7+Qrb4+he3WgDTbAlXKxB6ySEc2ZBklpz58cxfRGvi7eRWmHzy4v3oN wtdA== 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 p10-v6si12365146plk.77.2018.10.18.11.13.32; Thu, 18 Oct 2018 11:13:48 -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 S1729370AbeJSCCV (ORCPT + 99 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(-) 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"); -- 2.17.1