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: 10647741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0080E109C for ; Thu, 18 Oct 2018 18:12:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E639328EEA for ; Thu, 18 Oct 2018 18:12:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA10928F70; Thu, 18 Oct 2018 18:12:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C26828EEA for ; Thu, 18 Oct 2018 18:12:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728712AbeJSCCV (ORCPT ); Thu, 18 Oct 2018 22:02:21 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:33012 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728794AbeJSCCU (ORCPT ); Thu, 18 Oct 2018 22:02:20 -0400 Received: by mail-lj1-f195.google.com with SMTP id z21-v6so28560950ljz.0 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=bKkKuJaspgdcg9ZlQtjZpt/iP48ROVEUbYD7gPdeJk6QYt+s4TqVgY07ios1mcgaNm VQdTlRTSeVTWG2kn/j3m/M+ArpJonqxmpRvyfWvGAahULUogdsjYKtjBmCTwjI1bS3Q5 hYL3FpmM3XdNSseQOkjSfrACUQcHS8T9evAu/fHRrywNBfsm+50XlGTsBdn3dz6eXqWI S5kqferQVJpYHKRKEUnAPRt5CvuSYu/qc1qaEuv542b6NPUBFdJzFXp95l8aRc8LS5iC BCiPxV3HhsmY02sStos1BJsFLI7UM7VBi0/koafguiND0X2Rnh4nT9WDJFk5fnZRE96i uJCg== X-Gm-Message-State: ABuFfojHHeewZ4WwVTkiK9LNq9nC86cf451CjATa5SjEc5F/dgu+Nb2r Y4H3v+L2+lvzWmX9bzV+BAXV7w== X-Google-Smtp-Source: ACcGV62KRPrLWS14LB0TptIULZKWUZrgKrW0LNBKgm5ci8dx8fZSzinTQwdhdtkI1xTuJr1aynadYw== 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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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");